jdramer
jdramer

Reputation: 945

Can you force ffmpeg hls demuxing to start from the beginning in a live hls stream?

When remuxing an hls stream into an mp4 file I use the following command.

ffmpeg -i "http://example.com/master.m3u8" -c copy -bsf:a aac_adtstoasc output.mp4

This works fine for VOD content, but if the stream is live it starts from the live position, rather than the very first segment in the m3u8 file. Does the applehttp demuxer have any parameters that would force starting from the first segment?

Upvotes: 3

Views: 5708

Answers (1)

Andrey Turkin
Andrey Turkin

Reputation: 2509

There is -live_start_index option for HLS demuxer. You can set it to 0 to make ffmpeg start at first available segment in the playlist. Which won't do much good for most live playlists since they only keep a handful of most recent segments.

Upvotes: 9

Related Questions