Page 1 of 1

disable caching?

Posted: 16 Sep 2012 22:59
by skuda
Hi,
i am trying to add libvlc to Zoneminder-Viewer https://github.com/skuda/ZoneMinder-Viewer that it's using motion jpeg itself right now, i would like to completely replace the internal streamer and use libvlc to stream x264 if asked for, when i am on lan i have an extra delay using libvlc that i don't have using mjpeg directly.

I have tried to disable cache using "--network-caching=0" argument to libvlc_new() but still i get an extra 2~3 seconds, the argument it's working because if i put 5000ms value i get 5 seconds more of delay. It is possible to disable caching completely? would be useful when i can be sure i am on LAN.

Other question, my complete arguments right now it's {"--no-video-title-show", "--network-caching=0"}, the documentation says that i should not use this way to pass parameters because i have no warranty that it will work on older or newer releases, do i have any other way to get this result? Thanks!

Regards,
Miguel Angel.

Re: disable caching?

Posted: 17 Sep 2012 00:25
by Jean-Baptiste Kempf
If you are streaming, there are other internal buffers, I think.

Re: disable caching?

Posted: 17 Sep 2012 09:07
by skuda
this internal buffers can be controlled from libvlc or they are static?

Re: disable caching?

Posted: 18 Sep 2012 16:11
by skuda
i assume they are static, ok, i will maintain old mjpeg code for lan usage, thanks.

Re: disable caching?

Posted: 18 Sep 2012 19:17
by Jean-Baptiste Kempf
THey can be controlled.

Re: disable caching?

Posted: 18 Sep 2012 20:50
by skuda
some tip for search the documentation please? i can't find anything about this internal buffers.

Re: disable caching?

Posted: 18 Sep 2012 23:17
by Jean-Baptiste Kempf
Use the preferences box of VLC to search for caching and you will see the sout-mux-caching

Re: disable caching?

Posted: 19 Sep 2012 10:35
by kostyan
I am not sure but --clock-jitter=0 might also be related to that.

Re: disable caching?

Posted: 02 Oct 2012 16:03
by some_birdie
Hello, I also need to disable caching in vlc. Has anybody solved this?

I use VLC for playing of live FLV/HTTP stream and need to reduce the latency.
I've found such comment in src/input/stream.c:
/* Two methods:
* - using pf_block
* One linked list of data read
* - using pf_read
* More complex scheme using mutliple track to avoid seeking
* - using directly the access (only indirection for peeking).
* This method is known to introduce much less latency.
* It should probably defaulted (instead of the stream method (2)).
*/
How can I use the access directly, without these streams? Will this reduce the latency?

Re: disable caching?

Posted: 03 Oct 2012 17:42
by RĂ©mi Denis-Courmont
1/ Modify the source code. Nobody tried to do that, so nobody really knows. 2/ Probably, but it might introduce other problems.