[FFmpeg-devel] [RFC] unix socket protocol and our proto situation

Luca Barbato lu_zero
Fri Aug 13 10:46:21 CEST 2010

Our network protocol layer is pretty much ineffective and can lose quite
easily packets. Usually the system buffer would hide the issue with tcp
based protocols and udp based might hide well the problem till we call
url_read often enough. Losing data over loopback is something we do
experience already when we test rtp.

Here yesterday stab at the unix sockets, it shows pretty well how much
our current proto layer rely on system buffers instead doing its proper
buffering itself.

Way to use it:

./ffplay -f mpegts unix:///tmp/ff.socket &

sleep 2 && ./ffmpeg_g -re -i something -vcodec copy -acodec copy -f
mpegts unix://tmp/ff.socket

Expect to lose lots of frames.

I'm pondering which would be a good solution:

- do nothing and expect downstream apps cope with it somehow.
- implement a generic fill thread within proto and change the interface
so it could use a proper polling system.
- something else glaring simpler that I hadn't thought.



Luca Barbato

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Unix-socket-proto-udp-like-and-1-2-broken.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100813/abfc7dd8/attachment.asc>

More information about the ffmpeg-devel mailing list