sebastian
07-07-2014, 04:20 AM
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:
@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
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:
@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