Page 1 of 1

Continue recording to existing m3u8

Posted: Tue May 23, 2017 3:20 pm
by arlind
i record a live stream /root/bin/ffmpeg -i STREAM-LINK.m3u8 -t 500 -c copy -y -hls_playlist_type vod 1.m3u8
so if stream is down for 1 minute recording stop. so is there a way to continue to record on 1.m3u8 if run this command again

so when i run same command it delete 1.m3u8 and start recording new files - is there a way to continue recording

Re: Continue recording to existing m3u8

Posted: Sun Nov 05, 2017 9:52 pm
by navilor
No, but you can combine the captured TS files together using Concat.

You should also save the content as TS files for easier manipulation. Below is a simplified version of what you are looking for.

/root/bin/ffmpeg -i STREAM-LINK.m3u8 -c copy -f mpegts -y out.ts

If you are capturing the default playlist.m3u8 please make sure that you check to see if has multiple bitrates. I like to use curl for that. Once you have found the manifest you want to use connect to that.

Consider using a script that will add the date and time to the name of the output file so that you can concat the ts files later and do not overwrite what is already there.