Quote:
Originally Posted by marktr
rtmpdump provides this functionality out of the box; a new patch is not required. If you don't specify an output file (don't use -o) it will write to the stdout stream, and since you don't need this output you can redirect it to a null file. On windows you can use NUL and on unix-like systems you can use /dev/null.
rtmpdump's informational messages are fed to stderr. Depending on the tools at your disposal, you can consume this output in a stream-like fashion, or save a predefined amount of text to a file, to be processed later. If you need the latter, your command line would look like:
Code:
Windows: rtmpdump ... > NUL 2>data.txt
Unix: rtmpdump ... > /dev/null 2>data.txt
If you need more detailed diagnostics to go in your captured file, consult the rtmpdump man page for verbosity switches.
|
Thanks, but I still can't get it to work.
This is my script:
Code:
@ECHO OFF
set timeout=15
set dir=Downloads
set /p user=Enter username:
echo Please wait...
:grab
set mydate=%DATE:/=-%@%TIME::=-%
set txt=%TMP%\out_%user%_[%mydate: =%].txt
rtmpdump -V -r rtmp://edge.stream.highwebmedia.com/live-edge/0 -p http://chaturbate.com/%user% -C S:ddalindaa -C S:%user% -C S:2.640 -C S:pbkdf2_sha256^$10000^$vq7lwDzUenwE^$Cyn5/Fnu0g5WsAUELQ/w2x3cXXnei5zQhB0NPpCC3yQ= > NUL 2>%txt%
for /f "delims=" %%a in ('findstr /n . %txt% ^| findstr "^73:"') do set var="%%a"
for /f "delims=" %%a in ('findstr /n . %txt% ^| findstr "^74:"') do set var2="%%a"
for /f "delims=" %%a in ('findstr /n . %txt% ^| findstr "^75:"') do set var3="%%a"
set key="%var2:~56%"
set key=%key:>=%
set key=%key:"=%
set status="%var:~56%"
set status=%status:>=%
set status=%status:"=%
set addr="%var3:~56%"
set addr=%addr:>=%
set addr=%addr:"=%
if not %status%==okay goto:offline
if %status%==okay goto:online
:offline
title %user% - Offline
color F8
echo Could not start recording, server returned status '%status%'.
goto:done
:online
title [D]%user% - Online [since %TIME%]
color 2F
echo Success! Server returned '%status%' - %addr%
echo Stream key:
echo %key%
set stamp=%DATE:/=-%@%TIME::=-%
set fname=%dir%\%key:~0,32%_[%stamp: =%].flv
rtmpdump -v -r rtmp://%addr%/live-origin/%key% -o "fname"
:done
title %user% - Offline
color F8
timeout 15
goto:grab
When I run it on online model, it start recording without output, at this line:
Code:
rtmpdump -V -r rtmp://edge.stream.highwebmedia.com/live-edge/0 -p http://chaturbate.com/%user% -C S:ddalindaa -C S:%user% -C S:2.640 -C S:pbkdf2_sha256^$10000^$vq7lwDzUenwE^$Cyn5/Fnu0g5WsAUELQ/w2x3cXXnei5zQhB0NPpCC3yQ= > NUL 2>%txt%
I want it to start recording at this line:
Code:
rtmpdump -v -r rtmp://%addr%/live-origin/%key% -o "fname"
How can I do it?