480p videos not correctly played

When I try to play 480p MPEG-4 files I get issues on video.
I don’t know how to describe the issue, but what happens is that frames are not displayed correctly. It’s like when something fails on buffering and big areas of the screen fails to be rendered.

What could be the cause?

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

that’s the log https://paste.osmc.tv/fepetuyoki

Hi,

Try setting Adjust display refresh rate to on start and stop.

Thanks Tom.

Even with “start and stop” video has the same problem

It would be good if we could find out more about the file you are having issues playing.

Please let us know the mediainfo of the file which you either can create:

  1. By uploading the file to https://videosam.pl/
  2. Login to OSMC via ssh and Install mediainfo sudo apt-get install mediainfo and then run mediainfo <File>

Afterwards share the info here using </> format button.

Thx for your help.

I already have mediaInfo and it says:

Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 456 MiB
Duration                                 : 23 min 10 s
Overall bit rate                         : 2 752 kb/s
Writing application                      : Lavf55.33.100
Writing library                          : Lavf55.33.100

Video
ID                                       : 1
Format                                   : MPEG-4 Visual
Format profile                           : Simple@L1
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : V_MPEG4/ISO/ASP
Codec ID/Info                            : Advanced Simple Profile
Duration                                 : 23 min 10 s
Width                                    : 852 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Writing library                          : Lavc55.52.102
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Codec ID                                 : A_AAC-95
Duration                                 : 23 min 10 s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Default                                  : No
Forced                                   : No


Hi,

Do they play if you disable hardware acceleration?

Thanks Tom.

Yes they seems to play fine without hw acceleration. But do I need it for 1080p files?

You could set it to use hardware acceleration for “HD and up”.

1 Like

I enabled HW acceleration with DRM Prime and set this:

MPEG-2: HD and Up
MPEG-4 HD and Up
Accelerator H264: HD and Up
HDR processing: auto

But those 480p videos are not playing fine. They have the same issue as before

Hi,

I’ve been advised it could be an issue with the resolution and a google search did hit this:

https://forum.kodi.tv/showthread.php?tid=29712

Which would suggest this issue for 852x480p has around for a while.

852 seems a bit odd as well. There are 16:9 resolutions for 480p, but my understanding is I would expect to see 848 or 856. How are you re-encoding these from the original media?

But if I’ve understood what I’ve been advised correctly. For widescreen at 480p, its better to go for a 3:2 than 16:9, for playback with kodi/osmc. So if possible re-encode these setting the resolution to 720x480, if not I suggest disabling hardware acceleration for playback of these.

Thanks Tom.

I’m not convinced is a resolution issue, because it just happened with a 1280x720 file and I can play them correctly with Kodi on my Windows PC.

I’m starting to think it’s a codec problem.

Mediainfo for that file?

@grahamh

Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 1.30 GiB
Duration                                 : 29 min 23 s
Overall bit rate                         : 6 336 kb/s
Writing application                      : Lavf55.33.100
Writing library                          : Lavf55.33.100

Video
ID                                       : 1
Format                                   : MPEG-4 Visual
Format profile                           : Simple@L1
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : V_MPEG4/ISO/ASP
Codec ID/Info                            : Advanced Simple Profile
Duration                                 : 29 min 23 s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Writing library                          : Lavc55.52.102
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Codec ID                                 : A_AAC-95
Duration                                 : 29 min 23 s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Default                                  : No
Forced                                   : No

IIRC, the definition of HD in HD and up is anything with a width more than 800, so both your ‘480p’ file and 720p file will be hardware decoded.

Can we get a sample clip from each of those files that don’t play cleanly for you?

1 Like

unfortunately no, because is a personal video.

I was wondering: is possible to override the definition of HD so that HW acceleration for example only work with 1920x1080 and up videos?

This setting is saved as a number in guisettings. HD and up is 800, which I guess is the target width. You could try manually changing it to 1000, say.

It’s hardcoded in CAMLCodec I think.

I have some news.
I discovered that setting in HW acceleration with DRM Prime section

MPEG-2: Always
MPEG-4 Never
Accelerator H264: HD and Up
HDR processing: auto

those files play fine, so the issue is related to MPEG-4 HW acceleration.

Since I don’t want to play 1080p files without HW acceleration I decided to override the definition of HD, which is an information the we can found in usr/share/kodi/system/settings/settings.xml (not in /home/osmc/.kodi/userdata/guisettings.xml).
Then I changed that definition in settings.xml by modifying every occurence of:

<option label="39000">800</option> <!-- HD -->
in
<option label="39000">1300</option> <!-- HD -->

and then in <setting id="videoplayer.useamcodecmpeg4" section i changed
<default>800</default>
in
<default>1300</default>

Finally I rebooted to OSMC and set

MPEG-2: Always
MPEG-4 HD and Up
Accelerator H264: HD and Up
HDR processing: auto

So since I had the same issue with 1280x720 files, I disabled MPEG-4 HW acceleration for 720p and 480p files, but allowing it for 1080p.

This is a good solution at the moment, but I’m a little afraid this could negatively affect some 720p files playback in the future.

As all of you can see by the mediaInfo I posted the most peculiar constant (in my opinion) between the files that gave me playback issues is the following:

Format settings, Matrix                  : Default (H.263)

So I was wondering: is it possible to blacklist H263 files from being played with HW acceleration? This would allow me to use HW acceleration even with 720p files that are not h263.