How does VLC-player play Samba-shared video files?

2

I have to Virtual Machines (Ubuntu 18.04) which are running on the same internal network.

The Server-VM stores a video in a folder which is shared to the Client-VM using Samba.

The bitrate of the video looks like this: enter image description here

Now I use the VLC-player to play this video on the Client-VM.

The thing I am wondering about:

Method A:

When the shared folder is mounted, it is available for the Client-VM under the path: /run/user/1000/gvfs/smb-share:server=vm1server.local,share=testvideos/.

I play the video with this command (which is the same like doing "Open file" in the VLC GUI):

vlc /run/user/1000/gvfs/smb-share:server=vm1server.local,share=testvideos/bbb_sunflower_2160p_60fps_normal.mp4

I get the following datarate in Wireshark:

enter image description here

Method B

No matter if the shared folder is mounted, when I play the video with this command (which is the same like doing "Open network stream" in the VLC GUI):

vlc smb://vm1server.local/testvideos/bbb_sunflower_2160p_60fps_normal.mp4

I get the following datarate in Wireshark:

enter image description here

Note that the datarate is more or less the same. Only at the beginning, I get 12Mbit/s in the first example and 140Mbit/s in the second one.

Does anybody know the difference about the two methods I use to play the video?

jjulianf

Posted 2018-09-07T16:57:40.983

Reputation: 133

What are your file caching and network caching settings? (picture).

– Kamil Maciorowski – 2018-09-07T21:10:24.740

I used the standard settings, which are the same like in the picture you showed. 300ms for file caching and 1000ms for network caching. But I played around with these values, but the datarate always looked the same for Method B. The initial spike always had the same value and length. – jjulianf – 2018-09-08T13:05:35.627

Answers

1

This may simply be a case of different buffering approaches. In Method A, VLC allows Samba driver / filesystem / OS to read the data as needed. In Method B, VLC itself may decide to fill a large buffer on startup and then fall back to gradual reading. This would explain the initial spike.

Stanley Yu

Posted 2018-09-07T16:57:40.983

Reputation: 369

Thanks for your answer! 1) How can I check/change the value of this large startup buffer in VLC? I played around with the cache settings in VLC but it didn't change the spike behaviour. 2) Why is VLC reading the data just like needed after the spike? First it is reading the data in its buffer and then it is reading the data again? How can that make sense? – jjulianf – 2018-09-08T13:12:33.157