PDA

View Full Version : Rtmpdump in loop for


arrache88
07-23-2016, 12:32 AM
Hello guys

Suppose I know that the following rtmpdump command works :

rtmpdump -r rtmp://5.10.77.106/hls-vod/links -a vod -W http://www.website.com/flowplayer-3.2.12.swf -p "http://www.website.com/" -y mp4:/links/number12.mp4 -o %fileName%

Now what I want to do to use loop for to find the working playlist like this :

FOR /L %%A IN (1,1,20) DO (
rtmpdump -r rtmp://5.10.77.106/hls-vod/links -a vod -W http://www.website.com/flowplayer-3.2.12.swf -p "http://www.website.com/" -y mp4:/links/number%%A.mp4 -o %fileName%
)


I noticed when the counter reach number 12 , it doesnt start downloading why ?? please help me . I want look for correct playlist with loop for

Cheers

-D3n1s-
07-23-2016, 03:40 AM
@echo off

set firstchannel=1
set lastchannel=30

:loop

echo.
echo Downloading Stream ^#%firstchannel%
echo.

rtmpdump -r "rtmp://5.10.77.106/hls-vod/links" -a "vod" -W "http://www.website.com/flowplayer-3.2.12.swf" -p "http://www.website.com/" -y "mp4:/links/number%firstchannel%.mp4" -o "Video%firstchannel%"

set /a firstchannel=%firstchannel%+1

cls

if not #%firstchannel%#==#%lastchannel%# goto loop

goto end

:end

exit

arrache88
07-23-2016, 11:45 PM
Thank you sir ! I found the solution with the command FOR /L %%A IN (1,1,20) DO (