[FFmpeg-user] How to you prevent ffmpeg from stopping when streaming and the client closes connection
Dan Naughton
daniel.naughton at gmail.com
Fri Sep 13 19:17:15 EEST 2024
ffmpeg mjpeg streaming is working (VLC tested as a client)
This is the command:
ffmpeg -stream_loop -1 -re -i file.mjpeg -an -c copy -listen 1 -f mpjpeg
http://192.168.1.7:8080
But when the client closed the connection - ffmpeg exits:
Press [q] to stop, [?] for help
[vost#0:0/copy @ 0x55aa2a61f040] Error submitting a packet to the muxer:
Connection reset by peer
[out#0/mpjpeg @ 0x55aa2a605e40] Error muxing a packet
[out#0/mpjpeg @ 0x55aa2a605e40] Error writing trailer: Connection reset by
peer
[http @ 0x55aa2a61f6c0] URL read error: End of file
[out#0/mpjpeg @ 0x55aa2a605e40] Error closing file: End of file
[out#0/mpjpeg @ 0x55aa2a605e40] video:3179kB audio:0kB subtitle:0kB other
streams:0kB global headers:0kB muxing overhead: 0.647589%
size= 3199kB time=00:00:18.36 bitrate=1427.6kbits/s speed=1.03x
Conversion failed!
Is there some parameter I missed to keep the stream alive? (or is this
pretty much normal)
Thanks all - awesome software
Dan
More information about the ffmpeg-user
mailing list