Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (Adult streaming videos) (http://stream-recorder.com/forum/forumdisplay.php?f=40)
-   -  

Automated Chaturbate Recording Under Linux

(http://stream-recorder.com/forum/showthread.php?t=19026)

flipper2011 12-27-2014 08:32 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by zugg (Post 72802)
Are you banned from Chaturbate's rtmp servers maybe?

I'm starting to see Connection aborted, Error 104 connection reset by peer.

It was good for 3 weeks but I keep getting this, I also can connect from any browser.

trinhhoang 12-28-2014 04:26 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by ohhdemgirls (Post 72090)
https://github.com/ohhdemgirls/CaptureBate/

CaptureBate lets you follow and archive your favorite models shows on chaturbate.com

Requirements
(Debian 7, minimum)

RTMPDump(ksv) used to capture the streams.

BeautifulSoup4 the screen-scraping library.

ffmpeg compiled with support for libmp3lame & libspeex audio for converting the output files.

Setup
First off you need a chaturbate account, once you're signed up put your credentials in the config.conf file, next you need to get your hashed password for RTMPDump. To get your hash you need to be signed in, then go any models page who is currently online, right click to view page source and search for pbkdf2_sha256$ the full hash will look something like pbkdf2_sha256$12000$QwwcaxjaV3Ik$cZHXVde52w+Fl6In5 4Ay5ZeMQMAFueQgwnnLbkTWT5g\u003D copy your hash into a text editor and escape each $ with a \ then replace u003D with = once you've formatted your hash it should look like pbkdf2_sha256\$12000\$QwwcaxjaV3Ik\$cZHXVde52w+Fl6 In54Ay5ZeMQMAFueQgwnnLbkTWT5g\= you can then paste it into the rtmpdump line modellists.py#L79 be sure to also replace the username on the same line just before your hash.

Now set your output directory in config.conf *optional, will default to CaptureBate/Captured/ Be mindful when capturing many streams at once to have plenty of space on disk and the bandwidth available or you'll endup dropping a lot of frames and the files will be useless.

Before you can start capturing streams you first need to follow the models you want on site and then paste their usernames into the wishlist.txt file, once you have done this you're ready to start main.py

Running & Output
To start capturing streams you need to run python main.py I reccomend you do this in screen as there is no output and it can just be left running in the background. To see what's going on run tail -f output.log

Standard output should look something this when recording streams ..

Code:

17/11/2014 09:37:13 PM INFO:Connecting to https://chaturbate.com/auth/login/
17/11/2014 09:37:13 PM INFO:Starting new HTTPS connection (1): chaturbate.com
17/11/2014 09:37:15 PM INFO:0 Models in the list before checking: []
17/11/2014 09:37:15 PM INFO:Redirecting to https://chaturbate.com/followed-cams/
17/11/2014 09:37:16 PM INFO:[Models_list] 2 models are online: [u'hottminx', u'adryeenmely']
17/11/2014 09:37:16 PM INFO:[Compare_lists] Checking model list:
17/11/2014 09:37:16 PM INFO:[Compare_lists] hottminx is still being recorded
17/11/2014 09:37:16 PM INFO:[Compare_lists] adryeenmely is still being recorded
17/11/2014 09:37:16 PM INFO:[Loop]List of new models for adding: []
17/11/2014 09:37:16 PM INFO:[Select_models] Which models are approved?
17/11/2014 09:37:16 PM WARNING:[Select_models]  No models for approving
17/11/2014 09:37:16 PM INFO:[Loop]Model list after check looks like: 0 models:
 []
 and models currently being recorded are:
 ['adryeenmely', 'hottminx']
17/11/2014 09:37:16 PM INFO:[Sleep] Waiting for next check (45 seconds)

Encoding
Once you've captured some streams you're going to need to convert the audio to have them play nice in vlc, etc. This is where ffmpeg comes in, there is no need to convert the video so this doesn't take too long. To convert individual files do ffmpeg -i input.flv -vcodec copy -acodec libmp3lame output.mp4 this will convert the speex audio to mp3 and change the container to mp4 (stream is h264)

If you want to batch convert your captured streams run find ./ -name '*.flv' -execdir mkdir converted_bates \;; for file in *.flv; do ffmpeg -i "$file" -vcodec copy -acodec libmp3lame "converted_bates/${file%.flv}.mp4"; done from your CaptureBate/Captured/ directory.

If you don't want to do any conversion you can install the speex audio codec which is a huge pain in the ass to get working correctly under linux/vlc.

A project like this needs to have users and as much active development as possible to stay alive, while there are a few other methods to capture streams CaptureBate aims at being a set and forget archiving tool for your favorite models, follow CaptureBate on GitHub and help by sharing anywhere you see fit or fixing any issues that may arise.

Donations. btc: 1EMZSrLCLEoCYZfQ5ZC1Ly4b8HeeYRaWaF

Hi! Can show me details how to chang something in line 79 in modellists.py#L7, and download the link you show how to use it
Thank you!!!!

DefectedToRussia 12-29-2014 01:22 PM

Re: Automated Chaturbate Recording Under Linux


 
Hey this project seems cool! I'm working on a similar project but for windows + mac + android!
Glad to see there's a linux awesome project so that area's covered I just just focus on those three.

I'm having a little issue when I login for mine though. I notice I login through the same url as well, but after successfully logging in I get an error. However I'm feeling like I can mostly ignore it, just so long as its working to log in... But it's kind of annoying and I'd like to get to the bottom of it!

For now to give an update on the app, things are coming along pretty nicely.

TLS is working and I just got it to log in successfully and pass me a valid session id cookie :) You can tell when you're logged in as your password hash shows up in the rtmp info (is one obvious way anyway among others).

However there's an issue, where I get an 403 forbidden error after posting the data for some reason, but it still worked and it successfully logs in. Is this really an error or what is up with that? If I make handle redirects to false, I get a differnent not quite error, 302 found. and it still successfully logs in... Maybe it's better to stop at 302 found then with another instance of the class that has handle redirects enabled continue from there... As it seems handling redirects is neccessary to not to held up, and for things to work!

Successfully logged in with data relevant to being a logged in user rather than just anonymous :D


but that's after this:


I'm going to suppress the errors for sure, but 403 forbidden doesnt seem like something I want to be getting even if it successfully logs in! At least its working though :) But thanks to anyone who can help me get rid of this error!



I know you get csrf token from cookies/hidden field on web page and then you have to post it to the login page as "csrfmiddlewaretoken" along with "username" and "password"... That's simple enough right? Finally you can add at the end of the post data: "&rememberme=on" to get a longer lasting cookie? That's what I think anyway... Seems like that at least!

So what could I be doing wrong If I'm sending the data right... Well because how else would it log in and give me a valid session cookie after sending the post data to do the login process? there's just something miniscule causing an issue.. Thanks!

Farquaad 01-01-2015 01:21 PM

Re: Automated Chaturbate Recording Under Linux


 
nice script working great on my raspberry pi :D

CrazyNash 01-02-2015 01:26 AM

Re: Automated Chaturbate Recording Under Linux


 
Would have only one feature request : the ability to configure a "post process additionnal script" (in the configuration file). Like a regular shell externally provided.
That would allow to make additionnal actions on each file once recorded is ended, for example :
- move the file to another folder (would allow a rsync only on files whom recording is ended)
- start recompress through ffmpeg
- aso

Farquaad 01-02-2015 04:51 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by CrazyNash (Post 72981)
Would have only one feature request : the ability to configure a "post process additionnal script" (in the configuration file). Like a regular shell externally provided.
That would allow to make additionnal actions on each file once recorded is ended, for example :
- move the file to another folder (would allow a rsync only on files whom recording is ended)
- start recompress through ffmpeg
- aso

good ideas

venetroot 01-04-2015 03:19 PM

Re: Automated Chaturbate Recording Under Linux


 
hello

do you know what shall we do when model is constantly getting random disconnention and reconnetion again ?

i didnt test your script but i'd like to know what shall we do when model has a bad connection , cause everytime i test rtmp when either model or CB gets disconnection then rtmp stops recording and i should run rtmp again and start record from scratch and again and when model gets disconnection over to over every 2 minute we have for example: multiple file with 5mb size , what shall we do to tell rtmp to record from pervious recorded file if model gets disconnection ??

i mean we dont like to have multiple 5 file with 6mb ,

how to tell rtmp to record from disconnect session and add data to the FIRST recorded file ??

chocdude90 01-05-2015 02:46 PM

Re: Automated Chaturbate Recording Under Linux


 
Has anyone else problems with 0 byte files?

There is no error shown in outputlog :/

CrazyNash 01-06-2015 10:55 AM

Re: Automated Chaturbate Recording Under Linux


 
As stated a few messages above, those are rtmpdump errors (they are not related in any way to this script).

You can remove in models.py the "--quiet" parameter from the rtmpdump command line in order to see the errors in the log.

I really don't know how to correct those rtmpdump errors (they are "system" related as it works on some unbuntu installations but not on some others), feel free to post it there if you find some day.

chocdude90 01-06-2015 11:40 AM

Re: Automated Chaturbate Recording Under Linux


 
Thanks for the quick reply.
Now i am struggeling with the error
Code:

Connecting ...
INFO: Connected...
ERROR: Closing connection: NetStream.Play.Failed

Even reinstalling everything did not help. What a crap ^^


All times are GMT -6. The time now is 08:48 AM.