Playback improvements for 4K HEVC UHD content

Hi

There are some playback improvements for 4K HEVC content which should hopefully fix issues where the decoder would get stuck. An example of this is John Wick 2, where there is a very specific freeze.

The issue should now be fixed, but we need to get some testing to ensure that other HEVC content also behaves as expected.

I’d appreciate it if you could test this and provide feedback before we release this as an update to other users. To test this update:

  1. Login via the command line
  2. Edit the file /etc/apt/sources.list
  3. Add the following line: deb http://apt.osmc.tv stretch-devel main
  4. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  5. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.

Sam

2 Likes

Hi @sam_nazarko
I´ve installed the testbuild and have a look at Serenity… at 03:45 the movie stops to buffer… then i type the command echo 16 | sudo tee /sys/module/amvdec_h265/parameters/dynamic_buf_num_margin via shell and start Serenity again and at 03:45 there is no stop or buffer so i think there is something wrong with the testbuild!?

Please try updating again. I accidentally pushed the wrong package to Jenkins, so you wouldn’t have actually tried a kernel with these improvements yet.

Sam

I updated and tried Cars 3. First log the movie froze right at the beginning. Second log it played for over 20 minutes. The sound never completely cut out but had a bunch of quick dropouts. A couple were around times of 2:45, 5:00, 8:40, 21:45.

https://paste.osmc.tv/osacemeveh
https://paste.osmc.tv/qocoraxeru

Do it again and now the stop and buffering in Serenity at 03:45 is gone! Doesn´t have time to watch the whole movie yet but it´s a very good start… :slight_smile:

Installed this version. Will test later tonight.

Just done a quick test.

Fixed the freeze on Serenity and John Wick 2 here. Had to play them from the beginning since… it has had a side effect or making each 4k UHD HEVC file skip and stuttery in a very weird way IF I skip anywhere in the file.

Playing form the start it’s nice and smooth and fine, as soon as I chapter skip or skip a few seconds forward or backwards, playback is jerky and juddery from then onwards.

Will do some logs files if needed when I get time later.

Consider adjusting the dynamic buffer margin parameter in increments. I’d try 10 and 12. We may not need such a sharp increase.

Just to make sure I started over and did a restore.

Setting the margin to 10 appears to fix the JW2 and Serenity issue. And skipping is working fine now too.

Only did some very brief testing so far but it’s looking good.

Cool. 16 was very much a hammer fix. I’ll wait for some more feedback then adjust

OK so in short the news is good.

I’ve tried the samples in mkv & m2ts I cut and suplied in my previous thread as well as the source m2ts files for both Serenity & John Wick 2 and can happily agree with the above - freezing issues are indeed fixed! Great work.

As reported in my thread and by @Mevlock above skipping does indeed cause issues, whether it’s by hopping right on the remote in increments or typing in a time code. Both result in jerky playback, frames skipping froward and back and visual corruption.

Sorry, being dense here, is this a parameter in advancedsettings.xml? If so let me know what to change and I’ll try 10 and report back.

Thanks for picking this one up.

1 Like

It’s just that command from the last thread. Just substitute the 16 for 10.

The kernel update in the dev channel just had it hard-coded to 16. Sam will probably push another update if everyone is seeing the same results. Then it’ll end up in an official update once it’s clear there’s no problems.

1 Like

Duh. Thanks - nice and easy then. Applied and will test later. Cheers @Mevlock

I can confirm that too… with 16 the chapter skip or skip forward the playback isn´t playable but with 10 all is fine, do a 30 minutes test with Serenity!

It fixed my issue with The Mummy Returns at 29:35 ish.

Thanks for confirming.
If you’re familiar with the command line, can you test with just 10 buffers?

Yep still good on both The Mummy Returns and Serenity, although I still get the weird frame skipping that a previous user mentioned if I FFWD or RWD the movie

OK, no problem. I’ll look in to this. I’m glad we have some progress with playback however. Half way between 8 and 10 is 9. Can you try 9 buffers?

As you can probably tell – this isn’t an exact science.

Sam

10 seemed to work for me too - I only tested a bit round the previous error points but certainly the oddness of frame skipping wasn’t apparent. Can try 9 too if needed.

Test 9 if you can