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)

ohhdemgirls 11-17-2014 03:55 PM

Automated Chaturbate Recording Under Linux


 
1 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/
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

banditnew 11-22-2014 09:53 AM

Re: Automated Chaturbate Recording Under Linux


 
File "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

ohhdemgirls 11-22-2014 10:10 AM

Re: Automated Chaturbate Recording Under Linux


 
Do sudo apt-get install python-urllib3

banditnew 11-22-2014 10:21 AM

Re: Automated Chaturbate Recording Under Linux


 
python-urllib3 is already the newest version.

but not working

ohhdemgirls 11-22-2014 02:25 PM

Re: Automated Chaturbate Recording Under Linux


 
You'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

coalmorning 11-23-2014 06:37 PM

Re: Automated Chaturbate Recording Under Linux


 
Great 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)
23/11/2014 02:56:28 PM INFO:Connecting to https://chaturbate.com/auth/login/
23/11/2014 02:56:28 PM INFO:Starting new HTTPS connection (1): chaturbate.com
23/11/2014 02:56:29 PM INFO:3 Models in the list before checking: [u'********', u'********', u'********']
23/11/2014 02:56:29 PM INFO:Redirecting to https://chaturbate.com/followed-cams/
23/11/2014 02:56:30 PM WARNING:******** model is now in private mode
23/11/2014 02:56:30 PM INFO:[Models_list] 3 models are online: [u'********', u'********', u'********']
23/11/2014 02:56:30 PM INFO:[Compare_lists] Checking model list:
23/11/2014 02:56:30 PM INFO:[Loop]List of new models for adding: [u'********', u'********', u'********']
23/11/2014 02:56:30 PM INFO:[Select_models] Which models are approved?
23/11/2014 02:56:30 PM INFO:[Select_models] ******** is approved
23/11/2014 02:56:30 PM INFO:[Select_models] ******** is approved
23/11/2014 02:56:30 PM INFO:[Get_links] ********.sh is created
23/11/2014 02:56:31 PM INFO:[Get_links] ********.sh is created
23/11/2014 02:56:31 PM INFO:[Run_scripts] Running scripts:
23/11/2014 02:56:31 PM INFO:[Run_scripts] Run: ********.sh
23/11/2014 02:56:31 PM INFO:[Run_scripts] Run: ********.sh
23/11/2014 02:56:31 PM INFO:[Loop]Model list after check looks like: 3 models:
 [u'********', u'********', u'********']
 and models currently being recorded are:
 []
23/11/2014 02:56:31 PM INFO:[Sleep] Waiting for next check (45 seconds)


ohhdemgirls 11-23-2014 06:45 PM

Re: Automated Chaturbate Recording Under Linux


 
I'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.

coalmorning 11-23-2014 07:04 PM

Re: Automated Chaturbate Recording Under Linux


 
Thanks 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.

ohhdemgirls 11-23-2014 07:08 PM

Re: Automated Chaturbate Recording Under Linux


 
Under Debian 7 (x64) I've just done (as root)

Code:

git clone https://github.com/BurntSushi/rtmpdump-ksv
cd rtmpdump-ksv
make
make install
cp librtmp/librtmp.so.1 /usr/lib

Had zero issues with that.

$ make SYS=darwin is recommended in linux/unix environments but I've never needed it.

coalmorning 11-23-2014 08:11 PM

Re: Automated Chaturbate Recording Under Linux


 
I 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.

ohhdemgirls 11-23-2014 09:21 PM

Re: Automated Chaturbate Recording Under Linux


 
No 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.

zimpko 11-28-2014 05:21 PM

