Open samsonradu opened 8 years ago
There's currently no way to publish one message per chunk from a single POST request. However, I can definitely see how this might be useful, and I'll try to add this feature in a release or two.
Having said that, there is a way to publish straight from ffmpeg:
ffmpeg -i /dev/video0 -chunked_post 0 -multiple_requests 1 -f mpeg1video http://localhost:88/pub?id=1
Thanks for the quick reply!
-chunked_post 0
seems to kill the ffmpeg process for me. Also it might be inefficient to fire another request for each chunk of data (considering >20fps). Guess I ll have to wait for the feature :)
I'm not sure what the deal with -chunked_post 0
is, but new-request-per-data-chunk might not be so bad. The only actual overhead is the HTTP headers, and not the connection handshake. As per ffmpeg docs, -multiple_requests 1
uses a persistent connection. You may want to benchmark it to check the actual performance.
Update from the #IRC #ffmpeg channel, it cannot do that, fire a new http req per chunk. Also the multiple_requests
flag actually means toggling the Connection: Keep-Alive
header.
Noted, thanks for the update. I'll see what I can do about adding chunked message publishing.
Any news on this one?
Not yet, I'm afraid. I've been kind of busy fixing bugs, and also with last week's Nginx Conference. I might be able to get this done in a week or two, but I could probably do it sooner if properly incentivized.
Thanks for the quick reply, saw quite a few commits lately indeed, thought it might be hidden somewhere. No rush on it.
I'll definitely update this ticket and let you know once it's in.
Hi,
I'd like to know if there's a way to publish binary data via an ffmpeg process, so basically a long-living publisher which keeps POST-ing chunked data. It's not working for me (no errors in logs).
Think it's related to #180 but on the publisher level.
ffmpeg -i /dev/video0 -f mpeg1video http://localhost:88/pub?id=1