• 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 21
Solved XVID/MPEG-4/MPEG-2 files in SD quality play in slow motion
#76
(2018-11-12, 12:06)wsnipex Wrote: the fix is in v18 beta5, so likely have another issue. Provide a Debug Log please
 Ok, when I go back home I'll do a few more tests and generate a debug log.
Reply
#77
Finally I was able to do a few tests and generate a log. The problem seems to be in the hardware decoding of mpeg2, but not in all the videos that I tried, it failed in about 90% of them.

The problem is that the reproduction is not fluid, it is stopping and starting, fast-slow-stopped-fast-slow-stopped... although the audio works perfectly. I've seen it in mpeg2 videos on PAL, NTSC and even 1080i, but some other mpeg2 videos of those formats also work. With h264 videos I have not found any problem.

In the log you see the reproduction of a vob in ntsc in which the problem occurs:
https://paste.kodi.tv/asigiqukim


When the problem occurs, the PlayerProcessInfo and CodecInfo seems ok (no drops, enough free cpu):

ImageImage

I have tried disabling hardware decoding in the settings and then that same video plays perfectly.

I hope it helps, if you need to try something else I have no problem.

Thanks in advance.
Reply
#78
So, on your hardware it behaves the opposite way, HW decoding is broken. Issues like this probably where the original reason to disable it for DVDs. Can you confirm that beta4 works normally?

@fritsch there you go, first user where HW decoding breaks DVD playback Wink
Reply
#79
To be honest, I am not exactly sure which way to go. It was changed to SW decoding under the assumption that it will work properly on today's SoCs. However, most Android TVs are still powered by a slow Amlogic S905 chipset for STBs or MediaTek chipset for TV with quad ARM Cortex A53 which can't properly SW play MPEG-2 for some reason. S912 inside T95ZPLUS can as stated by @Mochilote but it looks like MPEG-2 HW decoding is not properly implemented there...
Reply
#80
if an A53 can't play mpeg2, then something is seriously wrong. Anyway, looks like there is no single 1 solution for those droid issues. Back to an expert setting? Wink
Reply
#81
(2018-11-13, 11:25)wsnipex Wrote: So, on your hardware it behaves the opposite way, HW decoding is broken. Issues like this probably where the original reason to disable it for DVDs. Can you confirm that beta4 works normally?
When I go back home I try it and confirm if it works.

 
(2018-11-13, 11:50)wsnipex Wrote: if an A53 can't play mpeg2, then something is seriously wrong. Anyway, looks like there is no single 1 solution for those droid issues. Back to an expert setting? Wink
 Maybe it's the solution to cover all the cases, as proposed @fritsch :
(2018-10-23, 07:09)fritsch Wrote: So current discussion goes towards an Expert-Setting: "Allow acceleration for DVD playback" that will be Android only, but off by default.
Reply
#82
Yeah - I don't care. I warned everyone ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#83
Yesterday I tried to install beta 4 using Kodi Android Installer but I did not get it to work. At the end of the download either nothing happened or the installation failed. Finally I decided to make a backup of the configuration and the database with Backup Addon and then use the play store to uninstall Kodi and reinstall the Kodi 17.6 Krypton version. This time it worked perfectly when installing beta 4 using Kodi Android Installer.

I tried to play the same video with which I made the debug log, but it also worked badly, since the player was using the HW acceleration anyway, since it is not a complete DVD it is a single video extracted in vob format. So the problem really is not in DVD playback is in playing any mpeg2 video on Android, so the proposed option does not cover all cases...

I reinstalled beta5, restored the configuration backup and did a few tests by disabling the HW acceleration to see if my device was able to play mpeg2 without acceleration. Most of the videos / dvd that I tried were perfect although some had sporadically skip frame and even some drop, but not constantly. There really was a lot of free cpu during playback (my device has an Amlogic S912 Octa Core) so I did not expect to see those glitches, but of course much better than with acceleration activated.

Regards
Reply
#84
Quote:Yesterday I tried to install beta 4 using Kodi Android Installer but I did not get it to work. At the end of the download either nothing happened or the installation failed. Finally I decided to make a backup of the configuration and the database with Backup Addon and then use the play store to uninstall Kodi and reinstall the Kodi 17.6 Krypton version. This time it worked perfectly when installing beta 4 using Kodi Android Installer.
Downgrading from Beta5 to Beta4 does not work due to version number change. You indeed need to uninstall Kodi before doing so.
 
