Page 1 of 1

Do i have control over the Buffer when decoding UDP

Posted: 30 Dec 2010 00:47
by hussam_2000
How close of a "real-time" can I achieve when decoding h.264 udp stream? Do I have control over the buffering?

I’m using VLC1.1.4 in a C# app and I noticed when I encode a video with VLC player and then decode it in my app there is 1-2 second delay . Can this be faster? Is it the buffer that I need to play with or is it just VLC that needs few seconds to decode ?

Thank you – Sam E

Re: Do i have control over the Buffer when decoding UDP

Posted: 30 Dec 2010 08:18
by Sébastien Escudier
It's vlc internals buffers.
You can't remove all of them.
You can try to reduce some of them with some --access-caching options
for example --udp-caching

Re: Do i have control over the Buffer when decoding UDP

Posted: 30 Dec 2010 18:27
by hussam_2000
Thank you for the reply.

- on the client side
I first used :
" --use-stream-immediate" and i didnot notice any difference .

then i used:

"--udp-caching=100"

and i noticed that VLC starts decoding faster so it displays the image faster but the delay between the server and the clienbt is the same.

I think it might be the server side( i hope so ). on the server side , im just playing/streaming a .wmv video over UDP. I guess the VLC player is caching then streaming while playing the video in real time so when i decode the video i get that delay caused by the caching on the server side. Is this possible ? any other options i should play with ? Thank you again.

Re: Do i have control over the Buffer when decoding UDP

Posted: 31 Dec 2010 09:01
by Sébastien Escudier
If you reduced udp caching and you noticed it starts decoding faster, then the delay is reduced...
The other delay you could try to reduce is your server reading the video source.

Re: Do i have control over the Buffer when decoding UDP

Posted: 08 Jan 2011 08:56
by hussam_2000
It sounds about right. VLC player has a default Buffer of 320 ms. I killed the buffer on the server size and the server ( video source using VLC player encoding a video) couldn't encode anymore. I don't know what to do next.