Giter VIP home page Giter VIP logo

streamonitor's Introduction

StreaMonitor

A Python3 application for monitoring and saving (mostly adult) live streams from various websites.

Inspired by Recordurbate

Supported sites

Site name Abbreviation Aliases Quirks Selectable resolution
Bongacams BC Yes
Cam4 C4 Yes
Cams.com CC Currently only 360p
CamSoda CS Yes
Chaturbate CB Yes
Dreamcam VR DCVR No
Flirt4Free F4F Yes
MyFreeCams MFC Yes
SexChat.hu SCHU use the id as username No
StreaMate SM PornHubLive, PepperCams,... Yes
StripChat SC XHamsterLive,... Yes
StripChat VR SCVR for VR videos No
XLoveCam XLC No

Currently not supported:

  • Amateur.TV (They use Widevine now)
  • Cherry.tv (They switched to Agora)
  • ImLive (Too strict captcha protection for scraping)
  • LiveJasmin (No nudity in free streams)
  • ManyVids Live (They switched to Agora)

There are hundreds of clones of the sites above, you can read about them on this site.

Requirements

  • Python 3
    • Install packages listed in requirements.txt with pip.
  • FFmpeg

Usage

The application has the following interfaces:

  • Console
  • External console via ZeroMQ (sort of working)
  • Web interface

Starting and console

Start the downloader (it does not fork yet)
Automatically imports all streamers from the config file.

python3 Downloader.py

On the console you can use the following commands:

add <username> <site> - Add streamer to the list (also starts monitoring)
remove <username> [<site>] - Remove streamer from the list
start <username> [<site>] - Start monitoring streamer
start * - Start all
stop <username> [<site>] - Stop monitoring
stop * - stop all
status - Status display 
status2 - A slightly more readable status table
quit - Clean exit (Pressing CTRL-C also behaves like this)

For the username input, you usually have to enter the username as represented in the original URL of the room. Some sites are case-sensitive.

For the site input, you can use either the full or the short format of the site name. (And it is case-insensitive)

"Remote" controller

Add or remove a streamer to record (Also saves config file)

python3 Controller.py add <username> <website>
python3 Controller.py remove <username>

Start/stop recording streamers

python3 Controller.py <start|stop> <username>

List the streamers in the config

python3 Controller.py status

Web interface

You can access the web interface on port 5000. If set password in parameters.py username is admin, password admin, empty password is also allowed. When you set the WEBSERVER_HOST it is also accesible to from other computers in the network

Docker support

You can run this application in docker. I prefer docker-compose so I included an example docker-compose.yml file that you can use. Simply start it in the folder with docker-compose up.

Configuration

You can set some parameters in the parameters.py.

Disclaimer

This program is only a proof of concept and education project, I don't encourage anybody to use it.
Most (if not every) streamers disallow recording their shows. Please respect their wish.
If you don't, and you record them despite this request, please don't ever publish or share any recordings.
If you either record or share the recorded shows, you might be legally punished.
Also, please don't use this tool for monetization in any way.

streamonitor's People

Contributors

joostshao avatar lossless1024 avatar onedshow avatar throwawauser1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streamonitor's Issues

not running

so I added a few streams to check if it works but it shows they aren't running when I go to the site they are online, it also shows this for every stream.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\nsa\Desktop\THE RECORD\StreaMonitor-master\streamonitor\bot.py", line 110, in run
self.sc = self.getStatus()
^^^^^^^^^^^^^^^^
File "C:\Users\nsa\Desktop\THE RECORD\StreaMonitor-master\streamonitor\sites\stripchat.py", line 17, in getStatus
r = requests.get('https://stripchat.com/api/vr/v2/models/username/' + self.username, headers=self.headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nsa\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nsa\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nsa\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nsa\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='stripchat.com', port=443): Max retries exceeded with url: /api/vr/v2/models/username/Avril_Cyrus (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001D4C4D57C50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

Help Me!!

i just did all things but show started recording and makes errors

Screenshot)

Save with chat

Save the stream with the chats as we will also be able to experience and enjoy what's happening in the room.

May be like this: (I have blurred the image)

" https://ibb.co/b2S1jDk "

Upper part without blur
Screenshot 2022-10-20 142907
Lower part without blur
Screenshot 2022-10-20 143616

The original video is in this way with the chats on left
download

how to play StripChat VR

I played the saved file with SKYBOX VR PLAYER, but there is a difference in the display when streaming on the web. Is there any other way to play it?

Rate Limited

so i added about 80 models and when i stopped the script it said "rate limited" on every model. where is the problem? my hardware is more then enough to run even 1000 at the same time even my network is strong enough (1gb up and down).

Private Show