Re: Automated Chaturbate Recording Under Linux


 
I 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.
  1. Is flash broken on the latest Fedora? I created a Fedora VM with the latest release, and it will not play FLV files. I tried installing about every dependcy, and flash package, and it just won’t play flash. It will, however play flash in a browser, just not a saved stream flv file with either VLC or Totem. Flash plays fine in Ubuntu or Mint FYI.
  2. I created and installed Capturebate on a VirtualBox and VMWare VM. It works in the VM’s however it will not record streams unless you create a folder outside of the CaburBate directory and configure it to record to that directory. Is this possibly a bug related to VM’s?
  3. I’m not sure if I’m running the FFMPEG script right, though after running the posted batch mode command, it creates a bunch of small MP4 files in a separate folder, and when clicked they report an error reading “no playable streams”.
  4. Is it normal to have streams split into separate recordings? I find a lot of streams break during recording, then start a new recording, even though it doesn't appear the models have gone off air or into private. Is there a way to prevent streams from breaking so they can record in one single file?
  5. Would it make any difference in performance by using this version of RTMPDUMP? http://stream-recorder.com/forum/cus...le-t16103.html
  6. What command do you use so GNU screen will start main.py and the output log in one window?
  7. Feature request. Would it be possible to add a stream limit and priority system. Capturbate can easily burn through someone’s allotted bandwidth if they’re capped by their ISP or degrade a person’s QoS, so it would be great to have it limit how many streams it can record at one time.

    For example, have it so you can set a limited number of streams from your wishlist, then be capable of prioritizing it by adding asterisks next to a models name. The more asterisks next to a name, the higher the priority.

Thanks for the development of a handy app.

ohhdemgirls 11-29-2014 03:54 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by zimpko (Post 72369)
I 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.
  1. Is flash broken on the latest Fedora? I created a Fedora VM with the latest release, and it will not play FLV files. I tried installing about every dependcy, and flash package, and it just won’t play flash. It will, however play flash in a browser, just not a saved stream flv file with either VLC or Totem. Flash plays fine in Ubuntu or Mint FYI.
  2. I created and installed Capturebate on a VirtualBox and VMWare VM. It works in the VM’s however it will not record streams unless you create a folder outside of the CaburBate directory and configure it to record to that directory. Is this possibly a bug related to VM’s?
  3. I’m not sure if I’m running the FFMPEG script right, though after running the posted batch mode command, it creates a bunch of small MP4 files in a separate folder, and when clicked they report an error reading “no playable streams”.
  4. Is it normal to have streams split into separate recordings? I find a lot of streams break during recording, then start a new recording, even though it doesn't appear the models have gone off air or into private. Is there a way to prevent streams from breaking so they can record in one single file?
  5. Would it make any difference in performance by using this version of RTMPDUMP? http://stream-recorder.com/forum/cus...le-t16103.html
  6. What command do you use so GNU screen will start main.py and the output log in one window?
  7. Feature request. Would it be possible to add a stream limit and priority system. Capturbate can easily burn through someone’s allotted bandwidth if they’re capped by their ISP or degrade a person’s QoS, so it would be great to have it limit how many streams it can record at one time.

    For example, have it so you can set a limited number of streams from your wishlist, then be capable of prioritizing it by adding asterisks next to a models name. The more asterisks next to a name, the higher the priority.
  1. Thanks for the development of a handy app.

  1. No idea, I've never used Fedora.
  2. Kind of a known bug, environment variables throw it off, it is recommenced you set your Capture directory manually and give a full path.
  3. Nothing wrong with the command, put it in a bash file and make sure you don't have any extra characters etc. also ffmpeg should be compiled with support for libmp3lame & libspeex
  4. Yes, kinda. This is due to the models dropping offline or going in private, even for a second this will split the stream, you can't overcome this with the rtmpdump method but you can fix it in post by merging your converted mp4s
  5. That is the version recommended in my original post and on the repo.
  6. Run main.py in screen, disconnect and then tail the output.log .. that is simple enough.
  7. I won't be adding any limitations to CaptureBate, I run it on servers with 10GBit+ links and capture all models .. it's waste of time for me to add limitations, if you don't have the bandwidth at home you can get a vps/dedi crazy cheap these days which is highly recommended.

zugg 11-30-2014 03:30 AM

Re: Automated Chaturbate Recording Under Linux


 
I 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.

str3amer 11-30-2014 02:20 PM

Re: Automated Chaturbate Recording Under Linux


 
Hey,

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!

flipper2011 12-07-2014 09:38 PM

Re: Automated Chaturbate Recording Under Linux


 
There 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
Traceback (most recent call last):
  File "main.py", line 34, in <module>
    client = connection.Connection()
  File "/root/Apps/Captureb/connection.py", line 40, in Connection
    page_source = 'Page Source for ' + URL + '\n' + r.text
UnboundLocalError: local variable 'r' referenced before assignment
root@debian:~/Apps/Captureb#

OUTPUT.LOG follows
Code:

