Trouble playing h264 encoded files

hello to all. I’m having trouble playing some files of my library that as far as I know or read around the forums shouldn’t be a problem for the pi, at least in regards to resolution and bitrate. I’m playing the files off a NAS through an Ethernet connection.

I had a look at the media information and as far as I can tell (but I just googled around this afternoon) the format is ok. The problem I have is that the files do play some seconds with stuttering audio and video, then lock for some seconds and restart but just stuttering, they never play smoothly.

The following one do not have any problem in playing:

http://paste.osmc.io/utawudenem.vhdl

while the next two have problems:

http://paste.osmc.io/ekicixotey.rib
http://paste.osmc.io/liqudumasu.rib

The latter is 720p avc mkv that is practically unplayable, while the one before is not even 720 but 400 and has the same problem. I understand that the 720p has quite a higher bitrate and resolution in comparison to the other two, even though I read that the RPi can play such data without issues but regarding the other two (first and second) I really see very slight differences therefore I can’t understand where the problem is.

Up to now I tried disabling oxmplayer and / or mmal, setting the system to change the TV reffresh rate, enabling audio passthrough, but all to no avail.

Is there anything I can check or something I can modify in the files (even if re-encoding would be very annoying especially considering that these format should be played without probems) to have a smooth playback?

It would be good if we could find out more about the file you are having issues playing. Please see the mediainfo section in How to submit a useful support request - General - OSMC

Thank you for your answer. In which way could I give you more information about the files other than the Media Info results I included? Should I upload a log?

Sorry my mistake, was on Mobile didn’t see the URLs

:smiley: don’t worry, no problem. My question was real, as I didn’t know if the logs could contain other useful information.

Did you try to play the files from the SD Card or a USB drive instead of via network to exclude the network as a source of trouble?

I tried very quickly this morning, after trying to play the same files yesterday evening on my Mac. Just for the record, the third file (the 650MB one) struggles on it as well (though, it is not wired in this case but on WiFi), and as I already copied the file on an external hard disk to test with the RPi, I tried playing it from the hard disk and it is perfect on the Mac.

I then tried to hook the HDD to the RPi but it wasn’t able to supply enough power (at least that’s my impression) so the HDD was constantly powering up and stopping. I then copied the test files on an SD card and hooked it to the RPi using a card reader. The results? The first file plays flawlessly as it always did, the third one is played flawlessly (so, some network issues here are the culprit, and this to my astonishment as, while it still worked, I played without issues a 4,4GB / 1080p / 90 minutes clip file on the same network on an ATV with OSMC installed, that to my understanding is heavier on the network than a 650MB / 20 min file. As the ATV still has problems*, I couldn’t test if the network issue is only related to the RPi or not). Nevertheless, the problem on the second file still remains even if played locally: video stutters, and after few seconds a noticeable delay (various seconds) in audio starts to happen (I’d say that audio is played at the right speed while the video remains behind) and artifacts start to appear.

Could it be that this is related to the “H.263” which we see in the “Format settings, Matrix” of the media info?

“*” I’m still struggling with this problem: Can't play network files, streaming works flawlessly which sometimes also afflicts the Rpi as well.

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings, BVOP                    : 2
Format settings, QPel                    : Yes
Format settings, GMC                     : 3 warppoints

GMC : 3 warppoints is the problem of this file. See: Global motion compensation - Wikipedia

[quote]
Due to the extra decoding CPU cost of global motion compensation,
most hardware players do not support global motion compensation.[/quote]

So, we can’t hardware decode this file and it falls back to software decode.
What Pi do you have? Pi1 won’t handle this with software decode, but I’d have thought Pi2 or Pi3 probably would.

I’m using an RPi 1 indeed.

No problem, it is important that I understood what the issue is caused by; as there is no other option than re-encoding, I’ll re-encode the files :slight_smile:

Just for the reference of who helped (thank you!) and for future readers, I finally managed to solve the streaming problem (of course not the one due to the encoding) when replacing the router. The one I had at the time was supplied by the internet provider and as it was a wimax connection, I had little to no chances to get a different hardware (at least as per my knowing - not an expert in wimax).
I then rescinded the contract due to the internet connection poor performances and connected an ADSL using my own ADSL router (owned since I was in a different house) and the streaming problem disappeared, indicating that not only the internet connection performances were really poor, but also the overall hardware performance of the wimax modem was.