Video playback over smb skipping/lagging

macOS specific usage questions
chaos2oo2
Blank Cone
Blank Cone
Posts: 21
Joined: 22 Jul 2013 18:41

Re: Video playback over smb skipping/lagging

Postby chaos2oo2 » 04 Feb 2015 08:49

SMB access is done by the OSX kernel, not VLC code.
true, but it's not an SMB problem, like I posted above: it also happens in AFP and on BOTH protocols I get more than 13 MB/s when I copy the file from my NAS via finder.

It's not like that I am totally willing to help you fix this problem. I opened a bug (https://trac.videolan.org/vlc/ticket/13622), I posted logs and things, I send you an email with my contact address but nobody seems to care of fixing this problem. And that's frustrating somehow.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Video playback over smb skipping/lagging

Postby Jean-Baptiste Kempf » 04 Feb 2015 11:38

It's frustrating, because noone knows. Don't believe people don't read those posts.

Maybe some wiresharking is in order.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: Video playback over smb skipping/lagging

Postby dfuhrmann » 04 Feb 2015 22:16

but nobody seems to care of fixing this problem. And that's frustrating somehow.
Sorry, we are only a few people working on the OS X side of VLC, and we did not find any time to investigate this further, yet. And at least for me, I do not even have a proper smb server to test with here...

bubbl3
New Cone
New Cone
Posts: 1
Joined: 07 Feb 2015 05:40

Re: Video playback over smb skipping/lagging

Postby bubbl3 » 07 Feb 2015 05:44

but nobody seems to care of fixing this problem. And that's frustrating somehow.
Sorry, we are only a few people working on the OS X side of VLC, and we did not find any time to investigate this further, yet. And at least for me, I do not even have a proper smb server to test with here...
Streaming from network shares is becoming the first mean of access audio/video content, I suppose that a player like VLC should make it a priority to fix this issue.

Also is surprising that a player like MPlayerX that is not updated since early 2014 does not have this problem.

Yes, I registered to post this as I'm a new Mac user and disappointed I need to change my all platforms player of choice.

thegrb93
New Cone
New Cone
Posts: 2
Joined: 30 Mar 2015 02:32

Re: Video playback over smb skipping/lagging

Postby thegrb93 » 30 Mar 2015 02:36

I've found this thread via googling and it seems this is still a problem and it's a problem for windows too. Increasing the buffer length doesn't help and it's impossible to play shared files without running out of buffer. I've found that windows media player works fine though so I'll have to use that for my shared media I suppose.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Video playback over smb skipping/lagging

Postby Jean-Baptiste Kempf » 30 Mar 2015 14:24

I've found this thread via googling and it seems this is still a problem and it's a problem for windows too. Increasing the buffer length doesn't help and it's impossible to play shared files without running out of buffer. I've found that windows media player works fine though so I'll have to use that for my shared media I suppose.
No, this is not the same issue.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

thegrb93
New Cone
New Cone
Posts: 2
Joined: 30 Mar 2015 02:32

Re: Video playback over smb skipping/lagging

Postby thegrb93 » 01 Apr 2015 07:09

After updating to windows 7 service pack 1, my issue seems to be resolved.

Kittles
New Cone
New Cone
Posts: 1
Joined: 31 May 2015 17:49

Re: Video playback over smb skipping/lagging

Postby Kittles » 31 May 2015 18:19

Hi Folks,

I've been trying to find a solution to this issue for quite some time now.

I can confirm this behavior is consistently recurring across these OSes
Windows 8/8.1
Windows 10 Builds 10074 to 10130 (latest)
OS X Yosemite
ElementaryOS (Super sexy Ubuntu variant)

