• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 21
Solved XVID/MPEG-4/MPEG-2 files in SD quality play in slow motion
#16
someone here will take care of it?
Reply
#17
No. No Android maintainer. All that keep it alive are busy with other stuff so that it does not fall apart. Time to learn C++ and contribute Code. That would be really nice.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#18
(2018-06-27, 18:48)rainman74 Wrote: @peak3d here is the debug log: https://paste.ee/p/3dosU
Quote:My device is a Fire TV 4k box that can play 1080p h.264 streams smoothly even without MediaCodec.

txt:

18:38:36.119 T:367142200128 NOTICE: Kodi compiled Jun 3 2018 by Clang 5.0.300080 for Android ARM 64-bit API level 21 (API level 21)
18:38:36.119 T:367142200128 NOTICE: Running on Asus Nexus Player with Android 5.1.1 API level 22, kernel: Linux ARM 64-bit version 3.10.61+
...
18:38:36.123 T:367142200128 NOTICE: ARM Features: Neon disabled

The log says that it is a Nexus Player with ARM CPU? Guess the name is just wrong. Why is NEON disabled? Fire TV 4K has Cortex A53 cores, no?
And why is the box still on Lollipop? Shouldn't Fire TV 4K be on Nougat based Fire OS 6?
Reply
#19
(2018-07-14, 14:37)CiNcH Wrote: Why is NEON disabled?
https://github.com/xbmc/xbmc/blob/2a7392...pp#L30-L32
Reply
#20
(2018-07-14, 14:37)CiNcH Wrote:
(2018-06-27, 18:48)rainman74 Wrote: My device is a Fire TV 4k box that can play 1080p h.264 streams smoothly even without MediaCodec.
txt:

18:38:36.119 T:367142200128 NOTICE: Kodi compiled Jun 3 2018 by Clang 5.0.300080 for Android ARM 64-bit API level 21 (API level 21)
18:38:36.119 T:367142200128 NOTICE: Running on Asus Nexus Player with Android 5.1.1 API level 22, kernel: Linux ARM 64-bit version 3.10.61+
...
18:38:36.123 T:367142200128 NOTICE: ARM Features: Neon disabled

The log says that it is a Nexus Player with ARM CPU? Guess the name is just wrong. Why is NEON disabled? Fire TV 4K has Cortex A53 cores, no?
And why is the box still on Lollipop? Shouldn't Fire TV 4K be on Nougat based Fire OS 6? 
I modified build.prop on Fire TV to output a Nexus player. Now the Google Cast detection works via Spotify Wink
Reply
#21
This problem does not only occur with DVDs, AVI with XVID will also play slower.

Example file - Test.avi file here:
General
Complete name                  : P:\Test.avi
Format                         : AVI
Format/Info                    : Audio Video Interleave
File size                      : 200 MiB
Duration                       : 21 min 49 s
Overall bit rate mode          : Variable
Overall bit rate               : 1 282 kb/s
Writing application            : VirtualDubMod 1.5.10.2 (build 2540/release)
Writing library                : VirtualDubMod build 2540/release

Video
ID                             : 0
Format                         : MPEG-4 Visual
Format profile                 : Advanced Simple@L5
Format settings                : BVOP2
Format settings, BVOP          : 2
Format settings, QPel          : No
Format settings, GMC           : No warppoints
Format settings, Matrix        : Default (H.263)
Muxing mode                    : Packed bitstream
Codec ID                       : XVID
Codec ID/Hint                  : XviD
Duration                       : 21 min 49 s
Bit rate                       : 1 147 kb/s
Width                          : 624 pixels
Height                         : 352 pixels
Display aspect ratio           : 16:9
Frame rate                     : 25.000 FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Scan type                      : Progressive
Compression mode               : Lossy
Bits/(Pixel*Frame)             : 0.209
Stream size                    : 179 MiB (90%)
Writing library                : XviD 64

