[Solved] Playing a movie over the lan

[Solved] Playing a movie over the lan

Postby jiml8 » Jul 30th, '14, 02:21

I have noticed what I consider to be peculiar behavior out of Mageia. Not sure if this is all Linux, but it certainly is Mageia.

If I open a network share using SMB, then click on a movie that I want to play, it does not play until the entire movie has been copied into a temporary location on a local drive. I have not tried it in NFS, but if I open an iscsi share across the LAN, the behavior is what I would expect; there is buffering and the movie starts to play almost immediately, while downloading into a buffer in the background.

Does anyone know if there is a way to get Mageia (or samba...or the media player...whoever is responsible for this behavior...) to behave the same way? Buffer a fraction of the file and start playing it, while downloading it into the buffer in the background?

The behavior seems to occur with all the players I try - VLC, kmplayer, gwenview, totem - and of course the mplayer backend that many of them use.
Last edited by jiml8 on Aug 1st, '14, 09:17, edited 1 time in total.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Playing a movie over the lan

Postby Ken-Bergen » Jul 30th, '14, 03:38

What version of Mageia are you using 1, 2, 3, 4 or Cauldron?
I do remember that behaviour in 1, 2 and perhaps 3 but not with 4 or Cauldron which start playing within a few seconds.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Playing a movie over the lan

Postby jiml8 » Jul 30th, '14, 05:50

This is Mageia 4. I don't know if earlier versions did this; I am just now trying to do this since deploying my new NAS.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Playing a movie over the lan

Postby Ken-Bergen » Jul 30th, '14, 07:57

Could you post your /etc/fstab entry for the share to see if there's a clue there?

Here's mine
Code: Select all
//ba-06e05a/Public /mnt/Public cifs username=%,password=,uid=ken 0 0
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Playing a movie over the lan

Postby jiml8 » Jul 30th, '14, 08:49

There is no fstab entry on the Linux system; this is shared via samba from my NAS, and I just open a Dolphin window using an icon on my desktop that I created many years ago named "Network Neighborhood", then browse the workgroup to the share I want to look at. The NAS runs FreeBSD, and there is no fstab entry for the array. It is a ZFS filesystem loaded on an encrypted volume, and the opening of the encrypted volume and mounting is handled dynamically.

The ZFS volume properties are these, as reported in the NAS4free gui:

Code: Select all
  ZFS volume properties
  NAME  PROPERTY              VALUE                  SOURCE
VD01  type                  filesystem             -
VD01  creation              Tue Jul 22  2:40 2014  -
VD01  used                  2.26T                  -
VD01  available             26.3T                  -
VD01  referenced            2.26T                  -
VD01  compressratio         1.00x                  -
VD01  mounted               yes                    -
VD01  quota                 none                   default
VD01  reservation           none                   default
VD01  recordsize            128K                   default
VD01  mountpoint            /mnt/VD01              local
VD01  sharenfs              off                    default
VD01  checksum              on                     default
VD01  compression           off                    default
VD01  atime                 on                     default
VD01  devices               on                     default
VD01  exec                  on                     default
VD01  setuid                on                     default
VD01  readonly              off                    default
VD01  jailed                off                    default
VD01  snapdir               hidden                 default
VD01  aclmode               discard                default
VD01  aclinherit            restricted             default
VD01  canmount              on                     default
VD01  xattr                 off                    temporary
VD01  copies                1                      default
VD01  version               5                      -
VD01  utf8only              off                    -
VD01  normalization         none                   -
VD01  casesensitivity       sensitive              -
VD01  vscan                 off                    default
VD01  nbmand                off                    default
VD01  sharesmb              off                    default
VD01  refquota              none                   default
VD01  refreservation        none                   default
VD01  primarycache          all                    default
VD01  secondarycache        all                    default
VD01  usedbysnapshots       0                      -
VD01  usedbydataset         2.26T                  -
VD01  usedbychildren        8.88M                  -
VD01  usedbyrefreservation  0                      -
VD01  logbias               latency                default
VD01  dedup                 off                    default
VD01  mlslabel                                     -
VD01  sync                  standard               default
VD01  refcompressratio      1.00x                  -
VD01  written               2.26T                  -
VD01  logicalused           2.26T                  -
VD01  logicalreferenced     2.26T


Note that I am using hardware RAID6, so the OS on the NAS sees the array as one big 32 TiB disk.

SMB on the NAS has been configured to work well with Windows, and it does. my Windows 7 VM accesses the Video directory and plays the videos without incident. Windows Media Player does begin playing as soon as enough has been buffered, and the buffer seems to keep up fine with the playback.