The common factors to all of these are:
1. Files are always opened over SMB (However there are reports of similar issues with AFP)
1a. It may be fair to to say that opening a file in VLC over a network file sharing protocol seems to consistently trigger this issue.
2. VLC Media player (always latest, but I think I've been seeing this issue all through VLC 2.x)

I have tested running over 1Gb LAN and over WiFi (even different wireless routers). Changing the buffer times has no effect on the frequency of occurrence of this bug. Typically, a movie will stop at least once an hour, sometime every few minutes. The varying frequency at which this bug occurs is an interesting data point also. I have considered IO saturation on the SAN and tested streaming videos from an SSD-backed SMB share over LAN. The IO on the remote drive would only spike (minimally) when VLC stops playing and starts re-buffering. Same can be observed in terms of network saturation. All in all, IO/Network could be ruled out especially given that across my testing the load has been under 1% of capacity network/drive capacity. Moving the same 1080p file over the same network would take less than 3 mins (typical movie length). Streaming it seems to delay the start by about 10 sec and playback has been stopping to re-buffer anywhere between once or twice for the full movie to every could of minutes.

I am tempted to start a bug bounty for this. If any of the VLC devs have a preference for how to fund or where to set up this bounty, please don't hesitate to PM or reply to let me know how you'd like me to proceed.

TL;DR
Video file sizes keep going us, even as most of us are moving to SSDs where storage capacity is a drawback. Many of us are starting to depend more and more on NAS/SAN solutions for long-term storage and playback of our media collections. This trend is met with some challenges by our favorite media player, VLC, as playback over the network studders to re-buffer and can sometimes make movies unwatchable. This thread is urging VLC users to add any additional data points so that VLC developers have enough information to accurate reproduce and troubleshoot this behavior.

matryska
New Cone
New Cone
Posts: 1
Joined: 19 Jun 2015 02:41

Re: Video playback over smb skipping/lagging

Postby matryska » 19 Jun 2015 03:05

using a MacBook and MacBook Pro and 1080i TS files, I can confirm this longstanding problem using SMB and AFP networking on OS X Yosemite and Mavericks:

files over 802.11ac copy at 20-40 megabytes per second - this is more than enough bandwidth
playback in VLC 2 or 3 nightly is very choppy
playback in VLC 1 is smooth
playback in Movist (app store version) is smooth
playback in QuickLook and QuickTime is smooth

clearly this is a VLC 2 or 3 problem with accessing files over a network share
as noted in other posts above, increasing the cache in VLC 2 or 3 does not help. it just makes it take longer to buffer when it stutters
i also find VLC is buffering its data with rates far lower than the bandwidth available, regardless of the buffer settings
it's good to see that the others above have reported the same findings
it is not useable

agree that streaming from network shares is a priority - fortunately we have Movist, QuickTime and VLC 1 for this!
feel free to suggest other media players so i can test them too

stoo
New Cone
New Cone
Posts: 1
Joined: 22 Oct 2016 11:55

Re: Video playback over smb skipping/lagging

Postby stoo » 22 Oct 2016 19:22

I have the exact same issue.

File copy throughput is around 45MB/s
but streaming via both SMB and AFP skipping and lagging sometimes, and slow on seek.

then I use Kodi for playback, no more lagging and really fast on seeking also, almost instant jump to my cursor.

Thanks,

mikerost
New Cone
New Cone
Posts: 2
Joined: 31 May 2017 04:03

Re: Video playback over smb skipping/lagging

Postby mikerost » 31 May 2017 04:23

I thought I would tag onto this thread because it is the first search I found doing google search and my symptoms were similar. If this is different issue please let me know and I will post there. I was able to pinpoint my issue to hardware switch and swapping it with a new one fixed the problem.

Setup: Windows 7 x64, VideoLAN 2.2.6, streaming MTS video (22mbps) over 1gbps wired local network (from Win 2008 server)

Symptoms:

* Video lags/pauses every few seconds, with orange bar "loading" at bottom of GUI from left to right
* Video buffer seems to be getting fresh content only with it is paused (resource manager shows network usage up, CPU usage down)
* no problems playing video when it is same file playing from computer
* files transfer over 400+mbps without issue or slowdown (connection seems very good!)
* no other problems noticed with network connection downloading/streaming anything else
* Video streams fine from 2 other Win7 x64 computers on network

Tried:

* increasing network buffer in advance settings only made problem worse
* Swapped Realtek ethernet card
* Updating Realtek drivers

Fix:

* Swapped out TP-LINK TL-SG1008D dumb switch (8-port) with Trendnet 5-port dumb switch. Problem went away.

I wish I knew more about networks to understand why this issue only comes up when streaming large size video.

iHateMacs
New Cone
New Cone
Posts: 3
Joined: 12 Aug 2017 04:22

Re: Video playback over smb skipping/lagging

Postby iHateMacs » 12 Aug 2017 04:33

BTW - instead of my speculating from a very weak technical position about what VLC is doing - here's what the log says when there's a freeze in VLC playback. The following is a cut and paste from the log immediately after three short freezes which all occurred within the space of a couple of minutes.

core error: \cf4 ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 14071 ms ignored)\
\cf2 core warning: \cf3 playback way too early (-1998446): playing silence\
\cf2 core debug: inserting 95925 zeroes\
core error: \cf4 ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 14575 ms ignored)\
\cf2 core warning: \cf3 playback way too early (-1997660): playing silence\
\cf2 core debug: inserting 95887 zeroes\
core error: \cf4 ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 15744 ms ignored)\
\cf2 core warning: \cf3 playback way too early (-1997774): playing silence\
\cf2 core debug: inserting 95893 zeroes\
where did you get this output report? I need to do the same, it is 2017 and I still get CONSTANT stuttering while playing videos, only on mac, every time

