Continue recording to existing m3u8

Steam recording with RTMPDump or FFmpeg.
Post Reply
arlind
Posts: 1
Joined: Tue May 23, 2017 3:17 pm

Continue recording to existing m3u8

Post by arlind » Tue May 23, 2017 3:20 pm

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

navilor
Posts: 46
Joined: Thu May 12, 2011 5:19 pm

Re: Continue recording to existing m3u8

Post by navilor » Sun Nov 05, 2017 9:52 pm

No, but you can combine the captured TS files together using Concat.

https://trac.ffmpeg.org/wiki/Concatenate

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.

Post Reply