07/12/2014 11:22:16 PM INFO:[Sleep] Waiting for next check (80 seconds)
07/12/2014 11:23:36 PM INFO:Connecting to https://chaturbate.com/auth/login/
07/12/2014 11:23:36 PM INFO:Starting new HTTPS connection (1): chaturbate.com
07/12/2014 11:24:03 PM ERROR:Some error during posting to https://chaturbate.com/auth/login/
07/12/2014 11:24:03 PM ERROR:('Connection aborted.', BadStatusLine("''",))


zugg 12-08-2014 03:18 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by flipper2011 (Post 72517)
There 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
Traceback (most recent call last):
  File "main.py", line 34, in <module>
    client = connection.Connection()
  File "/root/Apps/Captureb/connection.py", line 40, in Connection
    page_source = 'Page Source for ' + URL + '\n' + r.text
UnboundLocalError: local variable 'r' referenced before assignment
root@debian:~/Apps/Captureb#

OUTPUT.LOG follows
Code:

07/12/2014 11:22:16 PM INFO:[Sleep] Waiting for next check (80 seconds)
07/12/2014 11:23:36 PM INFO:Connecting to https://chaturbate.com/auth/login/
07/12/2014 11:23:36 PM INFO:Starting new HTTPS connection (1): chaturbate.com
07/12/2014 11:24:03 PM ERROR:Some error during posting to https://chaturbate.com/auth/login/
07/12/2014 11:24:03 PM ERROR:('Connection aborted.', BadStatusLine("''",))


I have this as well every few days.

I just use supervisord now.

betoso01 12-08-2014 09:26 AM

Re: Automated Chaturbate Recording Under Linux


 
Hi. 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?

flipper2011 12-08-2014 05:48 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by zugg (Post 72522)
I have this as well every few days.

I just use supervisord now.

Would you be so kind and explain EXACTLY how to use this, i'm new to Linux and read a little about it, but not sure how to implement this for this specific application. Can you give me a short tutorial how to do it.

Thanks!!

zugg 12-08-2014 11:40 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by flipper2011 (Post 72537)
Would you be so kind and explain EXACTLY how to use this, i'm new to Linux and read a little about it, but not sure how to implement this for this specific application. Can you give me a short tutorial how to do it.

Thanks!!

Debian / Ubuntu:
Code:

sudo apt-get update
sudo apt-get install supervisor

sudo nano /etc/supervisor/conf.d/capturbate.conf

Code:

[program:capturebate]
directory=/home/deploy/CaptureBate
command=python /home/deploy/CaptureBate/main.py
autostart=true
autorestart=true
stderr_logfile=/var/log/capturbate.err.log
stdout_logfile=/var/log/capturbate.out.log

Change the directory and command directory to where your directory is.

Then run:
Code:

sudo supervisorctl reread
Should tell you that all is fine.

Then run:

Code:

sudo supervisorctl update
And it should be started, to check run:

Code:

sudo supervisorctl
And it should output something like:
Code:

capturebate                      RUNNING    pid 24295, uptime 0:01:46

flipper2011 12-09-2014 05:54 AM

Re: Automated Chaturbate Recording Under Linux


 
Thank you I will try it tonight!

Quote:

Originally Posted by zugg (Post 72541)
Debian / Ubuntu:
Code:

sudo apt-get update
sudo apt-get install supervisor

sudo nano /etc/supervisor/conf.d/capturbate.conf

Code:

[program:capturebate]
directory=/home/deploy/CaptureBate
command=python /home/deploy/CaptureBate/main.py
autostart=true
autorestart=true
stderr_logfile=/var/log/capturbate.err.log
stdout_logfile=/var/log/capturbate.out.log

Change the directory and command directory to where your directory is.

Then run:
Code:

sudo supervisorctl reread
Should tell you that all is fine.

Then run:

Code:

sudo supervisorctl update
And it should be started, to check run:

Code:

sudo supervisorctl
And it should output something like:
Code:

capturebate                      RUNNING    pid 24295, uptime 0:01:46


flipper2011 12-09-2014 06:00 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by flipper2011 (Post 72543)
Thank you I will try it tonight!

Note: im running as root and I didn't need to do sudo but everything else was followed but I got this:

Everything was perfect until the last step, supervisorctl

Code:

