Page 1 of 1

Buffering behaviour of file/fifo vs network

Posted: 17 Mar 2015 19:33
by jdwiegman
I have an application where I take transport stream formatted content, pass it through some analysis, and then send it through a Linux named pipe to be read by a libVLC instance. I have found some content with extreme errors that causes VLC to stop reading from the fifo for a period of time, which is causing a back log in my write buffer. I see the same behaviour if I simply pass a file through to VLC via a normal pipe. The pipe write behaviour looks like:

Image.

If I playout the same file over UDP and recieve it in VLC, the buffering is fine... similarily if I play in using another player through a pipe (FFPLAY), the behaviour is ok and the buffering looks like:
Image.

When receiving over network, I get messages of audio and video frames being dropped that I don't when reading over file. I've tried adjusting --file-caching but it has no effect on this behaviour. Is there any other setting I can adjust to have VLC play 'file' content like it does over a network? It seems when it treats the content as real-time it just drops it when its getting overrun, but over a file it will try and make sense of the content coming in (sorting bad/out of order packets, etc) and just pause the incoming data until it is caught up.

Re: Buffering behaviour of file/fifo vs network

Posted: 17 Mar 2015 20:10
by RĂ©mi Denis-Courmont
The caching code in VLC is beyong its age and needs fixing. There are no magic work-arounds here.