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)

gdunc 08-22-2015 07:32 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by dealercohagen (Post 79071)
It worked for me, not sure it will work for you.

Hi dealercohagen, I'm getting the exact same problem on two different systems, 8.1Pro x64 and 8.1Pro x86, (the x86 is a new install).

Followed your instructions but when run I'm getting the same 0 byte files musterman gets, although in my case it correctly sees which models are online rather than all.

Turned on debugging and the following error is being returned by RTMPDUMP:

INFO: Connected
ERROR: Closing connection: Netstream.Play.Failed

This seems to be a problem with the args passed to RTMPDUMP as doing an anonymous capture from the CLI works fine.

Is there some way I can get the RTMPDUMP command and args being used?

dealercohagen 08-28-2015 06:07 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by gdunc (Post 79151)
Hi dealercohagen, I'm getting the exact same problem on two different systems, 8.1Pro x64 and 8.1Pro x86, (the x86 is a new install).

Followed your instructions but when run I'm getting the same 0 byte files musterman gets, although in my case it correctly sees which models are online rather than all.

Turned on debugging and the following error is being returned by RTMPDUMP:

INFO: Connected
ERROR: Closing connection: Netstream.Play.Failed

This seems to be a problem with the args passed to RTMPDUMP as doing an anonymous capture from the CLI works fine.

Is there some way I can get the RTMPDUMP command and args being used?

I stopped using using capturebate-node a while ago because it only worked for a few hours and then I would always get connection timed out and it stopped capturing models. I switched to the fork version and it's works much better than the node version, I had it running for 3 days without a problem.

I try the node version today and for some reason now I'm getting the exact same problem as you, not sure what happened but It was the first time and now it's not anymore, I suggest you try the fork version, It worked on two system running win 10 pro x86 and x64.

gdunc 09-01-2015 05:52 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by dealercohagen (Post 79314)
I suggest you try the fork version ...

OK thanks, I'll set it up in a VM then move it to the RasPi when I've got it running.

CrazyNash 09-25-2015 07:28 AM