Audio
ID                             : 1
Format                         : MPEG Audio
Format version                 : Version 1
Format profile                 : Layer 3
Format settings                : Joint stereo
Codec ID                       : 55
Codec ID/Hint                  : MP3
Duration                       : 21 min 49 s
Bit rate mode                  : Variable
Bit rate                       : 122 kb/s
Nominal bit rate               : 128 kb/s
Channel(s)                     : 2 channels
Sampling rate                  : 48.0 kHz
Frame rate                     : 41.667 FPS (1152 SPF)
Compression mode               : Lossy
Stream size                    : 19.0 MiB (9%)
Alignment                      : Aligned on interleaves
Interleave, duration           : 24  ms (0.60 video frame)
Interleave, preload duration   : 543  ms
Writing library                : LAME3.98r
Encoding settings              : -m j -V 4 -q 2 -lowpass 17 --abr 128
Reply
#22
@Koying Do you have any ideas here? Since there is no Android maintainer any more, the problem will probably lead to the fact that I can no longer use Kodi v18 Sad
Reply
#23
Same problem here with Nexus Player (Android 8) and Sony ATV2 (Android 7). MKVs run smoothly, VOBs stutter.
Reply
#24
I typically play DVDs over network, remuxing them to mkv before. So I haven't realizied. But indeed, when playing VOB, playback is quite stuttery. But it does not seem to be using SW decoding, at least according to player process info:

Video decoder: amc-mpeg2(S) (HW)
Pixel format: Surface


Also attaching a log. [LOG]

@peak3d's renderkodiclock build seems to handle it quite a bit better.
Reply
#25
(2018-07-15, 16:09)CiNcH Wrote: I typically play DVDs over network, remuxing them to mkv before. So I haven't realizied. But indeed, when playing VOB, playback is quite stuttery. But it does not seem to be using SW decoding, at least according to player process info:

Video decoder: amc-mpeg2(S) (HW)
Pixel format: Surface


Also attaching a log. [LOG]

@peak3d's renderkodiclock build seems to handle it quite a bit better.

Is there a build for arm64 compilable?
Reply
#26
16:01:48.964 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 2,  pts:266479999.0000
16:01:49.047 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 19, pts:266639999.0000
16:01:49.108 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 17, pts:266679999.0000
16:01:49.123 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 18, pts:266599999.0000

16:01:49.129 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 6,  pts:266759999.0000
16:01:49.215 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 4,  pts:266799999.0000
16:01:49.225 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 3,  pts:266719999.0000
16:01:49.247 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 5,  pts:266879999.0000
16:01:49.291 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 10, pts:266919999.0000
16:01:49.321 T:18446744071598651680   DEBUG: CDVDVideoCodecAndroidMediaCodec::GetPicture index: 7,  pts:266959999.0000


PTS Values from decoder are not sorted, this could be either an Decoder issue, or wrong input data.
Best possible deactivate mpeg2 h/w decoding, this is nothing we will fix.
Reply
#27
Quote:PTS Values from decoder are not sorted, this could be either an Decoder issue, or wrong input data.
Best possible deactivate mpeg2 h/w decoding, this is nothing we will fix.
Bad MediaCodec usage can also lead to bad output. And you actually already fixed my issue with VOB playback. The renderkodiclock build fixes the jerky playback (and most probably those bad PTS).


My problem is different from the one from the topic starter though. I can reproduce his now too. If you play the DVD structure (instead of the individual VOB), SW decoding is used indeed and plays video in a jerky way. CPU usage is very high. That one is not fixed with renderkodiclock build.
Reply
#28
@peak3d If your renderkodiclock build fixes the problem, could you commit it as PR and put it in the main branch?

Alternatively disabling mpeg2 h/w decoding seems to be a bad idea, because this seems to be happening right now (although mediacodecs are activated!) and leads to VOBs and XVID AVIs being played too slowly.

I would therefore suspect an error in the use of the MediaCodecs, because as said in older Kodi v18 builds these formats ran absolutely fluently with the MediaCodecs and the same files. Only in the last builds this is no longer possible. But I can't tell exactly from which build it starts Sad
Reply
#29
I can confirm the problem. The, at least the recent, Leia builds use SW decoding for MPEG2 stream on Android, it affects also the DVB-T stream from TVHeadend. The problem is widespread in the MediaCodec usage, it affects both my Samsung Galaxy S8+ with Android 8.0 (in this case the CPU is powerfull enough to achieve a smooth playback) and a chinese Chuwi Hi9 with Android 7.0 (in this case the slow Mediatek SoC shutters during the playback).
Both devices worked fine with Kodi Krypton 17.6, MPEG2 was HW decoded via MediaCodec.
Reply
#30
Fire TV 4K
Kodi 18: recent nightlies

Can also confirm issue playing XVID.  Appears to be dropping frames.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 21

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