dalx
New Cone
New Cone
Posts: 5
Joined: 19 Nov 2014 22:52

Re: Video playback over smb skipping/lagging

Postby dalx » 16 Sep 2017 07:25

I'm not sure if this is a Mac-only issue as I experience it on Windows with larger video files. It is the first result in a google search, so here is my finding.

Looking at Wireshark I see VLC 2.2.6 reads the video over SMB in relatively smaller chunks. It stutters every once in a while and skipping around within the file is not quick and definitely not instantaneous.

When viewing the same file over SMB in Media Player Classic 1.7.13 it always uses Len of 65536 and it skips instantaneously within the file. (mp4/mkv)

Wireshark VLC example

SMB2 171 1059 445 Read Request Len:32768 Off:744488960 File:
SMB2 171 1059 445 Read Request Len:4096 Off:744521728 File:
SMB2 171 1059 445 Read Request Len:4096 Off:744525824 File:
SMB2 171 1059 445 Read Request Len:8192 Off:744529920 File:
SMB2 171 1059 445 Read Request Len:24576 Off:744538112 File:
SMB2 171 1059 445 Read Request Len:24576 Off:744562688 File:
SMB2 171 1059 445 Read Request Len:32768 Off:744587264 File:
SMB2 171 1059 445 Read Request Len:4096 Off:744620032 File:
SMB2 171 1059 445 Read Request Len:4096 Off:744624128 File:
SMB2 171 1059 445 Read Request Len:4096 Off:744628224 File:
SMB2 171 1059 445 Read Request Len:4096 Off:744632320 File:
SMB2 171 1059 445 Read Request Len:24576 Off:744636416 File:
SMB2 171 1059 445 Read Request Len:24576 Off:744660992 File:

Wireshark MPC example
SMB2 171 1059 445 Read Request Len:65536 Off:829014016 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829079552 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829145088 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829210624 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829276160 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829341696 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829407232 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829472768 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829538304 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829603840 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829669376 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829734912 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829800448 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829865984 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829931520 File:
SMB2 171 1059 445 Read Request Len:65536 Off:829997056 File:

( tshark -r capture.pcapng | grep "Read Req" .... )

HolmesSkillet
New Cone
New Cone
Posts: 4
Joined: 19 Sep 2017 01:37

Re: Video playback over smb skipping/lagging

Postby HolmesSkillet » 19 Sep 2017 01:42

Created an account here just to comment that I too experience this extremely frustrating and aggravating problem. Here at our media school we have smb shares that we access from iMacs in our lab. If anyone finds a solution, or an alternative player that we can use on on our iMacs here (I have Windows/MPC at home that work great...) I would be super grateful.

Mmartins
New Cone
New Cone
Posts: 4
Joined: 21 Feb 2012 15:38

Re: Video playback over smb skipping/lagging