Re: Automated Chaturbate Recording Under Linux


 
Ok just to let you know - i used that script for a while, but there were quite a lot of problems with it in my opinion.
- main script got stuck from time to time (had to write a "check.sh" to analyze logs and restart it if nothing outputed for a few minutes ...)
- main script got internal weird python errors about variables not anymore recognized (?!)
- must "follow" the models (which is really a pain as it leads to login troubles thereafter)
- very difficult to make any evolutions on my side (as written in python, which i'm not fan of)
- not very robust (checking the 14th or 15th column of a "ps" for example)

As correcting all this would have been quite a hassle for me (again, i dont know python and i'm really not interested by this language), i've rewritten the whole thing and now i have a solution who (for me at least) works really better.

I have two Docker containers.
The first one "rips" the videos.
The second one re-encodes them from .flv to .mp4 (just the audio, see below).

The "ripper" Docker container is a java process which allows :
- to publish (very basic, but enough for me) web pages to administrate the wishlist online (subscribe / unsubscribe), check what is and what has been recorded, cancel a recording, ... (wishlist.txt is still editable on the disk but it's easier to just use the basic web pages)
- to have a robust internal behavior ("0 file size" (which occurs really less now) are checked in the background for example)
- to check several URLs and on several sub-pages (no need to follom models) (checking 10 pages takes less than 1 sec. on my core i3)
- to move (if configured) the downloaded files to another folder
- to have an easy-to-modify file pattern (destination, filename structure, date pattern)
- to work either as a daemon, either on demand
- ...







Quote:

09:48:31.683 [THREAD-MAIN] INFO ********.rip.plugins.cb.CBRipper - Configuration : CBRipperConfiguration : connectionTimeout [5000ms], daemonMode [true], downloadedPath [downloaded], downloadingPath [downloading], filenameDateTimePattern [YYYY-MM-dd_HH-mm], filenamePattern [${model}_${date}.flv], onlineModelsURL [https://chaturbate.com/female-cams/,.../couple-cams/], onlineModelsURLPageCount [5], password [******], processedPath [processed], processingPath [processing], rtmpBinary [/opt/rtmpdump-ksv/rtmpdump], token [*****], username [*****], waitTimeout [45000ms], wishlistFileName [/downloads/cb/wishlist.txt]
The "converter" Docker container is just a wrapper around ffmpeg (built with libspleex) (real ffmpeg, and not avconv) with the following conversion in a "while [ true ]" shell loop :
Quote:

< /dev/null ffmpeg -threads 2 -i "$INPUT" -c copy -acodec mp3 "$OUTPUT" > ffmpeg.log 2>&1
(may seems quite simple but took me awhile to have this running, as before Dockerizing this part, i had a very old avconv binary)

The folders organization is as follow :

"ripper" container
- download files under "downloading/"
- move them once finished under "downloaded/"

"converter" container
- move files from "downloaded/" to "converting/"
- mode them once finished under "converted/"

Additionnally, a "syncing" operation transfers everything from my server to my NAS :
- move files from "converted/" to "syncing/"
- deletes them if transfer has been successful

That way i never have any "synchronisation" problem between files and folders (every step has its own input and output folder).

coalmorning 09-26-2015 03:32 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by CrazyNash (Post 80086)
Ok just to let you know - i used that script for a while, but there were quite a lot of problems with it in my opinion.

I've used this script since it was first posted, and it's worked flawlessly for me. The one problem I had was getting RTMPDump set properly.

I have the script configured on a Linux Peppermint virtual machine. No problems whatsoever, except for the 0kb files that appear when a model goes into a private show, other than that, flawess operation.

The only gripe I have is how the files are named, which ruin the ability to sort by model name.

The files should be named as followed... [model][date][time]
theres really no need to have Chaturbate in the file name either.

bhuwanchander 09-27-2015 03:28 PM

Re: Automated Chaturbate Recording Under Linux


 
Thank you c4170001 for recommending http://googgl.me/12raC , its really hassle free, works in Windows without customization and doesn't generate a new file every minute, as it was earlier. I am not sure about Linux, because I never used Linus in my lifetime. But about windows its working fine. thank you again c4170001 for your help.

gdunc 09-28-2015 02:00 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by CrazyNash (Post 80086)
- must "follow" the models (which is really a pain as it leads to login troubles thereafter)

FWIW, the forked version of Capturebate doesn't need a valid login/password, just the names of the models in the wishlist.txt file - something I only discovered a couple of days ago.

The forked version uses livestreamer for the capture of the m3u8 feed so you end up with an AVC/AAC mp4 file.
The only problem with this is that Vegas won't load these files unless it's been remuxed by ffmpeg using the -bsf:a aac_adtstoasc parameter to correct the audio, this sometimes results in the audio being out of sync which can be a PITA to fix.

Will you be releasing your Docker containers?

gdunc 10-04-2015 01:18 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by coalmorning (Post 80101)
The only gripe I have is how the files are named, which ruin the ability to sort by model name.

In modellists.py change the following line:

Code:

flinks.write('%(rtmp_bin)s --quiet --live --rtmp "rtmp://%(stream_server)s/live-edge" --pageUrl "http://chaturbate.com/%(model_name)s" --conn S:%(username)s --conn S:%(model_name)s --conn S:%(flash_ver)s --conn S:%(pw_hash)s --token "m9z#$dO0qe34Rxe@sMYxx" --playpath "playpath" --flv "%(video_folder)s/Chaturbate_%(date_string)s_%(model_name)s.flv"' % form_dict)
To:

Code:

flinks.write('%(rtmp_bin)s --quiet --live --rtmp "rtmp://%(stream_server)s/live-edge" --pageUrl "http://chaturbate.com/%(model_name)s" --conn S:%(username)s --conn S:%(model_name)s --conn S:%(flash_ver)s --conn S:%(pw_hash)s --token "m9z#$dO0qe34Rxe@sMYxx" --playpath "playpath" --flv "%(video_folder)s/%(model_name)s_%(date_string)s.flv"' % form_dict)

coolman_ 10-08-2015 02:38 AM

Re: Automated Chaturbate Recording Under Linux


 
Hi!

I have a problem with rtmpdump on Linux (debian 8 on raspberry).
I use rtmpdump (KSV version) on both Windows and Linux. On Windows, that works just fine but on Linux, I always get that error :
Quote:

ERROR: Closing connection: Netstream.Play.Failed
Here's the command line:
Quote:

./rtmpdump -v -r "rtmp://edge13-b.stream.highwebmedia.com/live-edge" -p "http://chaturbate.com/model" -C S:mynickname -C S:model -C S:2.646 -C S:pbkdf2_sha256$PASSHASH -y "playpath" -o "test.flv"
Thank you!

gdunc 10-12-2015 09:29 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by coolman_ (Post 80390)
I have a problem with rtmpdump on Linux (debian 8 on raspberry).

More information required:
RasPi v1 or v2 (they use different SoCs) ?
Precompiled rtmpdump (with KSV patches) or did you compile it yourself?

pro88 10-25-2015 01:44 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by CrazyNash (Post 80086)
Ok just to let you know - i used that script for a while, but there were quite a lot of problems with it in my opinion.

CrazyNash - Is there any chance you could provide your scripts mate?

beneton2003 10-26-2015 05:04 AM

Re: Automated Chaturbate Recording Under Linux


 
both variations python version as well as javascript version works fine, but i like js version bcs no troulbes with whitelists.txt, thanks a lot for authors

pro88 11-03-2015 10:25 AM

Re: Automated Chaturbate Recording Under Linux


 
Using the Javascript version and hit a brick wall. Any help would be appreciated in how to track this error down.


pi@raspberrypi ~/capturebate-node $ sudo node main.js
[2015-11-03T052111] capturebate-node started
[2015-11-03T052131] texas_blonde is now online, starting rtmpdump process
[2015-11-03T052131] milliemartins is now online, starting rtmpdump process

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1000:11)
at Process.ChildProcess._handle.onexit (child_process.js:791:34)
pi@raspberrypi ~/capturebate-node $

pro88 11-03-2015 11:24 PM

Re: Automated Chaturbate Recording Under Linux


 
Making progress. Reinstalled rtpmdump and now have the following error.

Unhandled rejection TypeError: Object #<Object> has no method 'statsAsync'
at /home/pi/capturebate-node/main.js:45:13


It seems Node doesn't appear to support fs.statsAsync, only fs.statAsync.. but that doesn't work either (NetStream.Play.Failed)!

c4170001 11-04-2015 04:37 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by pro88 (Post 80927)
Making progress. Reinstalled rtpmdump and now have the following error.

Unhandled rejection TypeError: Object #<Object> has no method 'statsAsync'
at /home/pi/capturebate-node/main.js:45:13


It seems Node doesn't appear to support fs.statsAsync, only fs.statAsync.. but that doesn't work either (NetStream.Play.Failed)!

Are you using Node 4.0? After installing all the requirements, it should work straight away. That's the only thing that comes to mind.

pro88 11-06-2015 07:13 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by c4170001 (Post 80940)
Are you using Node 4.0? After installing all the requirements, it should work straight away. That's the only thing that comes to mind.

Yes 4.2.1.

I've decided to use an older version of capturebate-node from the repository - which is allowing further progress but rtmpdump is failing with the following error:
DEBUG: Property: <Name: level, STRING: error>
DEBUG: Property: <Name: code, STRING: NetStream.Play.Failed>
DEBUG: Property: <Name: description, STRING: security>
DEBUG: Property: <Name: clientid, NUMBER: 940681682.00>

I've tried installing both precompiled rtmpdump (ksv) and patching the main rtmpdump version - and both have the security error.

Really stuck on this one and not sure how to proceed. Any help appreciated :(

c4170001 11-06-2015 11:15 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by pro88 (Post 80956)
Yes 4.2.1.

I've decided to use an older version of capturebate-node from the repository - which is allowing further progress but rtmpdump is failing with the following error:
DEBUG: Property: <Name: level, STRING: error>
DEBUG: Property: <Name: code, STRING: NetStream.Play.Failed>
DEBUG: Property: <Name: description, STRING: security>
DEBUG: Property: <Name: clientid, NUMBER: 940681682.00>

I've tried installing both precompiled rtmpdump (ksv) and patching the main rtmpdump version - and both have the security error.

Really stuck on this one and not sure how to proceed. Any help appreciated :(

I've had that problem before. Try downloading the source, patching it and then compiling it. Once you've done that, cd into the librtmp folder (inside the RTMPDump source folder, e.g. /root/rtmpdump/librtmp), and enter these commands:

Code:

cp librtmp.so.1 /usr/lib

cp librtmp.so.1 /usr/lib64

cp librtmp.so.1 /lib

cp librtmp.so.1 /usr/lib/x86_64-linux-gnu

Tested on a brand new instance of Debian 8 x64 and works perfectly.

pro88 11-08-2015 07:14 AM

Re: Automated Chaturbate Recording Under Linux


 
Thanks for your suggestion. Tried but unfortunately still have the same issue. I'm running Debian 8 (RASPBIAN) on the Raspberry Pi.

Any other ideas?

Quote:

Originally Posted by c4170001 (Post 80957)
I've had that problem before. Try downloading the source, patching it and then compiling it. Once you've done that, cd into the librtmp folder (inside the RTMPDump source folder, e.g. /root/rtmpdump/librtmp), and enter these commands:

Code:

cp librtmp.so.1 /usr/lib

cp librtmp.so.1 /usr/lib64

cp librtmp.so.1 /lib

cp librtmp.so.1 /usr/lib/x86_64-linux-gnu

Tested on a brand new instance of Debian 8 x64 and works perfectly.


c4170001 11-08-2015 10:25 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by pro88 (Post 80992)
Thanks for your suggestion. Tried but unfortunately still have the same issue. I'm running Debian 8 (RASPBIAN) on the Raspberry Pi.

Any other ideas?

Not really... thought that would work, it always does for me on Linux. I can only suggest flashing a fresh Raspbian image, installing only what is required to build the sources, then doing what I said on my previous post. Could be possible that there's something wrong because of your previous failed attempts.

For reference, I managed to get RTMPDump working on my Pi (Raspbian) using this method.

pro88 11-10-2015 04:27 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by c4170001 (Post 81001)
For reference, I managed to get RTMPDump working on my Pi (Raspbian) using this method.

Please check your PMs :)

doobydoo 12-11-2015 06:25 AM

Re: Automated Chaturbate Recording Under Linux


 
Great script! Thanks for the work.

I have a question and a problem.

My problem...

I have the script running on UbuntuMate VM. It works great, though I often get the following error listed below, and was wondering if there's a fix to avoid this problem.

Code:

11/12/2015 06:05:17 AM INFO:Connecting to https://chaturbate.com/auth/login/
11/12/2015 06:05:17 AM INFO:Starting new HTTPS connection (1): chaturbate.com
11/12/2015 06:05:27 AM ERROR:Some error during posting to https://chaturbate.com/auth/login/
11/12/2015 06:05:27 AM ERROR:[Errno 104] Connection reset by peer


A few questions, if someone more knowledgeable can answer.

1. I'm using the original script. I tried some forks, and it appears they record a lower quality stream. Do the forks that record with LiveStreamer record at the same quality as the original??

2. Is there a more enhanced fork of this script that has any fixes, or is the original still the most stable to use?

3. Sometimes I got an error that read "ERROR:('Connection aborted.', BadStatusLine("''",))". I think this might have been due to my VM network connection as a NAT. Has anyone received that same error and know the cause and or fix for it should it happen again?

Thanks for any help.

doobydoo 12-19-2015 10:43 AM

Re: Automated Chaturbate Recording Under Linux


 
So I pieced together a solution, or a hacked up work around to deal with script disconnects when a server error occurs.

Basically, it’s just a script to restart capturebate when a certain string shows up in the output log.

I’m no scripting guru, so this is a novice attempt. I pieced the script together from examples I found around the web. Hopefully a scripting expert can improve on it.

I’m running capturebate on Ubuntu MATE. If you’re running a different distro, you may need to install any dependencies the script calls on in order to get it to work.

Here’s how it should work. If Errno or BadStatusLine show up in the output log, the script will kill any capturebate running scripts, then popup a notification window listing the error causing it to restart, then wait two minutes, and finally restart capturebate and continue monitoring the output log.

Copy the below listed code into a text file, name it monitor.sh, and save it into the root of your capturbate directory. After the file is created, right click it and click the permissions tab, then tick Allow executing file as a program.

Code:

#!/bin/bash

sudo tail -fn0 output.log |
  grep --line-buffered 'BadStatusLine\|Errno' |
    while read line; do
      timestamp=${line/}
      msg=${line#*]: }
      notify-send -u critical "SCRIPT RESTARTED initiated by" "$timestamp" -t 0 &
pkill -f rtmpdump
pkill -f main.py &
sleep 2m
python main.py &
    done

Now, start capturebate as normal, then run this script by opening a command prompt from within the capturbate directory, and use the command sudo ./monitor.sh

After that, the script should run and monitor the output log for the errors listed in the script, and restart when necessary.

I'm not sure how stable this script works, so monitor its operation and post any problems or improvements.

Jimmy77 01-25-2016 04:54 AM

Re: Automated Chaturbate Recording Under Linux


 
Hello

can anyone say again exactly where I need to copy my hash out. Just in line 79?

c4170001 01-25-2016 02:23 PM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by Jimmy77 (Post 82370)
Hello

can anyone say again exactly where I need to copy my hash out. Just in line 79?

It grabs it automatically. You don't need to put it anywhere.

Jimmy77 01-26-2016 01:29 AM

Re: Automated Chaturbate Recording Under Linux


 
http://www2.pic-upload.de/img/29548323/ejsrkiszklw.png

He say "1 models Online" and models currently being recorded are [ ].

but he is nothing recording.

c4170001 01-26-2016 11:54 AM

Re: Automated Chaturbate Recording Under Linux


 
Quote:

Originally Posted by Jimmy77 (Post 82384)
http://www2.pic-upload.de/img/29548323/ejsrkiszklw.png

He say "1 models Online" and models currently being recorded are [ ].

but he is nothing recording.

Eh, I would actually recommend using capturebate-node if you can. It's easy to set up and doesn't create new files every 45 (?) seconds.

Sluthunter 02-26-2016 10:55 AM

Re: Automated Chaturbate Recording Under Linux


 
Anyone try capturebate-node on ubuntu 14.04 x86 ? Not working for me

jeff.kerby 03-04-2016 05:22 PM

Re: Automated Chaturbate Recording Under Linux


 
Can't get Chaturbate node or none node working at all, will not capture anything. Kind of disappointing, but I understand these folks are not getting paid for creating these scripts.:mad: :confused:


All times are GMT -6. The time now is 02:30 PM.