Re: [FFmpeg-user] Http Listen Connection Drop
Moritz Barsnick (2018-05-14): > May I interrupt this discussion and put forward the theory that the > "listen" mode of ffmpeg's http protocol/muxer was not made for multiple > connections? As far as I understand, it waits for one connection, and > terminates once this connection is closed. That is not the exact explanation but close enough. The HTTP protocol can handle several connections, but it requires using a specific API. The ffmpeg command-line tool does not use that API, and therefore can only handle one connection. It would be possible to create a muxer similar to the tee muxer capable of streaming to several clients at once. But nobody wrote it yet. Regards, -- Nicolas George ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Http Listen Connection Drop
On Mon, May 14, 2018 at 12:54:02 +0200, sirk98 qwerty89 wrote: > I try to use the debug loglevel, but I can't understand the problem . > > av_interleaved_write_frame(): Broken pipe > No more output streams to write to, finishing. > Error writing trailer of http://127.0.0.1:8989/1: Broken pipe > > This error appears when client press Stop on the stream . I need that the > connection remains open for other client . I try to use nginx as proxy > server using the proxy pass option, but the problem is the same . > > What I can do ? May I interrupt this discussion and put forward the theory that the "listen" mode of ffmpeg's http protocol/muxer was not made for multiple connections? As far as I understand, it waits for one connection, and terminates once this connection is closed. The option "-multiple_requests" does persistant HTTP connections for other sub-protocols, and has nothing to do with some sort of "server" mode. What you are trying to achieve was once provided by ffserver (until it was recently discontinued). nginx might be one option, and I once heard of an ffmpeg based server similar to ffserver which serves only Matroska via HTTP, but I can't find the link. Moritz ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Http Listen Connection Drop
I try to use the debug loglevel, but I can't understand the problem . av_interleaved_write_frame(): Broken pipe No more output streams to write to, finishing. Error writing trailer of http://127.0.0.1:8989/1: Broken pipe This error appears when client press Stop on the stream . I need that the connection remains open for other client . I try to use nginx as proxy server using the proxy pass option, but the problem is the same . What I can do ? 2018-05-11 11:27 GMT+02:00 Nicolas George: > sirk98 qwerty89 (2018-05-07): > > I try to setup FFmpeg + http listen option to serve some live stream > > without web server . > > If I run the script seems that all is working fine . > > But if client close connection, ffmpeg stops and I need to restart > script . > > What I can do to solve this problem ? > > The first step would be to peruse the diagnostics printed or otherwise > available (especially the return code of the process) to know the exact > cause of the crash. If you have trouble understanding them by yourself, > do not hesitate to post them fully here. > > Regards, > > -- > Nicolas George > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Http Listen Connection Drop
sirk98 qwerty89 (2018-05-07): > I try to setup FFmpeg + http listen option to serve some live stream > without web server . > If I run the script seems that all is working fine . > But if client close connection, ffmpeg stops and I need to restart script . > What I can do to solve this problem ? The first step would be to peruse the diagnostics printed or otherwise available (especially the return code of the process) to know the exact cause of the crash. If you have trouble understanding them by yourself, do not hesitate to post them fully here. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Http Listen Connection Drop
Hello, Thx for your reply, can u write an example? Do you use nginx with a proxy_pass rule? Or how? Il Mar 8 Mag 2018, 18:53 John Smithha scritto: > > I try to setup FFmpeg + http listen option to serve some live stream > > without web server . > > If I run the script seems that all is working fine . > > But if client close connection, ffmpeg stops and I need to restart > script . > > What I can do to solve this problem ? > > > > > What I do is use ffmpeg to stream the connection to an nginx web server; > the nginx server handles the clients, ffmpeg feeds nginx with the live > stream. > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Http Listen Connection Drop
> I try to setup FFmpeg + http listen option to serve some live stream > without web server . > If I run the script seems that all is working fine . > But if client close connection, ffmpeg stops and I need to restart script . > What I can do to solve this problem ? > > What I do is use ffmpeg to stream the connection to an nginx web server; the nginx server handles the clients, ffmpeg feeds nginx with the live stream. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Http Listen Connection Drop
Hello dear forum, I try to setup FFmpeg + http listen option to serve some live stream without web server . If I run the script seems that all is working fine . But if client close connection, ffmpeg stops and I need to restart script . What I can do to solve this problem ? Here my script : ./ffmpeg -fflags +genpts -nostats -nostdin -hide_banner -loglevel quiet -i ' http://live.stream.net/stream/channel/1' -strict experimental -listen 1 -f mpegts 'http://192.168.1.110:9300 I try also to add multiple requests option but I can't solve the problem : ./ffmpeg -fflags +genpts -nostats -nostdin -hide_banner -loglevel quiet -i ' http://live.stream.net/stream/channel/1' -strict experimental -listen 1 -multiple_requests -f mpegts 'http://192.168.1.110:9300 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".