Forum

Full Version: Video Stutter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
@nertskull

ok, tried. so much times and combinations that I know all the people involved in the movie. and will remember them for ever.

got the same shutters. then changed nfs mount options and used
Code:
vers=3,rsize=262144,wsize=65536


I have NFS4 support on my server so vers=3 might not be needed on your setup. by default the nfs mount creates buffers of 1M (read/write). Normally I never use more than 65536 (to get lower latency) but was never forced to use it (like this one) - now just have one argument more not to use such big buffers.

one more thing, there is smsc95xx.turbo_mode=Y used in Beta2 (/boot/cmdline.txt). It wasn't used with Beta1x as in general this can lead to conflict and nasty things under navy load - some irq conflicts with net/sd etc. but since this got much better will all to patches to RPI kernel, I decided to try with Beta2. you get a little more speed on net, but you get lets say worse overall performance if there is lot traffic on net, sd card and other devices. just want to say you can (in the worst case) change it to smsc95xx.turbo_mode=N.

in any case the buffers change was for me enough to play the video with sw DTS decode without shutters. still I always get ONE at the very beginning (in first 5s) but then no single one until finish.

report back.
(4th Oct, 2013 04:40 AM)mk01 Wrote: [ -> ]@nertskull

got the same shutters. then changed nfs mount options and used
Code:
vers=3,rsize=262144,wsize=65536


in any case the buffers change was for me enough to play the video with sw DTS decode without shutters. still I always get ONE at the very beginning (in first 5s) but then no single one until finish.

report back.

Success!! Kind of.

It actually works now....when it works. I don't know if these are related or not. But when a video plays, my stuttering/skipping issues are gone. Thank you so much.

The problem is, now when I ask a video to play, sometimes nothing happens. So I try again. And nothing happens. And then a error pops up saying that an error occurred and the video couldn't be played.

So I restart the Pi and sometimes it works, sometimes it doesn't. But when it works, all videos play and everything is smoother now. But sometimes I have to restart 3 or 4 times.

Here is the last bit of log file when that happens. It says "skipping unplayable item". It clearly plays it sometimes, so I don't know what that means.

Code:
07:17:23 T:3041116800  NOTICE: initializing playlistplayer
07:17:23 T:3041116800  NOTICE: DONE initializing playlistplayer
07:17:23 T:2961175616  NOTICE: Thread CDetectDVDMedia start, auto delete: false
07:17:23 T:3030307904   ERROR: CecLogMessage - failed to release the previous LA
07:17:23 T:3030307904   ERROR: CecLogMessage - could not open a connection (try 1)
07:17:25 T:3041116800  NOTICE: special://xbmc/sounds/sounds.xml, Line 0
                                            Failed to open file
