Automated Chaturbate Recording Under Linux1 Attachment(s)
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/ 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 |
Re: Automated Chaturbate Recording Under LinuxFile "main.py", line 6, in <module>
import connection File "/home/banditnew/Programs/CaptureBate-master/connection.py", line 7, in <module> from MyAdapter import MyAdapter File "/home/banditnew/Programs/CaptureBate-master/MyAdapter.py", line 2, in <module> from requests.packages.urllib3.poolmanager import PoolManager ImportError: No module named packages.urllib3.poolmanager i have this error |
Re: Automated Chaturbate Recording Under LinuxDo sudo apt-get install python-urllib3
|
Re: Automated Chaturbate Recording Under Linuxpython-urllib3 is already the newest version.
but not working |
Re: Automated Chaturbate Recording Under LinuxYou're using ubuntu aren't you? .. yeah, dump that run Debian 7 as recommended and tested in, I can't offer support for all other variants or I'd be doing so forever, Debian 7 is testing with the minimum requirements listed.
You can overcome this issue by replacing from requests.packages.urllib3.poolmanager import PoolManager with from urllib3.poolmanager import PoolManager in MyAdapter.py#L2 |
Re: Automated Chaturbate Recording Under LinuxGreat job on this, works fantastic. Gotta a problem though.
I can’t get it to work in Debian 7. It simply will not record in Debian. Maybe I set my environment up wrong or theres something wrong with flash in Debian 7 latest release. I'm testing it in a Debian 7 virtual machine, using the latest Debian release. The scripts run without error, however it won't record. I tested rtmpdump recording a different network stream, and it worked fine, though flash video only plays back audio, and no vidoe is showing. Does flash work in the latest Debian? I got this to work in Ubunut, and it worked fine, just not having luck in Debian. Any suggestion on what I might be instaling wrong. I posted some log output below, models names replaced with asterisks. Code:
23/11/2014 02:55:43 PM INFO:[Sleep] Waiting for next check (45 seconds) |
Re: Automated Chaturbate Recording Under LinuxI've had zero issues working on Debian 7 (x64) fresh install on a digital ocean droplet, with just the 2 actual dependencies installed (beautifulsoup4/rtmpdump-ksv)
It seems most users have the issues of librtmp.so.1 not being in the right place, this is fixed with sudo cp rtmpdump-ksv-ksv/librtmp/librtmp.so.1 /usr/lib or they messed up their password hash when copying / escaping characters which causes rtmpdump to exist instantly. |
Re: Automated Chaturbate Recording Under LinuxThanks for that quick reply.
Can you reccomend the proper method to install rtmpdump-ksv. The method I use is as follows, which might be my initial problem... git clone https://github.com/BurntSushi/rtmpdump-ksv.git open terminal in rtmpdump-ksv directory, and run command... make SYS=posix make install i've installed using the command above and tried others as well such as... make install and... make sudo make install prefix=/usr Thanks for the help. |
Re: Automated Chaturbate Recording Under LinuxUnder Debian 7 (x64) I've just done (as root)
Code:
git clone https://github.com/BurntSushi/rtmpdump-ksv $ make SYS=darwin is recommended in linux/unix environments but I've never needed it. |
Re: Automated Chaturbate Recording Under LinuxI cloned rtmpdump as root, which cloned to my home directory. Then installed as you posted. I ensured librtmp.so.1 was in /usr/lib, which it was, and ran the program, it still did'nt record. I then copied over librtmp.so and librtmp.3 to /usr/lib just to see if that did anythin, and nothing recored.
I got this working on Ubuntu, so I'm certain my pass and hash is correct, but just having no luck with Debian. Any other possible suggestions to try. Thnaks again for the help. |
Re: Automated Chaturbate Recording Under LinuxNo idea then, those are the only two issues that have cropped up. The only other thing I can suggest is that you actually set a full directory for capturing too, like /home/user/CaptureBate/Captured in config.conf sometimes environment variables can throw that off, though if you can cap in Ubuntu just stick to what works, I just don't support everything. People have even asked me how to get it running in windows :confused: nope!! haha.
|
Re: Automated Chaturbate Recording Under LinuxI have some questions hopefully you can answer when you have the time. Maybe this can also help others as a Q&A should they have similar questions.
Thanks for the development of a handy app. |
Re: Automated Chaturbate Recording Under LinuxQuote:
|
Re: Automated Chaturbate Recording Under LinuxI wanted to do something like this at the end of the year, so this is perfect.
I'm going to help contribute back - my python is a little rusty but if you have anything you need done create an issue and I'll look into it. I'm currently looking into making this easier to install, even though it's pretty straightforward already. Awesome job. |
Re: Automated Chaturbate Recording Under LinuxHey,
thank you very much for this script, this makes things so much easier! The problem is: Im a linux noob. I have no idea how to do this, and every tutorial just confuses me even more. I installed debian 7.7.0 (amd64) on Oracle VM VirtualBox, downloaded all the required programms and changed the password in modellist.py Now I'm completely lost. How exactly do I start main.py? I tried it via the Terminal and the Roottermial without any luck. When double clicking and click "run in Terminal" I get: "/home/username/Downloads/CaptureBate-master/main.py: 3: /home/username/Downloads/CaptureBate-master/main.py: Main file that includes all functions in appropriate order: not found from: can't read /var/mail/config from: can't read/var/mail/time" Please, any help for a Linux-Noob? :) Thanks in advance! |
Re: Automated Chaturbate Recording Under LinuxThere is a problem that started occurring today, this happened twice.. Is there a way to trap this so the script retires? Not really a Linux guru.. it defeats the "set it and forget it" because when it crashes/errors out it STOPS. The following is the error that occurs and the output file info
Error itself Code:
oot@debian:~/Apps/Captureb# python main.py Code:
07/12/2014 11:22:16 PM INFO:[Sleep] Waiting for next check (80 seconds) |
Re: Automated Chaturbate Recording Under LinuxQuote:
I just use supervisord now. |
Re: Automated Chaturbate Recording Under LinuxHi. Is it possible to adapt your program to automated record naked . c0m? I want to write my own program in java to automated record chatur@bt3 and your code show me how to do it. I just want to know if its possible, using the same approach, do the same with naked?
|
Re: Automated Chaturbate Recording Under LinuxQuote:
Thanks!! |
Re: Automated Chaturbate Recording Under LinuxQuote:
Code:
sudo apt-get update Code:
[program:capturebate] Then run: Code:
sudo supervisorctl reread Then run: Code:
sudo supervisorctl update Code:
sudo supervisorctl Code:
capturebate RUNNING pid 24295, uptime 0:01:46 |
Re: Automated Chaturbate Recording Under LinuxThank you I will try it tonight!
Quote:
|
Re: Automated Chaturbate Recording Under LinuxQuote:
Everything was perfect until the last step, supervisorctl Code:
root@debian:~/Apps/Captureb# supervisorctl This is the log file it created: Code:
2014-12-09 19:51:20,788 CRIT Supervisor running as root (no user in config file) |
Re: Automated Chaturbate Recording Under LinuxQuote:
Code:
sudo supervisorctl reread And: Code:
sudo supervisorctl update I don't run capturbate as root, I run it as a user, you may want to try that. Otherwise, edit /etc/supervisor/supervisord.conf and add loglevel=debug to the [supervisord] section. P.S: To get rid of the warning about CElementtree: Code:
sudo apt-get install python2.6-celementtree |
Re: Automated Chaturbate Recording Under LinuxIt didn't work in debian 7 as root but then I tried to do it as normal user but it didn't work correctly and I ended up switching to Mint 17.1 and it worked flawlessly as a user. THANKS
Quote:
|
Re: Automated Chaturbate Recording Under LinuxQuote:
|
Re: Automated Chaturbate Recording Under LinuxQuote:
Also, unrelated, is there a simple way to STOP recording someones cam (after it already is started). I was recording someone that was on all day and it was more or less a waste of 4gig's of space so I wanted to abort the cam recording, but ended up just restarting mint and that worked. |
Re: Automated Chaturbate Recording Under LinuxQuote:
Also, not sure how to stop, as it would just resume recording them as they are on your wishlist. |
Re: Automated Chaturbate Recording Under LinuxQuote:
Regarding github issues, same problem than the issue #8 "0 byte files" (all files have a size of 0). Removing the "--quiet" option in models.py gives me the error : "ERROR: RTMP_Connect0, failed to connect socket. 111 (Connection refused)". I *do* have installed the KSV patch (in /usr/bin). I've either git cloned the KSV repository and too tryed to git clone the ffmpeg original rtmpdump repository then apply the KSV Patch.diff file before compiling : still the same problem (Connection refused). I really don't see what i'm missing ... I'm running Ubuntu but as far as i can tell it should be irrelevant for this issue ... It is a rtmpdump issue, of course, but if anyone would have a solution, i would be grateful. Thanks anyway for this script that seems to be very well done (so bad the recording doesn't work for the now). |
Re: Automated Chaturbate Recording Under LinuxQuote:
|
Re: Automated Chaturbate Recording Under LinuxI don't think i'm banned. How could i check that ? The site works fine in any browser.
In the meanwhile, i installed the exact same packages on another computer (hosted online server), still on ubuntu (but 14.02 this time) and there everything works (exact same rtmpdump KSV version). My local ubuntu is an old homemade-NAS running Ubuntu 12.04. rtmpdump doesn't seem to have a lot of dependencies (libc and librtmp), so it's a bit weird. The other difference is that my old precise ubuntu is running "at home" whereas the newer one is running directly online : could it be a network issue (port blocked by router / cable box) ? |
Re: Automated Chaturbate Recording Under LinuxQuote:
It was good for 3 weeks but I keep getting this, I also can connect from any browser. |
Re: Automated Chaturbate Recording Under LinuxQuote:
Thank you!!!! |
Re: Automated Chaturbate Recording Under LinuxHey 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! |
Re: Automated Chaturbate Recording Under Linuxnice script working great on my raspberry pi :D
|
Re: Automated Chaturbate Recording Under LinuxWould 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 |
Re: Automated Chaturbate Recording Under LinuxQuote:
|
Re: Automated Chaturbate Recording Under Linuxhello
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 ?? |
Re: Automated Chaturbate Recording Under LinuxHas anyone else problems with 0 byte files?
There is no error shown in outputlog :/ |
Re: Automated Chaturbate Recording Under LinuxAs 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. |
Re: Automated Chaturbate Recording Under LinuxThanks for the quick reply.
Now i am struggeling with the error Code:
Connecting ... |
All times are GMT -6. The time now is 09:02 AM. |