Video stuttering on Rpi3, codec info not helpful

I’m using an Rpi3 with a fresh install of OSMC latest update (having previously been using a slightly older version that was installed through NOOBS). With both installs, I have been getting stutters of video being streamed from a Win 10 desktop SMB share via wired connection. Sometimes I can make it through a video with no problems. When I do get the stutters, it can drop to what appears to be 10-15fps. Audio remains smooth. When it happens it sometimes does not clear up and I just give up and go back to using my desktop Kodi. The stutters are inconsistent, aside from not happening every time I watch a video, they do not come at the same place in the same video if I play it twice in a row.

When I use the Codec Info button, VQ and AQ both stay at 98-99%. Dropped and skipped frames show 0 to 5 and do not increase during the stuttering. CPUs are at 0% to 4% typically.

The power icon does not show in the upper right corner of the screen during the stutters.

I’m using a SanDisk class 10 16gb card.

Streaming the same video to my laptop – over wifi – is perfectly smooth.

I will upload my logs when I get back home, but the fact that all metrics seem to be okay makes me wonder if they will show anything of use.

This is really strange, I also have this issues but in my case its the wifi connection:

could you try to copy files from your smb share to you sd card and check the speed with iftop while copy is running?

Do you use the integrated SMB client (?) in Kodi or have you mounted the shares in fstab? My stuttering issues disappeared after mounting shares in fstab. I’m pretty sure I had skipped or dropped frames before though, so it may be a different problem.

I used the Kodi smb.
For speed tests I mounted the smb shares and copied the files.
Both was slow for me.
It seems to be a general network speed issue. Also downloads with wget had the same slow speed.

That’s strange. I just did some transfer speed tests and using the Kodi SMB client I got about 4.5-5 MB/s. Copying the same file from fstab mount gave ~11 MB/s (limted by USB drive). What speeds are you getting?

I got
15Mbit/s = 1,88MB/s

Wow, that’s horrible. What does your fstab mount options look like? I’m completely new to Linux and copied these from somewhere:

//192.168.x.xx/nameofshare /mnt/nameofshare cifs noauto,x-systemd.automount,username=,password= 0 0

I did it with the mount command
mount -t cifs…
I just tried it with fstab:

Slower :frowning:

Mount options:
// /mnt/test cifs username=xx,password=xx,iocharset=utf8,sec=ntlm 0 0

Test with wget:

not even 200KB/s
My internet speed is 100Mbit/s

Using rsync to copy a file from my SMB share I get 8-9 MB/s, so a little bit slower than a transfer from the same fstab mount with Kodi file manager but not much. Downloading the same file as you with wget resulted in ~11 MB/s. I have no further knowledge about this issue though, all I could and wanted to contribute was that mounting with fstab solved my issue. It seems that your issue is something else and more severe, I hope someone else can help.

I’m using Kodi’s SMB. I don’t know anything about linux or ftab.

But if the problem is the network, shouldn’t VQ/AQ percentage be low? And why is the dropped/skipped frame count not going up even WHILE I’m watching a movie turned into a slideshow?

I have no idea. I just tested with the Kodi SMB client again and my VQ does drop. But with the transfer speeds @theincogtion is seeing one would think there has to be dropped frames if he isn’t playing potato quality video. 720p TV-episodes usually has around 2500-3500 kb/s bitrate IIRC.

Only after the cache empties.

Possibly because the system is being thrashed while attempting to decode and render your media.

Providing logs and mediainfo would likely result in an understanding of why you are experiencing issues…

Yeah, sorry for the delay on logs, I have to wait until the next time I watch something and experience the problem, I tend to watch movies on the weekends.

Before the cache empties, why would I get dropped frames as a result of slow network speed? If the cache is full, isn’t it playing it from the cache rather than from the network? My VQ/AQ never drop below 98%.

And CPU never even reaches 10%.

It may not be network speed but the GPU struggling to keep up.

The vcodec matters. If it is a hidef video and over 720p, then h.264 is the only vcodec that will offload onto the GPU. h.265/mpeg2/vp8/vp9 are all problems. If you’ve paid for the mpeg2 GPU acceleration, then that vcodec should work up to 1080p (I haven’t tried anything higher).

For the other poster - .mkv is just a container. Any sort of video can be encoded and shoved into there.

In the sort term, the easiest answer is to transcode the video file to a h.264 using something like ffmpeg or handbrake on a more powerful system. A raspberry pi just can’t handle that workload but a $60 intel CPU like the G3258 can.

Pi will also do VC1 and MPEG2 if you purchase the licenses

Pi will also do VC1 and MPEG2 if you purchase the licenses

Pardon my ignorance. I’ve never seen VC1 anywhere. Unsure where it would be useful.

Where I live, OTA TV is MPEG2-TS, so watching hidef TV (HDHR Tuner) requires the license, to be of any use. SD channels work fine without the license.

I should have said that for hidef video over 720p, h.264 is the only video codec that will offload to the GPU with no extra non-free license. Sorry for the mistake.

VC1 was popular on HD-DVD many years ago. I think it was also used on a limited number of Blu-ray releases, but may be mistaken.