There's any way to "bypass" private show from CB and record it?

use mkv instead of mp4

MKV allows to play videos while being encoded, and it should as well be not as broken unless the mp4 file.

[Request] Tip for saving space

Can u add a feature to FFMPEG transcode the files into H265 after stream ends?
Actually I'm using Tdarr to compress the files using an FFMPEG transcode plugin and I'm saving like 50% more space with minimum visible quality loss (probably I haven't configured it properly).
image

vr support?

stripchat \ xhamsterlivesome models have vr cams, it would be nice if you add the vr stream as well, is a wss link.

BongaCams not records

Controller.py status

BongaCams | True | Not running

3 days worked then stopped, ip changed.

Script/FFMPEG does not close task

I noticed that FFMPEG doesn't close tasks even after many days. Also when I stop the script (ctrl-c or quit ) it remains pending as if waiting for all streams (ffmpeg task) to finish. Forcing me to kill everything.
After this some files remain unreadable, for example the 12 day old stream. (Which I assume is finished)
Dont close
stop
Is a FFMPEG problem or a script problem ?
Should we add a "-t 01:00:00" and limit to 1 hour file ? or something to force the connection down and wait for the bot to restart the download(i dont mind loosing 1 minute of stream)
How to recover "damaged" files ?Do I have to re-encode ?

I add that there have been some internet connection drops, but like 1 every 2/3 days, it's hard to trace whether it's their fault

Thanks in advance
ThEnGi

avoid Spam messages

Console keeps spamming a streamer status, when something happens, instead of repeating it on loop, maybe say it once, then if the status changes, update it without spamming it.

Site Request: MyFreeCams

Hello!

Is there any chance you could add support for recording MFC cams? Would be great

Thank you for taking it into consideration

Cheers

Rate Limited

I'm only getting Rate Limited for CB for some reason. Currently recording 4 models 2 from SC and 2 from CB, read the previous Rate Limited thread surely 2 models arent that demanding right?

RateLimited

Thanks for the tool btw!

Recording geo-blocked streamers

Hi, I wonder if there would be any way to record a specific geo-blocked cam4 streamer or set a VPN just for her. I have an VPN app installed on Windows but i don't want to have it ON all the time. Filtering by program inside the VPN app doesn't fit my needs neither, for example allowing VPN only for py.exe process, because I just want one specific streamer to be bypassed with VPN while the other streamers uses my regular internet and IP. Would this be possible to do?

Thanks.

Accidentally stopped videos

The software works pretty good.
But I stopped accidentally the downloader and some recordings was left, which i can't open with vlc. Can I somehow repair the stream with a ffmpeg command?

"Expecting value" error on Windows and Linux environments

Hi,

Within the last 24hr I began to receive this error when attempting to run the Downloader.py script. I tried in both a Windows 10 environment and Linux (debian):

PS E:\StreaMonitor> python3.10.exe .\Downloader.py
Expecting value: line 87 column 1 (char 1722)

python3.10 Downloader.py
Expecting value: line 87 column 1 (char 1722)

I'm using Python3.10 on both systems and have all the modules installed from the requirements.txt file.

Any help on troubleshooting this error is appreciated.

MFC away state errors

Streamers on MFC can enter an away state where their account stays logged in and present in the chatroom, but the video broadcast is temporarily disabled.

StreaMonitor seems unprepared for this user state, throwing tons of errors and spamming traceroutes to the console every few seconds.

I'm not sure if this always happens or only under certain circumstances (I've only been using StreaMonitor for a day or two) but there probably ought to be a more elegant way to handle this fairly common occurrence.

Running in docker

I'm trying for a while to get this running in docker. Would you be open to support this?

Leave Some Disk Space

Hello, I really appreciate this great work. Would it be possible to set a disk space to be left to avoid filling the disk to 100%.

http manager not working?

Im getting error 500 with the new update when accessing http://127.0.0.1:5000

"Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Thanks

Video playing and quality

When I open the recorded video with the
1.Default windows 10 films and photo viewer it doesn't play good stops at frames, cubical blurs and out of sync audio and video
2.Google chrome it does not show cubical blur but same stopping at frames and out of sync audio and video

I tried a lot of players(even pot player did same as windows film and photo viewer) and found that the videos play the best in acv video converter no stopping frames, no blurs, no out of sync audio and video(did it get synced automatically) but it did lose or may be skip a very few frames though.

What is happening please tell

Camsoda recording does not work, but other websites do

When I run the script for CamSoda, the video file is created but never increases in size past 256 KB.

Screenshot_20221001_234256

Screenshot_20221001_234312

  • I have tried running it for MFC and it works as expected.
  • I am running Python 3.10 on EndeavourOS (Linux).
  • I have tried changing the user agent in the CamSoda.py file to a generic Google Chrome Windows 10 PC

