[FFmpeg-user] gracefully restart an ffmpeg stream?

Claudiu Rad jazzman at misalpina.net
Sun Jan 10 22:07:42 CET 2016

On 1/10/2016 10:54 PM, chovy wrote:
> On 01/10/2016 01:07 PM, Reindl Harald wrote:
>> Am 10.01.2016 um 21:05 schrieb jd1008:
>>> On 01/10/2016 01:00 PM, Reindl Harald wrote:
>>>> Am 10.01.2016 um 20:48 schrieb chovy:
>>>>> What's the least intrusive way to restart an ffmpeg stream?
>>>>> I don't mind if the stream flickers or jumps ahead...but right now
>>>>> when I kill the pid and restart it, the player completely stops
>>>>> playing it.
>>>> that's nothing you can solve on the server side
>>>> the client needs to graceful hand short interruptions
>>> Seems like if the server kills the video streamer, then the client's
>>> connection is broken. So when server restarts the streamer, then
>>> the client should still be able to re-connect to server and start
>>> playing the stream. No?
>> surely, that connection is broken
>> yes, the *client* should be able to reconnect
>> if the client don't re-connect just blame the client
>> you can't solve that on the server side
>> exactly what i said
> Since the client is not able to reconnect, it seems that it may be possible
> that the very server PROCESS which invokes ffmpeg to start the stream
> needs to be restarted, not just ffmpeg - I am assuming the main server
> daemon is NOT ffmpeg.
> I'm using nginx to server the .ts and index.m3u8 files...I don't see why a restart of nginx would be required.

please first document yourself and understand how this whole process 
works, who plays what role, and so on.
then you'll find the role of EXT-X-ENDLIST and maybe figure out a 
solution to not feed it to the client at all and gracefully continue the 
ongoing playlist after restart. a playlist preprocessor could help.
and then please understand why this is not an ffmpeg issue and shouldn't 
be its responsibility to have flags to create intermediary incomplete 
outputs. and this is for the simple fact the ffmpeg *is not* a streaming 
server. look to other solutions for that.

> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> -- 
> Claudiu

More information about the ffmpeg-user mailing list