The smb.conf file on the NAS is this:
Code: Select all
[global]
encrypt passwords = yes
netbios name = JSSNAS
workgroup = HOMEGROUP
server string = NAS4Free Server
security = user
max protocol = SMB2
dns proxy = no
# Settings to enhance performance:
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = TCP_NODELAY SO_SNDBUF=64240 SO_RCVBUF=64240
# End of performance section
unix charset = UTF-8
store dos attributes = yes
local master = no
domain master = no
preferred master = no
os level = 0
time server = no
guest account = ftp
map to guest = Never
display charset = LOCALE
max log size = 100
syslog only = yes
syslog = 1
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1
dos charset = CP437
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
passdb backend = tdbsam
idmap config * : backend = tdb
idmap config * : range = 10000-39999
aio read size = 4096
aio write size = 4096
bind interfaces only = yes
interfaces = re0

[Videos]
comment = movies and TV shows
path = /mnt/VD01/Videos
writeable = yes
printable = no
veto files = /.snap/.sujournal/
hide dot files = no
guest ok = no
inherit permissions = yes
vfs objects = shadow_copy2 zfsacl
shadow:format = auto-%Y%m%d-%H%M%S
shadow:snapdir = .zfs/snapshot
shadow:sort = desc
shadow:localtime = yes
veto files = /.zfs/
hosts allow = 192.168.0.0/24 172.16.187.0/24


So, it works properly with Windows. It does not work properly with Linux...at least, with Mageia 4; I really have not tried with any of my Linux VMs, though I suppose I should.

Now, I have established an extent on the NAS which I mount on my workstation as a local drive using iscsi, and if I play a movie from the iscsi extent, I get the desired behavior; the Linux media players act as if the movie file was a local file instead of coming across the LAN. So I think it is something the media players are doing, but I'm not sure of that.

Of course, I COULD just keep all the videos in that extent, but I don't want to do that; I want to share them via SMB (and possibly other ways) so this NAS can function as a multimedia repository for the house in addition to providing me with all the storage I need for my business. I specifically want to keep my workstation, and the facilities on my workstation, pretty much private to the workstation. Hence the iscsi extent will support the workstation, not provide multimedia support to the house.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Playing a movie over the lan

Postby jiml8 » Jul 30th, '14, 09:13

Well, I did just try this in a couple of other VMs. Both my OpenSUSE 13.1 VM and my FreeBSD 10 (with KDE) VM did the same thing; both started downloading the movie file to a local cache before playing it.

As I say, my Windows 7 VM plays it from the share on the fly.

So, this is not just a Mageia issue; it is something more basic than that.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Playing a movie over the lan

Postby doktor5000 » Jul 30th, '14, 18:33

That is a KDE issue, IIRC that particular behaviour is with the kio slave for cifs/smb. I think we have an older thread for that, maybe I can dig it up ...
AFAIR, if you use fstab mounts, or e.g. autofs to mount the Samba shares that buffering/stuttering issue won't show up. Is that the case?

A loosely related thread is viewtopic.php?f=23&t=3789 and another viewtopic.php?f=25&t=7451 but those are not the ones about that stuttering issue with videos from a cifs / smb share.

EDIT: Here's the same issue: http://forums.opensuse.org/showthread.php/434874-Cant-watch-video-over-samba-share-(browsed-via-dolphin)-with-dragon-player-or-kaffeine
And a bug for that: https://trac.videolan.org/vlc/ticket/9885
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Playing a movie over the lan

Postby Ken-Bergen » Jul 30th, '14, 22:30

jiml8 wrote:Well, I did just try this in a couple of other VMs.
Well a VM does add another layer which could be part of the problem.

I did try un-mounting my NAS and using Dolphin to access the movies on it and the results were not good.
The movies I tried did start playing within seconds as if they were on a local drive but if they had an inbeded menu that did not work, sound did not work and the aspect ratio appeared to be incorrect.

This is using Mageia Cauldron on a hard drive installation.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Playing a movie over the lan

Postby doktor5000 » Jul 30th, '14, 22:46

That will also use the aforementioned kio slave. Try again with a regular mount, same behaviour?

Or try the same with konqueror, for some users that seems to work.

To debug the kio slave, use kdebugdialog and look in ~/.xsession-errors as mentioned in e.g. https://forum.kde.org/viewtopic.php?t=90865
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Playing a movie over the lan

Postby Ken-Bergen » Jul 30th, '14, 23:05