Quote:I tried to play the same video with which I made the debug log, but it also worked badly, since the player was using the HW acceleration anyway, since it is not a complete DVD it is a single video extracted in vob format. So the problem really is not in DVD playback is in playing any mpeg2 video on Android, so the proposed option does not cover all cases...
Indeed the patch only switches HW acceleration for DVD structures (IFO). In case of video files (VOB, MPG, TS), HW acceleration is always used (in case MediaCodec is enabled).
 
Quote:Most of the videos / dvd that I tried were perfect although some had sporadically skip frame and even some drop, but not constantly. There really was a lot of free cpu during playback (my device has an Amlogic S912 Octa Core) so I did not expect to see those glitches, but of course much better than with acceleration activated.
Indeed SW decoding MPEG-2 is pretty bad on Android TV, so even on an octa core A53. On a quad core A53 (which most Android TVs are based on), it is not usable at all.
Reply
#85
(2018-11-13, 11:50)wsnipex Wrote: if an A53 can't play mpeg2, then something is seriously wrong. Anyway, looks like there is no single 1 solution for those droid issues. Back to an expert setting? Wink

In Linux (AMLogic) Kodi settings under hardware acceleration, we still have mpeg2 and mpeg4 - HD and Up - user selectable options.
That should could be extended to Android Kodi IMHO and let the user decided what works for them.

Here is a quick and dirty Leia RC compile using those mpeg2 and mpeg4 options for Android Kodi Leia RC:

Settings > Player > Video > Accelerate MPEG2
Settings > Player > Video > Accelerate MPEG4

Never = disable hardware decoding for MPEG2 or MPEG4

kodiapp-armeabi-v7a-Leia_rc-DVD_VOB.apk

It's using a unique Signature so will not interfere with other installed Kodi Apps.

As already stated if you have not got the ARM ponies under the hood, then Software decoding of mpeg2 and mpeg4 is not going to help.
And yes Android Kodi vs Linux Kodi seems worse for software decode performance on low powered ARM chipsets.

Reply
#86
I'm intrigued that some mpeg2 videos play well using the hardware decoder and most videos are reproduced badly (fast-slow-stop-fast-slow-stop ...) so yesterday I did a few more tests to see if I found out any difference between them.

All the full DVDs I tried (about 10 PAL and NTSC) are played badly. I tried several videos extracted in .vob and I found one thing in common between those that reproduce well and those that reproduce badly.

Some texts are in Spanish, I forgot to change the language to make the photos, I'm sorry Blush .

All videos that fail show the same framerate in PlayerProcessInfo and CodecInfo:
Image


All videos that work correctly show different framerate in PlayerProcessInfo and CodecInfo:
Image


The two videos of the captures are in the same format/size (PAL 576i), so I do not understand why there are those differences. I guess the 25/50 has to do with the interlacing, but It should do the same in both videos.

I hope it serves as a clue,

regards.
Reply
#87
So looks like it is film vs. video content. Film content can be weaved to 25fps whereas video content requires deinterlacing. Looks like a frame doubler algorithm is applied for the latter on your HW.
Reply
#88
did you turn on "settings->player->video->sync playback to display"?
Reply
#89
(2018-11-15, 10:54)wsnipex Wrote: did you turn on "settings->player->video->sync playback to display"?
 No, I have it disabled since I use audio passthrough, but of course I will try it to see if it gives more clues with the problem of mpeg2 hardware decoding.
Reply
#90
(2018-11-15, 10:54)wsnipex Wrote: did you turn on "settings->player->video->sync playback to display"?

I tried activating "sync playback to display" but the same thing happened. The videos that reproduced badly were still bad and those that reproduced well continue to do so. On the other hand, the audio played for a few seconds, then it sounds choppy and finally it stopped working.

So I think that at this moment the best options could be to activate what @wrxtasy suggested (Settings>Player>Video>Accelerate MPEG2) or / and to investigate a bit the failure of the hardware playback of mpeg2, especially now that we know that some videos play perfectly.

Of course I can do all the tests that are needed,

regards.
Reply
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 21

Logout Mark Read Team Forum Stats Members Help
XVID/MPEG-4/MPEG-2 files in SD quality play in slow motion1