07:17:26 T:3041116800  NOTICE: initialize done
07:17:26 T:2948899904  NOTICE: Thread XBPyThread start, auto delete: false
07:17:26 T:3041116800  NOTICE: Running the application...
07:17:26 T:2948899904  NOTICE: -->Python Interpreter Initialized<--
07:17:26 T:3041116800   ERROR: GLES: Vertical Blank Syncing unsupported
07:17:26 T:2940245056  NOTICE: Thread CEC Adapter Update Thread start, auto delete: false
07:17:30 T:2948899904  NOTICE: XBian : upgrade service started
07:17:30 T:2930385984  NOTICE: Thread Jobworker start, auto delete: true
07:17:30 T:3041116800  NOTICE: Webserver: Starting...
07:17:30 T:3041116800  NOTICE: WebServer: Started the webserver
07:17:30 T:2921997376  NOTICE: Thread XBPyThread start, auto delete: false
07:17:30 T:3041116800  NOTICE: ES: Starting event server
07:17:30 T:3041116800  NOTICE: starting zeroconf publishing
07:17:30 T:2854622272  NOTICE: Thread Jobworker start, auto delete: true
07:17:30 T:2871399488  NOTICE: Thread CEventServer start, auto delete: false
07:17:30 T:2871399488  NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777
07:17:30 T:2871399488  NOTICE: UDP: Listening on port 9777
07:17:30 T:2863010880  NOTICE: Thread CTCPServer start, auto delete: false
07:17:31 T:2921997376  NOTICE: -->Python Interpreter Initialized<--
07:25:44 T:2921997376  NOTICE: Thread Jobworker start, auto delete: true
07:25:54 T:2830099520  NOTICE: Previous line repeats 1 times.
07:25:54 T:2830099520  NOTICE: Thread BackgroundLoader start, auto delete: false
07:26:09 T:3041116800  NOTICE: COMXPlayer: Opening: /mnt/Aspartic_Acid/media/video/Movies/ProcessedBD/The_Lord_Of_The_Rings_The_Two_Towers_2002_extended_Disc_1.mkv
07:26:09 T:3041116800 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
07:26:09 T:3041116800  NOTICE: CXBMCRenderManager::ResetRenderBuffer - using 5 render buffers
07:26:09 T:2830099520  NOTICE: Thread COMXPlayer start, auto delete: false
07:26:09 T:2830099520  NOTICE: Creating InputStream
07:26:09 T:2830099520   ERROR: COMXPlayer::OpenInputStream - error opening [/mnt/Aspartic_Acid/media/video/Movies/ProcessedBD/The_Lord_Of_The_Rings_The_Two_Towers_2002_extended_Disc_1.mkv]
07:26:09 T:2830099520  NOTICE: COMXPlayer::OnExit()
07:26:09 T:2830099520  NOTICE: COMXPlayer::OnExit() deleting input stream
07:26:09 T:3041116800   ERROR: Playlist Player: skipping unplayable item: 0, path [stack:///mnt/Aspartic_Acid/media/video/Movies/ProcessedBD/The_Lord_Of_The_Rings_The_Two_Towers_2002_extended_Disc_1.mkv , /mnt/Aspartic_Acid/media/video/Movies/ProcessedBD/The_Lord_Of_The_Rings_The_Two_Towers_2002_extended_Disc_2.mkv]
07:26:09 T:2820457536  NOTICE: Thread BackgroundLoader start, auto delete: false
07:26:10 T:3041116800  NOTICE: COMXPlayer::CloseFile
07:26:10 T:3041116800 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
07:26:10 T:3041116800  NOTICE: COMXPlayer: waiting for threads to exit
07:26:10 T:3041116800  NOTICE: DVDPlayer: finished waiting

But thank you so much for getting the stuttering issue figured out.
(4th Oct, 2013 09:29 PM)nertskull Wrote: [ -> ]The problem is, now when I ask a video to play, sometimes nothing happens. So I try again. And nothing happens. And then a error pops up saying that an error occurred and the video couldn't be played.

So I restart the Pi and sometimes it works, sometimes it doesn't. But when it works, all videos play and everything is smoother now. But sometimes I have to restart 3 or 4 times.

and the NFS is mounted successfully each time (according to mount)? we spend much time on this, so maybe few more experiments with changing the buffers to be the same size for rsize and wsize could not harm.

so for instance put it both to 262144 or 65536 or even remove the two parameters completely (reverting to your previous options).

I could not find an output of "mount" without the changes to fstab so I don't even know what version of NFS was used (2/3), udp or tcp transport etc. It would be nice to see it for me. then maybe I get another ideas
.
(4th Oct, 2013 11:30 PM)mk01 Wrote: [ -> ]and the NFS is mounted successfully each time (according to mount)? we spend much time on this, so maybe few more experiments with changing the buffers to be the same size for rsize and wsize could not harm.

so for instance put it both to 262144 or 65536 or even remove the two parameters completely (reverting to your previous options).

I could not find an output of "mount" without the changes to fstab so I don't even know what version of NFS was used (2/3), udp or tcp transport etc. It would be nice to see it for me. then maybe I get another ideas
.
Yeah I believe they mount. But, I can only see the files. If I try to open a text file I get an "input/output error".

I tried changing things. I unmounted the drive. Deleted the rsize,wsize portions. Remounted the drive. And things work.

Ok. So maybe its not related to the new command.

I just restarted a few times withOUT the rsize/wsize arguments. And I STILL got one boot with "input/output error" when I tried to open a text file in nano.

This is my fstab line. Is something wrong with it? Or is it an issue elsewhere?

Code:
10.23.24.137:/media/Aspartic_Acid /mnt/Aspartic_Acid nfs _netdev,defaults,user,auto,noatime,intr 0 0
or
Code:
10.23.24.137:/media/Aspartic_Acid /mnt/Aspartic_Acid nfs _netdev,defaults,user,auto,noatime,intr,rsize=262144,wsize=65536 0 0

BOTH will give failures. But the 2nd, when it does work, prevents me from stuttering in playback.
(5th Oct, 2013 08:05 AM)nertskull Wrote: [ -> ]This is my fstab line. Is something wrong with it? Or is it an issue elsewhere?

Code:
10.23.24.137:/media/Aspartic_Acid /mnt/Aspartic_Acid nfs _netdev,defaults,user,auto,noatime,intr 0 0
or
Code:
10.23.24.137:/media/Aspartic_Acid /mnt/Aspartic_Acid nfs _netdev,defaults,user,auto,noatime,intr,rsize=262144,wsize=65536 0 0

BOTH will give failures. But the 2nd, when it does work, prevents me from stuttering in playback.

please post output of "mount". I need to see what others parameters are. mount will output them.
(5th Oct, 2013 08:56 AM)mk01 Wrote: [ -> ]please post output of "mount". I need to see what others parameters are. mount will output them.

Here they are when things are working. Do you need them when things are not working?

Code:
/dev/mmcblk0p2 on / type btrfs (rw,relatime,compress=lzo,ssd,space_cache,autodefrag)
devtmpfs on /dev type devtmpfs (rw,relatime,size=191796k,nr_inodes=47949,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk0p2 on /home type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag)
/dev/mmcblk0p2 on /lib/modules type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=38376k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,​errors=remount-ro)
/dev/mmcblk0p2 on /xbmc-backup type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag)
10.23.24.137:/media/Aspartic_Acid on /mnt/Aspartic_Acid type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=262144,wsize=65536,namlen=255,har​d,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.23.24.122,local_loc​k=none,addr=10.23.24.137,_netdev)