Postby Mmartins » 05 Nov 2017 20:21

Same problem here on my osx High Sierr. Quicktime works perfectly.

hotpxl
New Cone
New Cone
Posts: 1
Joined: 25 Nov 2017 20:43

Re: Video playback over smb skipping/lagging

Postby hotpxl » 25 Nov 2017 20:45

I observed the same problem on mac os 10.13.1 over both smb and afp. I have not tried other players.

I wonder if there are any debugging tools available for vlc, like "displaying current buffer size" and so on. My guess is prefetching is not fired up at the right moment, hence the delay.

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: Video playback over smb skipping/lagging

Postby dfuhrmann » 26 Nov 2017 18:27

Please retry with a VLC 3.0 nightly build.

I never had any problems like this with my current smb / afp I have noadays.

yetisyny
Blank Cone
Blank Cone
Posts: 17
Joined: 29 Oct 2017 03:25

Re: Video playback over smb skipping/lagging

Postby yetisyny » 01 Dec 2017 05:37

Honestly for me playback of files over smb shares from Windows machines on macOS is much smoother with fewer problems in VLC Media Player than in other players like QuickTime (which is generally awful) or even mpv (which other than this problem and difficulties with certain malformed video files that only VLC can handle correctly is generally quite good). I regularly play lots of videos all the time over smb shares on macOS and VLC is the player that has the least issues for me. The biggest issue I had with VLC was subtitle display but that has been fixed now that version 2.2.7 and 2.2.8 are out, I use version 2.2.8 now. And yeah I do this over WiFi on an 802.11g/n/ac network (802.11ac for devices that support it, 802.11n for devices that are not ac-compatible, and 802.11g for devices that are not even n-compatible). My Mac supports 802.11n but not 802.11ac and it works fine over the WiFi, and as for the Windows PC hosting the video files on smb, it is connected to the router via a 100 Mbps Ethernet cord. No problems at all for me streaming those over the LAN in VLC.

The only real difficulty is that macOS does not have a very good smb implementation and it takes several minutes for network drives to show up after the computer restarts or is turned on, but that is a macOS issue, not a VLC issue. In Windows, network drives show up within seconds rather than taking minutes like on macOS, and also Windows correctly handles non-ASCII characters in filenames on smb shares while macOS has problems if the filenames contain any accented/umlauted/etc. characters due to an issue of how accented/umlauted/etc. characters can either be represented by one Unicode character or by a regular ASCII character plus a Unicode combining character for the accent, umlaut, or whatever. macOS has serious issues with non-ASCII characters that can be represented using combining characters in Unicode and is unable to display or load the files correctly from smb shares. Occasionally I have problems in VLC with files on smb shares but that only happens with files that have accents, umlauts, or such in the filenames and which macOS itself is unable to display or access because its implementation of Unicode support for smb is buggy. That particular smb issue is an Apple bug not a VLC bug. The way I even get VLC to attempt loading such files in the first place is by using playlists and editing them in text editors.

As far as the issue with smb not playing smoothly and skipping or tearing or pausing or getting stuck, that is something I have had happen on every video player for macOS I have tried EXCEPT FOR VLC, oddly enough. Strange how my experience with this is inconsistent with other people’s. Since the exact network setup and particular video files being used differ, I can see how such an inconsistency could arise, but still, I find this kinda odd, I thought better support for streaming over smb than other macOS video players was one of the advantages of VLC but for a bunch of other people their experience is the opposite. I have only tried it on 2.2.x versions of VLC and not older versions, maybe that is why, apparently VLC used to not be as good at this prior to the current 2.2.x versions.

HolmesSkillet
New Cone
New Cone
Posts: 4
Joined: 19 Sep 2017 01:37

Re: Video playback over smb skipping/lagging

Postby HolmesSkillet » 01 Dec 2017 08:56

Interesting Yetisyny. Can you tell us how large your media files are? Are you playing HD content through SMB shares? 4k content?

I tried a nightly build of 3.0 and the problem was slightly improved but still had some occasional issues with 1080p content, and still severe lagging with 4k content.