doktor5000 wrote:That will also use the aforementioned kio slave. Try again with a regular mount, same behaviour?
If that's directed at me I use a regular mount with no problem.
My test was only to see if I could reproduce the problem Jim is having and I couldn't using Cauldron but as I said I did see other problems.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Playing a movie over the lan

Postby jiml8 » Jul 31st, '14, 21:42

Ken-Bergen wrote:
jiml8 wrote:Well, I did just try this in a couple of other VMs.
Well a VM does add another layer which could be part of the problem.


Of course, that is true. But I have a lot of experience with VMWare networking and have always found the compatibility to be excellent. So I am strongly inclined to doubt that the virtual machine layer is affecting this behavior. Also, of course, a virtual Windows 7 system running in the same virtualization software performs as expected.

I did try un-mounting my NAS and using Dolphin to access the movies on it and the results were not good.
The movies I tried did start playing within seconds as if they were on a local drive but if they had an inbeded menu that did not work, sound did not work and the aspect ratio appeared to be incorrect.

This is using Mageia Cauldron on a hard drive installation.


Well, that behavior is different than what I see.

I rather suspect that Doktor has hit upon it, and the links provided seem to support that. I can turn on NFS and mount the share, I just wanted to explore using SMB throughout just in the interest of compatibility and simplicity. But, if KDE interferes with that, then so be it.

For now, I cannot test this. I am just deploying this NAS and shaking the bugs out, and I determined last evening that ZFS in combination with hardware RAID the way I am doing it was a serious mistake, leaving a fragile array rather than a robust one. So I blew it off, reformatted with UFS, and am now reloading it. I learned some things about ZFS, which I have never used before, so the time was not wasted. But, since my LAN only runs at 100 MB/sec (at least, until later today when those CAT-6 cables should arrive), it is taking awhile to reload that NAS.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Playing a movie over the lan

Postby Ken-Bergen » Jul 31st, '14, 22:05

jiml8 wrote:
Ken-Bergen wrote:I rather suspect that Doktor has hit upon it, and the links provided seem to support that. I can turn on NFS and mount the share, I just wanted to explore using SMB throughout just in the interest of compatibility and simplicity. But, if KDE interferes with that, then so be it.
If you look at the /etc/fstab entry I posted you'll see that my NAS box is using SMB and in fact that's all it's capable of.
Once mounted the share behaves as if it were a local partition.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Playing a movie over the lan

Postby jiml8 » Aug 1st, '14, 05:45

My cat-6 cable arrived today which was the last component necessary to make my lan run at a 1 Gb/sec rate.

My NAS, which has an encrypted volume, and which I am now reloading, immediately began to accept data at 85-95 MB/sec over the iscsi connection (about 115 MB/sec would saturate the network connection) with the processor at 100% on both cores (because it has to encrypt all the incoming traffic before sending it to the RAID controller). I don't think I will find it necessary to put a faster processor in; this is good enough for my purposes, particularly when I am so close to saturating the channel.

So, I opened the samba share, and decided to move my video library by clicking and dragging from the local hard drive to the samba share on the NAS. That transfer is occurring at a whopping 16 MB/sec rate, and it is apparently being handled by a process called kio_smb, which seems to be willing to take about 5% of one core of my workstation processor.

So, samba - at least with KDE - is very slow, in addition to not allowing the kind of streaming I would like to see. I will try mounting the share to see if that speeds things up, but I am quite sure that NFS will run at the full speed the processor on the NAS will support, so I'll probably ultimately settle on that and leave SMB for those Windows machines that have access.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Playing a movie over the lan

Postby jiml8 » Aug 1st, '14, 09:16

Well I got tired of watching that slow SMB transfer, so I stopped it and mounted my video directory as an NFS share. I then uploaded the movie collection using rsync through that share.

This transfer completely buried the network channel without burying the processor on the NAS. I guess there must be a lot of overhead associated with the iscsi protocol that is not present with NFS.

In any event, I find I can't easily evaluate the NAS performance using NFS because I don't have any hard drives that can keep up on the workstation. Consequently, the file to be transferred is buffered into RAM then shipped across the wire to the NAS. The buffered file goes at pretty much full speed across the wire, and since the hard drive(s) can't keep up, when the buffer is empty the transfer stops.

So, I can stream videos this way and speed is not at all an issue. So I will mark this one "solved". I didn't get what I wanted, but what I did get is perfectly acceptable.
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09


Return to Video

Who is online

Users browsing this forum: No registered users and 1 guest

cron