GNOME Bugzilla – Bug 686598
Totem treats mounted gvfs-smb share as local files
Last modified: 2013-06-13 08:43:28 UTC
If I mount a samba share via nautilus, and try and stream a video from it with totem, totem has horrible buggering problems, constantly stopping and buffering, and this is over a pretty fast wireless connection (300mbit link speed, good signal). I have no problems streaming videos on the same connection under windows, it only happens when streaming under linux/gnome/totem via gvfs-smb. totem doesn't seem to do any buffering at all and treats the mounted share as if it were local. This sounds like this old bug with the xine backend, and it looks like it was never re-filed for the gvfs backend: https://bugs.launchpad.net/ubuntu/+source/totem/+bug/108623 https://bugzilla.gnome.org/show_bug.cgi?id=390003 Streaming videos over samba from nautilus is very unusable in the current state. I've seen this bug for ages on about every distro I've used.
typo at beginning, meant *buffering* problems.
I use Totem and gvfs-smb to play videos on a regular basis, and you'd only see that problem if the bandwidth available was too small. Check your network speed under Linux, I doubt the drivers, the network stack or the smb virtual filesystem are the same in Linux and Windows, so blaming the video player so early isn't going to help.
If I run a speedtest I get consistant ~25mbit. I can get no lag in vlc or gnome-mplayer as long as I set a reasonable buffer (6000ms). Totem doesn't seem to do much buffering at all, consistantly slowing down and stuttering at consistent intervals.
And for the local speed gnome reports a link speed of 130mb/s. Copying a large file from the samba share to my laptop gives me a consistent 4-5 megabytes per second. The files I stream when I have this problem aren't that large, ~1gb 720p videos.
And just to make things more clear, on when the stuttering happens: It happens like clockwork, every 10 minutes or so the video will massively slow down for 10-15 seconds and then go back to normal. I did try increasing totem's buffer size in dconf-editor (org.gnome.totem network-buffer-threshold), which seemed to have no effect on the video stuttering, which is one of the things that led me to believe totem isn't doing any buffering for me. In addition, when this lag occurs, if I pause the video to try and let the buffer catch up, I can see in the gnome-system-monitor that totem just immediately stops the download completely until its un-paused, and doesn't seem to buffer it. I've been trying other players too now, and have had the same problem with them. VLC with default settings also has the same problem with mounted smb shares (seems to treat them as local files, its network caching setting has no effect, but its local file cache setting does, if I increase its local cache to something like 5000ms its dandy. Is there a local file cache setting in totem I can test to see?. Is there any sure-fire way to tell if totem is treating the video as a stream or a local file? Is this an issue with mounted shares via gvfs in general, or are all these video players just "mistreating" them? I haven't had any network speed problems besides this specific issue.
I set up an ftp server on the machine I usually stream my videos from to see if totem behaved any differently with that. Connected to the FTP server with nautilus and opened a video with totem. I clearly saw a little "buffering" bar when totem opened, and I get none of the above mentioned lag (and I'm using totem's default buffer settings). I've never once seen that buffering bar when opening a video with totem from a mounted smb share, and I get a lot of lag with the smb share, this furthers my belief that with a gvfs-smb share totem either isn't buffering, or not buffering enough.
Should be possible to do better now, we have recently added a query for this, just needs to be implemented in the source element. *** This bug has been marked as a duplicate of bug 679708 ***
You'll probably also need the change from: https://bugzilla.gnome.org/show_bug.cgi?id=697297 as well as all the fixes that made it possible to use GIO for smb in gvfs/glib.