I'm currently building a PC for my station at work mainly to avoid this problem in the future.

yetisyny
Blank Cone
Blank Cone
Posts: 17
Joined: 29 Oct 2017 03:25

Re: Video playback over smb skipping/lagging

Postby yetisyny » 03 Dec 2017 04:51

No the content I watch is not HD or 4K, unless you consider 720p to be HD. I watch stuff in the 480p to 720p range mostly and do not have any trouble with it. Also some of the videos I watch are with the HEVC a.k.a. H.265 video codec instead of the older AVC a.k.a. H.264, but those videos are only 480p resolution (720x480 pixels like on an NTSC DVD).

So if your issue is occasional issues with 1080p content and severe lagging with 4K, that would probably happen to me too if I actually tried it, my Mac is not really built to handle anything above 720p though and the screen is 1280x800 pixels so I have no need for higher resolutions than my screen can display.

I did find an article on fixing slow SMB that occurs on Mac OS X 10.11.5 (the 5th El Capitan update) as well as later versions like Sierra and High Sierra. It might be helpful to you, apparently turning off signing of connections in SMB increases the data transfer speed to be several times faster: https://dpron.com/os-x-10-11-5-slow-smb/

You should try that solution and see if it can increase your SMB transfer speed. Basically it will make things faster by simply sending and receiving the data as-is instead of encrypting it on the server end and decrypting it on the client end, since encryption and decryption is a CPU and memory-intensive process that slows things down and is completely unnecessary for shared video files on a LAN.

I tried it out myself and found that disabling encryption causes connections to SMB shares on Windows 10 servers from a macOS client to no longer work. So I undid the change. But if you CAN still connect, your SMB connection speed should be higher. It seems the SMB server must be set for encryption to be either optional or disabled, and in Windows 10 at least, apparently the default now is set to be always-on. From what I have read, there are ways to disable encryption/signing of SMB on both the client and server end so it has to be done on both ends. So I could get it working if I also disabled server-side SMB signing on the SMB server running Windows 10.

HolmesSkillet
New Cone
New Cone
Posts: 4
Joined: 19 Sep 2017 01:37

Re: Video playback over smb skipping/lagging

Postby HolmesSkillet » 03 Dec 2017 18:37

Interesting! Thank you for the information. I will certainly look into that.

Pienamics
Blank Cone
Blank Cone
Posts: 14
Joined: 16 Jul 2014 15:59

Re: Video playback over smb skipping/lagging

Postby Pienamics » 01 Mar 2018 16:25

Still a problem for me. Over three years and counting since the first post. I'm now on El Cap. and VLC still stutters. It doesn't buffer. Other players work fine. Little Snitch shows the huge slug of data they take as they start up, but not VLC.

HolmesSkillet
New Cone
New Cone
Posts: 4
Joined: 19 Sep 2017 01:37

Re: Video playback over smb skipping/lagging

Postby HolmesSkillet » 01 Mar 2018 19:54

I built a PC. Zero issues, and I get to use MPC instead of VLC. Win win.

Eld0r
New Cone
New Cone
Posts: 4
Joined: 13 Mar 2018 17:15

Re: Video playback over smb skipping/lagging

Postby Eld0r » 13 Mar 2018 17:43

I use Win10 as NAS and another Win10 with VLC to access it.
spikes of whole bandwich and zero in exchange.
even with 60 second network buffer (only the time between lags increase)
So this is a elementary problem of VLC and not solved since 2011 ?
https://superuser.com/questions/317470

I'll try MPC, too...
Edit: smooth evenly upload and no lags and modest using of bandwich.

Skullet
New Cone
New Cone
Posts: 1
Joined: 04 Aug 2018 19:38

Re: Video playback over smb skipping/lagging

Postby Skullet » 04 Aug 2018 19:48

I have this exact same issue, at first I thought it was a problem with my NAS but after trying the Elmedia Player I realised that VLC is the problem as Elmedia plays without any pausing or issues. It's disappointing that this problem has been going on since 2011, I never liked VLC on PC I always found MPC to be a much better player but it wasn't available on the Mac sadly.


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests