Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording (Adult streaming videos)
Register FAQ Members List Calendar Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-09-2013, 08:07 AM
yerman yerman is offline
Junior Member
 
Join Date: May 2013
Posts: 8
yerman is on a distinguished road
Default

Automated Cam4 downloading (script inside, need help for MFC)


Hi All

Ive updated my scripts to automatically download cam4 files.

Requirements
Linux
Bash
Python
IPTables
vncserver
rtmp linux user
screen
firefox
patched rtmpsuck Link

Firstly set an iptables rule to capture traffic for the rtmp user

Code:
iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner --uid-owner rtmp -j REDIRECT
then create a session for the rtmp user
Code:
su rtmp -c "vncserver -geometry 1024x768 :1"
then create a screen session with rtmpsuck running in a temp directory of your choice:

Code:
screen -dmS RTMPSUCKSCREEN bash -c " cd /media/storage/dropbox/videos/temp/; /usr/local/sbin/rtmpsuck"
I wrote the follwowing simple bash script, it will
  1. Open firefox on the models page
  2. wait for rtmpsuck to create the Command.txt
  3. kill firefox
  4. spawn a screen session with rtmpdump


cam4.sh - call using cam4.sh <modelname>
Code:
#!/bin/bash
#clear the environment
rm  /media/storage/dropbox/videos/temp/* UPDATE WITH YOUR TEMP PATH
#kill any hanging chrome sessions with cam in the process
id=`ps aux | grep firefox | grep cam | head -n 1 |  awk -F ' ' '{print $2}'`
kill -9 $id
flag=false


#spawn a chrome session as the rtmp user so their traffic will be forwarded to rtmpsuck
su - rtmp -c "firefox -new-instance --display=:1  \"http://www.cam4.co.uk/$1\" &"

#while the command.txt file is missing keep waiting
while ! $flag
do
if [ -f /media/storage/dropbox/videos/temp/Command.txt ]; then UPDATE WITH YOUR TEMP PATH
    flag=true
fi
done

#we have the file now kill firefox
id=`ps aux | grep firefox | grep cam | head -n 1 |  awk -F ' ' '{print $2}'`
kill -9 $id

#grab the rtmpdump command
cmd=`cat  /media/storage/dropbox/videos/temp/Command.txt` UPDATE WITH YOUR TEMP PATH
cmd=`echo $cmd | sed 's/-o \"2013.*//g'`
cmd="export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib;$cmd -o \"/media/storage/dropbox/videos/cam4/`date +"%m_%d_%y_%H_%M"`_$1.flv\""
echo $cmd
echo "running screen for" $1
screen -dmS capture_$1 bash -c "$cmd"
Reply With Quote
 
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 09:04 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons