Playing video files when in Pictures mode

Hi,

I haven’t use this feature for a while, but now I wanted to test it on new Vero 4k and it just doesn’t work properly. Now I suspect that it may have something to do with changes in Kodi itself but it looks also like a performance issue.

Basically what I do:

  • enter directory with images (.jpg) and videos(.MTS) (copied from a Sony camera)
  • in context menu select slide show.

images are displayed correctly one by one but when it switches to video file, there is only audio, video is a still frame.
When I try to open a single file directly it is buffering very very long - like 15 seconds and then after few seconds video and audio starts to stutter, buffering again etc.

When I switch to Video section or just open the file in File Manager everything is fine, but I cannot benefit from slide show function.

Everything has been working fine sometime ago on RPi3, but on older version of Kodi (I think 16.x)

Please advise.

EDIT: and logs: https://paste.osmc.tv/vebululore

Hi,

I’m sorry to hear this is causing a problem.

Do the videos play OK if you play them directly (i.e. without displaying photos first)?

Sam

Hi, thanks for reply. They does but only from file manager / video menus. All MTS files opened from Images mode are not working properly. In the meantime I checked kodi forum and many people have issues with this so I suspect this is Kodi bug, supposedly introduced in 17.0, but there are only some indications that in new version it is fixed - no info which new version (17.X or maybe 18.X).

I think that it has something to do with auto codec choosing or maybe sw/hw decoding. Is it possible that in pictures mode kodi only works with sw decoder, maybe there is a way to force it somehow? Anything in my logs that suggest poor codec or decoder choosing?

The video is being played with HW acceleration by the look of it.
It looks like an upstream Kodi bug that will be fixed in time. We have test builds for v18 but I don’t recommend this.

Sam

So I guess I have to wait. Thanks for confirming this as a kodi bug… sort of :slight_smile:

In addition to the above mentioned behavior I also noticed that the video files do not play completely from the Photos menu. They stop before reaching the end. This seems to be common to all types of video files.

I hope the issue will be fixed. It is more and more common those days to have mixed media folders from mobile phones for instance.
A category like “Events” for mixed media could be interesting …

The one to two second cut off is because of how the SoC’s media pipeline works. It has big buffers. In the last update there is drain support which will reduce the amount of video cut off the end. It should never be more than a second or so now, but we may be able to improve this further in the future.

That is bad news. 10-15 seconds clips is a kind of standard for video editing and even for most shoots people take with phones. This mean 10-20% of the clip is not visible.

I did not tried yet, is the same story when clips are stored under Video?

You can disable hardware acceleration for those clips. It might even be worth us disabling HW acceleration for shorter lower quality clips. Can you show me MediaInfo output for a clip?

Sam

Hi Sam, this is the media info. I think is just a standard iPhone video.

http://paste.osmc.io/vufepuwinu.rib

Did disabling HW accel resolve the issue?

Yes, when no Hardware acceleration the small clips are okay, however it kills the HD content.
Live HDTv looks like slow motion and local HD and 4K video files on SD card look like slow motion or even worst.

Hello,

Going back to playing videos while in pictures mode.
It seems that there is a fix for that (made for v18, but maybe also applicable to 17.X) on

Sadly on kodi forums there is a statement that this fix won’t work on RPi-like devices (whatever that means), because of:

Pi is a differnt story because it renders video to a separate plane. You need to poke the platform maintainer if you want to get this fixed on that platform

@sam_nazarko: I am willing to test some solution if you can provide some patch for it that should work in Vero/RPi. Is it possible that you somehow made a patch based on the github entry?

This feature is really annoying and I am seriously considering pulling my old Rpi with kodi 16 from the box, cause everything I need was working on it.

Or maybe someone can advise me how to approach this thing differently: How to make a slideshow on Vero/RPi with kodi that will also play videos between the pictures ordered by time?
Maybe some kind of addon can do that properly?

BTW: Merry christmas to everyone!!

Hi @msieminski

Thanks for the link. I have produced a test build for you. It’s only compile tested and I haven’t tested to see if it gives any benefit myself yet.

You’ll need to upgrade to Debian Stretch first, then you can upgrade with

wget "https://www.dropbox.com/s/kyaeyn9k2phubb5/vero3-mediacenter-osmc-slideshow.deb?dl=1" -O mediacenter.deb
sudo dpkg -i mediacenter.deb
reboot

Let me know if this helps

Sam

So I have to upgrade Debian as usual so modify /etc/apt/sources-list with stretch sources and then:
apt-get update
apt-get upgrade
apt-get dist-upgrade
?

I guess there is no coming back to usual release / update mechanisms of vero after that?

The following details how to upgrade OSMC to stretch.

You will not be able to return to Jessie after taking this step without a reinstall.

Hello,

@sam_nazarko: Thanks for the quick reaction.

There is some improvement after applying the update, but we are nowhere near a final fix.
Right now when opening MTS files from Pictures mode, sometimes there is excessive buffering and stuttering / freezing / slow motion / sound issues, but sometimes all is good (like 1/4 times).
It looks like it uses HW decoding now
Maybe I have some buffering not set properly, it is working fine for other purposes though.
Here is the debug log https://paste.osmc.tv/quvatoyehe
20:59:37.440 - approx start of video
20:59:45 - buffering issue starts
after the buffering there was sound issue - no sound and staggering until I believe approx 21:00:12

The video itself is pretty heavy - around 50Mbps, nowhere near the Vero limit though.
Also I don’t expirience similar symptoms when launching videos from Video menu.

There is however still one more issue that remains very broken:
When sliedeshow is enabled there is little change in behaviour:
The video is starting in the background and we can only see like a thumbnail displayed.
I guess this is better then black screen, but there is no way to continue a slideshow after it hits a movie.

I seriously thing that it may have something to do with:

Pi is a differnt story because it renders video to a separate plane. You need to poke the platform maintainer if you want to get this fixed on that platform

I think that Vero may be facing the same issue. I just don’t understand why kodi developers don’t want to fix this, but maybe I am missing something with this seperate plane thing.

If you need any more information or testing from me please let me know.

Hi @msieminski

Of course.

I’m glad to hear that there are some improvements. From looking at the code, I don’t think it’s a complete solution. However, I do believe this is being worked on upstream.

Thanks for the debug log. It would be interesting if you could try with a lower bitrate file.
Is there also a chance to put an MKV in to test slideshow capabilites?

I don’t think the patch causes any regressions, so it’s worth us keeping for now as a stop gap. Kodi v17 is very much end of life, so I’m not sure how much further development that it will get.

Sam

I agree, lets wait for v18 and we’ll take it from there

P.S. Unfortunately I cannot lower the bitrate - it is standard bitrate that my camera (sony) is recording and this is not some brand new model, so I believe that currently there are cameras with much higher bitrate. Besides I refuse to believe that this is a bitrate issue - I used to play the same files on RPi2+ v11-14 and Rpi3 v15-16 without any issues.