For good measure, here is the output when things are not working

Code:
/dev/mmcblk0p2 on / type btrfs (rw,relatime,compress=lzo,ssd,space_cache,autodefrag)
devtmpfs on /dev type devtmpfs (rw,relatime,size=191796k,nr_inodes=47949,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk0p2 on /home type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag)
/dev/mmcblk0p2 on /lib/modules type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=38376k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,​errors=remount-ro)
/dev/mmcblk0p2 on /xbmc-backup type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag)
10.23.24.137:/media/Aspartic_Acid on /mnt/Aspartic_Acid type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=262144,wsize=65536,namlen=255,har​d,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.23.24.122,local_loc​k=none,addr=10.23.24.137,_netdev)

Pretty sure both look the same.
(5th Oct, 2013 09:30 AM)nertskull Wrote: [ -> ]
Code:
10.23.24.137:/media/Aspartic_Acid on /mnt/Aspartic_Acid type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=262144,wsize=65536,namlen=255,har​d,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.23.24.122,local_loc​k=none,addr=10.23.24.137,_netdev)

and this nfs4 mount with smaller buffers is lagging as well? what exactly is the server (brand / type) ?

yes, they are the same

what happens if you put it the right way for nfs4?

in fstab change fstype from nfs to nfs4 and to mount options add vers=4.
(5th Oct, 2013 09:37 AM)mk01 Wrote: [ -> ]
(5th Oct, 2013 09:30 AM)nertskull Wrote: [ -> ]
Code:
10.23.24.137:/media/Aspartic_Acid on /mnt/Aspartic_Acid type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=262144,wsize=65536,namlen=255,har​d,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.23.24.122,local_loc​k=none,addr=10.23.24.137,_netdev)

and this nfs4 mount with smaller buffers is lagging as well? what exactly is the server (brand / type) ?

No, it does NOT lag. With rsize=262144 and wsize=65536 it plays correctly. There is no lag in the videos.

The problem is sometimes they don't load at all. You push play and nothing happens. I go to the command prompt and try to read a text file in nano and I get "input/output error".

Then, if I umount and then mount again. Sometimes 4 or 5 times. Eventually they "mount correctly" (whatever that means) and then things play just fine.

But they just don't always mount. But when they do mount, the playback is fine. No lag, no stutter, no skip.

I'm beginning to believe this may be a separate issue from the original in this thread.

The server is just a pc I built. It is got plenty of power. Its an amd phenom II with 8Gb of RAM and gigabit ethernet. Its running linux mint 64bit. I highly doubt my server is the issue. I've been streaming videos off of it to xbmc on other computers for a long time. But who knows, maybe it does need to be tweaked.
what is output of
Code:
rpcinfo -p 10.23.24.137

and

showmount -e 10.23.24.137

?
(5th Oct, 2013 09:37 AM)mk01 Wrote: [ -> ]yes, they are the same

what happens if you put it the right way for nfs4?

in fstab change fstype from nfs to nfs4 and to mount options add vers=4.

Let me check

(5th Oct, 2013 09:46 AM)mk01 Wrote: [ -> ]what is output of
Code:
rpcinfo -p 10.23.24.137
This is the output
Code:
xbian@xbian ~ $ rpcinfo -p 10.23.24.137
   program vers proto   port
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  35857  status
    100024    1   tcp  42413  status
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049
    100227    3   tcp   2049
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049
    100227    3   udp   2049
    100021    1   udp  40765  nlockmgr
    100021    3   udp  40765  nlockmgr
    100021    4   udp  40765  nlockmgr
    100021    1   tcp  35490  nlockmgr
    100021    3   tcp  35490  nlockmgr
    100021    4   tcp  35490  nlockmgr
    100005    1   udp  48509  mountd
    100005    1   tcp  60687  mountd
    100005    2   udp  54356  mountd
    100005    2   tcp  59089  mountd
    100005    3   udp  51750  mountd
    100005    3   tcp  45183  mountd


Quote:
Code:
and

showmount -e 10.23.24.137