please help

image

Running windows 10 32 bit
Installed ffmpeg 4.2.2 win32-static
Had installed python 3.10.8 and the same above issue occurred, then uninstalled it and installed python 3.9 but no luck, same issue

Weird bug I've been noticing (recording hangs)

Hi. Something weird I've been noticing while checking my daily C4 and CB mp4s is that some recordings (very few, but it's happening) from some streamers get stuck, they are like incomplete. How I noticed that? Because the streamer have been online for 2h and I only have 15 min of recording. I don't know if it's due to a bug, but to give an example of what it's happening:

  1. the streamer goes online
  2. the downloader starts recording as intended
  3. after a while, for some reason the recording hangs. But the downloader does not detect any streamer status change, she is still "online" but not recording anything
  4. the streamer is still broadcasting but the algorithm is not recording because it got stuck in the previous step, so we lose that model broadcast (for example if the model streams for 2h but the recording got stuck at min 15, we lost 1h 45min of streaming)
  5. The streamer goes offline but the downloader keep showing online for the whole day
  6. because the bot doesn't detect any offline status, there's no "stop" signal, so the ffmpeg.exe process is open for the infinity and the file can't be played because ffmpeg.exe is using it.
  7. because the ffmpeg.exe process is stuck endlessly, you have to kill it manually with task manager (it doesn't terminate with the stop command either) so the file we get is a corrupted mp4 of an incomplete recording, because the rest of the stream could not be recorded as it got stuck at minute 15 (for example)

I don't know why is this happening. I thought that maybe the streamer disconnects for a sec because of an internet issue or something and the downloader doesn't detect it and gets stuck ¿? I really have no idea. It's just happening with 2% of the recordings but it's there and I already lost a couple of important streams. I don't have console output of the issue because I have no idea when the problem is reproduced, probably hours before I made the daily review of the recordings. What do you think? Cheers.

Recording of same streams

Some models are streaming on different plattforms.
But downloading every stream would be not good. But sometimes they only stream on one and before you don't know.
My idea is the following.
In the add command after the modelname and the site, you can also add a group and another parameter, about how to download within the group i tell more about later.
A group is just a unique name the user can choose on its own.
The parameter after the group is the recoring within the group. For example 1: only record, when no other stream is recording or 2: only record if another stream is in private. This could be useful sometimes useful, when someone forgets to put private on ^^
What you think?

change url

is it possible to change stripchat.com to stripchat.global since .com doesn't work for me?

StripChat

If i'm going to record stripchat models I do not get any sound. Video is perfect but sound is not working.

Also when the downloader try to download a sc model this error shows up but after some tries it is getting downloaded.
ERROR - Username: ERROR: ffmpeg exited with code 1

Also a suggestion, if a model is getting remove with the command the folder which have been created should be added the tag "- removed"
This is a better overview for not record this model anymore :D

ManyVids Live support

Is there any chance MV Live could be added as a supported site?

I understand maintenance of existing sites and other potential features are likely more important, but I thought I would ask anyway.

Thanks

Question

do I have to open anything so it can record like the downloader.py file, should it be open to record the streams?

Set resolution

How to set custom resolution to record streams in 720p or 480p or 1080p

Help me

2022-11-13 00:59:33,247 - INFO - [SC] porn--puppy: Channel online
2022-11-13 00:59:33,248 - INFO - [SC] porn--puppy: Started downloading show
Exception in thread Thread-16:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/root/StreaMonitor/streamonitor/downloaders/ffmpeg.py", line 45, in execute
raise
RuntimeError: No active exception to reraise

BongaCams no recoding

Some broadcasts are not written, although the broadcast is online
misslyolika | BongaCams | True | No stream for a while

RuntimeError: No active exception to reraise

2022-11-24 21:46:51,713 - INFO - [BC] Torysexs: Channel online
2022-11-24 21:46:51,713 - INFO - [BC] Torysexs: Started downloading show
Exception in thread Thread-111 (execute):
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/Users/liangshuo/code/py-project/StreaMonitor/streamonitor/downloaders/ffmpeg.py", line 45, in execute
raise
RuntimeError: No active exception to reraise
Exception in thread Thread-112 (execute):
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/Users/liangshuo/code/py-project/StreaMonitor/streamonitor/downloaders/ffmpeg.py", line 45, in execute
raise
RuntimeError: No active exception to reraise
Exception in thread Thread-113 (execute):
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/Users/liangshuo/code/py-project/StreaMonitor/streamonitor/downloaders/ffmpeg.py", line 45, in execute
raise
RuntimeError: No active exception to reraise

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.