Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (http://stream-recorder.com/forum/forumdisplay.php?f=4)
-   -  

Batch file loop for retrying to record a stream

(http://stream-recorder.com/forum/showthread.php?t=18507)

sebastian 07-07-2014 04:20 AM

Batch file loop for retrying to record a stream


 
Hi guys,

I'd like to record unattendendly an m3u8 stream. During my last tries the stream went offline during its broadcast, but than went online again after a few minutes.

So I'd like to record it via a batch file loop, so that I don't have to restart it again:

Code:

@echo off
:start
ffmpeg -i http://streamlocation.m3u8 -c copy filename.ts
timeout 120
goto :start

This should work, but the batch file is missing an option to generate a new filename (maybe filename.ts added with a sequence number) each time the loop starts again. Anyone with an idea?

Best
Sebastian


All times are GMT -6. The time now is 05:31 AM.