?

Code:
xbian@xbian ~ $ sudo showmount -e 10.23.24.137
Export list for 10.23.24.137:
/media/Aspartic_Acid 10.23.24.0/24

I'm testing mounting as nfs4 still
(5th Oct, 2013 09:45 AM)nertskull Wrote: [ -> ]The server is just a pc I built. It is got plenty of power. Its an amd phenom II with 8Gb of RAM and gigabit ethernet. Its running linux mint 64bit. I highly doubt my server is the issue. I've been streaming videos off of it to xbmc on other computers for a long time. But who knows, maybe it does need to be tweaked.

I don't want to say it IS a problem, but I have exactly the same way build media storage (it is ubuntu 12.04), NFS3/4 allowed, usage pattern the same (nfs mounted from fstab - with just fstype nfs4 and specified wsize and rsize) and never have had such issues.
(I have second NFS provider on MacOSX server (nfs3 only) for home dirs exports and situation the same for any connects to it).

Even XBMC connect with no issues, shows the NFS in browser, you can add sources and play files directly with it.

Of course it doesn't mean if I don't have issues with the RPI setup there must be zero issues for others, but indeed it is quite suspicious - specially if the setup looks to be the "same". It's problem on one side or the other and I would like to find out.

(5th Oct, 2013 09:46 AM)nertskull Wrote: [ -> ]
Code:
xbian@xbian ~ $ sudo showmount -e 10.23.24.137
Export list for 10.23.24.137:
/media/Aspartic_Acid 10.23.24.0/24

I'm testing mounting as nfs4 still

and for the info to be completed, can you also copy /etc/exports?

are you running idmapd on the server as well?

@nertskull

just small note to using nfs4/nfs . nfs4 requires idmapd running on both sides (client / server). on xbian, idmapd gets automatically started if nfs4 is found in /etc/fstab or if is forced to start from /etc/default/nfs-common. that's why I was asking to try the correct nfs4 in fstab.
(5th Oct, 2013 09:55 AM)mk01 Wrote: [ -> ]
(5th Oct, 2013 09:45 AM)nertskull Wrote: [ -> ]The server is just a pc I built. It is got plenty of power. Its an amd phenom II with 8Gb of RAM and gigabit ethernet. Its running linux mint 64bit. I highly doubt my server is the issue. I've been streaming videos off of it to xbmc on other computers for a long time. But who knows, maybe it does need to be tweaked.

I don't want to say it IS a problem, but I have exactly the same way build media storage (it is ubuntu 12.04), NFS3/4 allowed, usage pattern the same (nfs mounted from fstab - with just fstype nfs4 and specified wsize and rsize) and never have had such issues.
(I have second NFS provider on MacOSX server (nfs3 only) for home dirs exports and situation the same for any connects to it).

Even XBMC connect with no issues, shows the NFS in browser, you can add sources and play files directly with it.

Of course it doesn't mean if I don't have issues with the RPI setup there must be zero issues for others, but indeed it is quite suspicious - specially if the setup looks to be the "same". It's problem on one side or the other and I would like to find out.

(5th Oct, 2013 09:46 AM)nertskull Wrote: [ -> ]
Code:
xbian@xbian ~ $ sudo showmount -e 10.23.24.137
Export list for 10.23.24.137:
/media/Aspartic_Acid 10.23.24.0/24

I'm testing mounting as nfs4 still

and for the info to be completed, can you also copy /etc/exports?

are you running idmapd on the server as well?

I don't think I'm running it. I never set it up. So unless its on by default, I am not

This is the exports

Code:
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/media/Aspartic_Acid 10.23.24.0/24(rw,sync,no_subtree_check)

So I'm optimistic. It may be fixed.

I just set up nfs4 in the fstab. And I have restarted now 12 times and it mounts correctly every time and plays just great.

I've never had a streak that long before. So I'm thinking it may be fixed by telling it to be nfs4.

Does this seem plausible? Should I just test a few more times like this? Or should I be looking for something more?

As it is, I'm pretty excited, we may finally have things all working correctly.

(5th Oct, 2013 09:55 AM)mk01 Wrote: [ -> ]
@nertskull

just small note to using nfs4/nfs . nfs4 requires idmapd running on both sides (client / server). on xbian, idmapd gets automatically started if nfs4 is found in /etc/fstab or if is forced to start from /etc/default/nfs-common. that's why I was asking to try the correct nfs4 in fstab.

I see. Well then maybe this means things are fixed by putting in nfs4
@nertskull

12-times is enough I suppose.

i'm glad we fixed it. in any case if it turns at the end otherwise, feel free to report again.

Matus
thank you so much. I know that wasn't a short process for you. But I'm very thankful for the help. I'd never have figured it out on my own.
Pages: 1 2 3
Reference URL's