root@debian:~/Apps/Captureb# supervisorctl
capturebate                      FATAL      Exited too quickly (process log may have details)


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)
2014-12-09 19:51:20,835 INFO RPC interface 'supervisor' initialized
2014-12-09 19:51:20,835 WARN cElementTree not installed, using slower XML parser for XML-RPC
2014-12-09 19:51:20,835 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-12-09 19:51:20,837 INFO daemonizing the supervisord process
2014-12-09 19:51:20,838 INFO supervisord started with pid 19621
2014-12-09 19:55:48,756 INFO spawned: 'capturebate' with pid 19677
2014-12-09 19:55:49,142 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:50,145 INFO spawned: 'capturebate' with pid 19679
2014-12-09 19:55:50,149 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:52,153 INFO spawned: 'capturebate' with pid 19680
2014-12-09 19:55:52,157 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:55,163 INFO spawned: 'capturebate' with pid 19681
2014-12-09 19:55:55,168 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:56,169 INFO gave up: capturebate entered FATAL state, too many start retries too quickly


zugg 12-10-2014 04:17 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by flipper2011 (Post 72560)
Note: im running as root and I didn't need to do sudo but everything else was followed but I got this:

Everything was perfect until the last step, supervisorctl

Code:

root@debian:~/Apps/Captureb# supervisorctl
capturebate                      FATAL      Exited too quickly (process log may have details)


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)
2014-12-09 19:51:20,835 INFO RPC interface 'supervisor' initialized
2014-12-09 19:51:20,835 WARN cElementTree not installed, using slower XML parser for XML-RPC
2014-12-09 19:51:20,835 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-12-09 19:51:20,837 INFO daemonizing the supervisord process
2014-12-09 19:51:20,838 INFO supervisord started with pid 19621
2014-12-09 19:55:48,756 INFO spawned: 'capturebate' with pid 19677
2014-12-09 19:55:49,142 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:50,145 INFO spawned: 'capturebate' with pid 19679
2014-12-09 19:55:50,149 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:52,153 INFO spawned: 'capturebate' with pid 19680
2014-12-09 19:55:52,157 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:55,163 INFO spawned: 'capturebate' with pid 19681
2014-12-09 19:55:55,168 INFO exited: capturebate (exit status 127; not expected)
2014-12-09 19:55:56,169 INFO gave up: capturebate entered FATAL state, too many start retries too quickly


Did:
Code:

sudo supervisorctl reread
show that everything was fine?

And:
Code:

sudo supervisorctl update
Was ran?

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
Should fix it for Debian.

flipper2011 12-11-2014 04:13 PM

Re: Automated Chaturbate Recording Under Linux


 
It 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:

Originally Posted by zugg (Post 72566)
Did:
Code:

sudo supervisorctl reread
show that everything was fine?

And:
Code:

sudo supervisorctl update
Was ran?

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
Should fix it for Debian.


zugg 12-11-2014 05:55 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by flipper2011 (Post 72585)
It 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

No probs, I run it with Ubuntu 14.04.1LTS and all works well :).

flipper2011 12-11-2014 10:29 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by zugg (Post 72586)
No probs, I run it with Ubuntu 14.04.1LTS and all works well :).

Since you seem to have all the answers :) can you give me EXACT instructions to get FFMPEG to work - no matter what I try it doesn't work (so I can't use this VM to convert). I just copy the files to my Windows session and manually do it, but if I can get FFMPEG to work correctly, it would help

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.

zugg 12-15-2014 03:45 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by flipper2011 (Post 72588)
Since you seem to have all the answers :) can you give me EXACT instructions to get FFMPEG to work - no matter what I try it doesn't work (so I can't use this VM to convert). I just copy the files to my Windows session and manually do it, but if I can get FFMPEG to work correctly, it would help

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.

Here is my Dockerfile, which I use for Ubuntu 14.04, which you can draw from: https://github.com/zugg/capturbate-d...ter/Dockerfile

Also, not sure how to stop, as it would just resume recording them as they are on your wishlist.

CrazyNash 12-21-2014 04:43 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by coalmorning (Post 72257)
I 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.

I have the exact same problem : no recording.
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).

zugg 12-22-2014 05:26 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by CrazyNash (Post 72776)
I have the exact same problem : no recording.
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).

Are you banned from Chaturbate's rtmp servers maybe?

CrazyNash 12-23-2014 01:27 AM

Re: Automated Chaturbate Recording Under Linux


 
I 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) ?

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 09:02 AM.