[FFmpeg-user] ensuring output of #EXT-X-ENDLIST to m3u8 file for HLS

Ricardo Kleemann ricardo at americasnet.com
Fri Sep 11 06:13:13 CEST 2015


Hi,

I have ffserver and ffmpeg working together to produce HLS streaming files.

Basically ffserver has an flv stream, and an ffmpeg process reads the stream and generates the HLS segments.

However, once the flv stream ends, ffmpeg doesn’t react to that by ending “cleanly” on its own. I’m forced to kill the process otherwise it just sits indefinitely waiting for input from the flv. The side effect is that the m3u8 file misses the last line which typically contains #EXT-X-ENDLIST

Since I’m running the ffmpeg process in the background, I can’t cleanly “hit q” to quit it.

Does ffmpeg have a command option to cleanly exit (or timeout) if the input is halted for a period of time?

Alternatively, is there a signal I can send to ffmpeg for it to exit cleanly and it outputs #EXT-X-ENDLIST? 

thanks
Ricardo


More information about the ffmpeg-user mailing list