2

I know vlc uses live555 for rtsp streaming. There is an option in Open Media dialog in vlc when opening a network stream which tells vlc to buffer stream for some seconds before starting to play it. The option is 'network-caching' in milliseconds. I want to know which functions in live555 is used in vlc to have this feature? I have tried increaseReceiveBufferTo(...) and ReorderingPacketBuffer::setThresholdTime(...) but they don't do this behavior.

vlc network caching option

Thanks

M.Mahdipour
  • 592
  • 1
  • 7
  • 21

1 Answers1

0

This parameter is not directly used in the live555 or rtsp module. Looking at the source code shows that the value is used to adjust the presentation timestamps. Since Live555 simply gives you out packets with the timestamps as they were on the RTP level, you have to implement it yourself.

Rudolfs Bundulis
  • 11,636
  • 6
  • 33
  • 71
  • But as i have tested, it seems that vlc does more than only adjusting presentation timestamps. For example sometimes on some networks, when using only live555 in a separate program, displayed frames (decoded with ffmpeg) shows glitches or corruption, and this is the same on vlc when network caching is low (e.g. 500 msecs). But when increase network caching, e.g. to 2000 msecs, it makes 2 seconds delay in displaying but frame display is smooth and without any corruption. Is this behavior related only to vlc? – M.Mahdipour Sep 30 '16 at 11:26
  • @M.Mahdipour you need to provide more detail about the environment. The Live555 only control the jitter buffer which is only relevant to UDP. Are you seeing the issues with UDP or TCP? I can only judge from what I see in the VLC sources, and I see no direct connection between this value and the live555 module, I may be wrong. But this value is used in multiple places during the PTS adjustment in VLC code. – Rudolfs Bundulis Sep 30 '16 at 11:35
  • I have tested with UDP. I have searched about jitter buffer in live555, some posts say that it does a jitter buffer, some posts say not! Is there any jitter buffer in live555? or its only the packet reordering inside it which is controlled using ReorderingPacketBuffer::setThresholdTime(...)? – M.Mahdipour Sep 30 '16 at 19:55
  • @RudolfsBundulis can you please tell in witch file (from source code) the network-caching is implemented? – afruzan Dec 08 '22 at 13:55
  • (or any link to git source) – afruzan Dec 08 '22 at 14:39
  • @afruzan I don't have a vlc checkout around. – Rudolfs Bundulis Dec 08 '22 at 14:42
  • @RudolfsBundulis can you help me to find? – afruzan Dec 08 '22 at 15:20
  • @afruzan here you go: https://github.com/videolan/vlc/blob/e21ba24dfd90016fe2c91f861e5498ebc019253a/modules/access/live555.cpp#L1787 – Rudolfs Bundulis Dec 08 '22 at 18:37