hey guys,
I always record live streams with FFmpeg with the command ffmpeg -i "stream url" -c copy stream.ts
and wonderd if there is a way to automatically re-start the bat if the streams disconnects for a few seconds. Or if it is possible that the bat won't shut down when the stream disconnects and just pauses and continues after the stream is back on.
Does anyone have any idea how that would be possible ?
thanks guys
regards
-Gwar
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 11 of 11
-
-
I haven't tested this but maybe:
Code::START ffmpeg -y -i "stream url" -c copy stream.ts if errorlevel 1 goto START
-
Yes, it would overwrite the file and you lose everything except the last session. In the link I found they used >> but I haven't tested it.
-
Setting the truncate option to FALSE may keep it from overwriting.
Code:ffmpeg -i "stream url" -c copy -truncate 0 stream.ts
-
Shure overwriting the file would be pretty bad. I tested that script but it won't even start the batch
I tried 7 different methods but that bat shuts down a half second after start
ffmpeg <URL> -t -c copy test.ts
ffmpeg <URL> -t -c copy test.ts
ffmpeg hls+<URL> -t -c copy test.ts
ffmpeg hls+<URL> -t 10 -c copy test.ts
ffmpeg <URL> -t 10 -c copy test.ts
ffmpeg <URL> -t 10 test.ts
ffmpeg <URL> -t test.ts
Maybe I'm not getting it and doing something wrong ? -
Hi ,
Here below what I should do :
Code:@echo on :BEGIN set ladate1=%date:~0,2%-%date:~3,2%-%date:~6,4% if "%TIME:~0,1%"==" " (set ext=0%TIME:~1,1%H%time:~3,2%mn%time:~6,2%) else (set ext=%TIME:~0,2%H%time:~3,2%mn%time:~6,2%) :START ffmpeg -y -i "stream url" -c copy stream_%ladate1%_%ext%.ts if errorlevel 1 goto BEGIN pause :fin
JE SUIS CHARLIE !!! -
Or use youtube-dl instead of ffmpeg. It officially supports picking up where it left off.
Similar Threads
-
(Willing to pay)ffmpeg Need help downloading live stream ffmpeg and rtmp
By grabyea in forum Video Streaming DownloadingReplies: 0Last Post: 10th Apr 2016, 16:54 -
Automatically Split MP4 File Based on Start/Stop of Source Video Camera
By thomaspier in forum EditingReplies: 5Last Post: 28th May 2015, 14:49 -
Is it possible to rip this video URL stream to a a file automatically?
By codecowboy in forum Video Streaming DownloadingReplies: 6Last Post: 23rd Apr 2015, 06:24 -
Audio Stream Mixing in FFMPEG
By encodingmonkey in forum AudioReplies: 2Last Post: 9th May 2013, 02:38 -
ffmpeg and automatically getting correct audio stream
By onetoomany in forum Video ConversionReplies: 2Last Post: 30th Mar 2013, 15:31