LE 9.01 PI2 having problems with a video file

  • Just watched a video yesterday that played "choppy" and out of sync with audio. Learned a few weeks ago that this can happen with 10 bit files, so I checked and this file is 8-bit.

    In Libreelec I brought up stats and CPU does not seem to choke which usually happened when I had issues. Also checked the file on windows and it plays smooth and in sync there.

    On screen stats show CPU low values and only a few skips (when playback is choppy the skip counter does not go up). I did notice the err: value as well at (12.3ms in picture) variating constantly with values from -22 to +18 when playing. Never paid much attenttion to this value so unsure if it is a key to the solution.

    Below I added Mediainfo (from MPC-HC in windows) and playback screenshot. Happy to add logs if it helps but perhaps this info is already sufficient to show I am asking my pi2 to play a file it is not equiped to handle?


  • Sounds suspiciously like a decoding issue.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link

    Also (If legal) please provide a snippet of the offending file.

  • Thanks. I just tried a USB stick and the file plays just as badly from USB. Sound is immediately out of sync and playback choppy.

    Pi2 plays most stuff I've thrown at it. Not my own encode this so perhaps some exotic combination that isnt working here.

  • I just did a backup/install/restore upgrade from 8.2.5 to 9.0.1 and now my mkv rips of HD (1080p) television shows are choppy. I don't have any audio problems, but the video appears to be running a low frame rate. I am running on an Intel NUC with a USB connected Seagate hard drive. I haven't yet captured any debug logs.

    Update:

    When I turn logging on, it shows a 30fps frame rate and about 30%-60% CPU usage. When I exit out to the video with logging on, I see a displayed frame rate of 60fps. The log file shows several of the following error messages:


    CDVDClock::ErrorAdjust - CVideoPlayerAudio::OutputPacket - error:-10076.633064, adjusted:-10076.633064

    I don't know if that has anything to do with the strange motion artifact. Perhaps this is a kodi issue.

    Edited 2 times, last by mikerock (May 8, 2019 at 4:25 AM).

  • I am having more issues and found a workaround! I had more stuttering issues with a downloaded tv show. Turns aut that switching deinterlace settings from auto to off fixes it completely. It is a 25FPS file on a pi2, I read some fixes are for Intel chipsets so not sure if this is related but it looks as if Kodi picks a deinterlace setting my pi2 can't handle (and playback is fine with it off, so it is not needed).

    I don't understand how this works so will post all details and log, perhaps someone undertands what is going on

    Full log uploaded to: http://ix.io/1ia6

    -enabled debug log, rebooted, started playback (choppy), switched deinterlace to off (from auto), played a bit more (played fine

    1. Playing with deinterlace on AUTO, it says it is using adv(x2) on my pi2. Playback is choppy and out of sync

    2. stats when playback is choppy. frame skips is stable at 2 strangely. buffer seems high

    3. choppy playback (deinterlace to auto) with debug log on (after reboot)

    4. With debug log still on same screen with deinterlace set to off

    Mediainfo on the file in question (downloaded, recorded tv episode)

    General

    ID : 1 (0x1)

    Complete name : U:\Series\Cold Feet\Season 06\Cold_Feet_S06E08_NPO3_HD_VARA_20161216.m2ts

    Format : BDAV

    Format/Info : Blu-ray Video

    File size : 2.97 GiB

    Duration : 44 min 36 s

    Overall bit rate mode : Variable

    Overall bit rate : 9 526 kb/s

    Video

    ID : 4113 (0x1011)

    Menu ID : 1 (0x1)

    Format : AVC

    Format/Info : Advanced Video Codec

    Format profile : High@L4

    Format settings, CABAC : Yes

    Format settings, RefFrames : 4 frames

    Format settings, GOP : M=3, N=15

    Codec ID : 27

    Duration : 44 min 36 s

    Bit rate : 7 984 kb/s

    Width : 1 920 pixels

    Height : 1 080 pixels

    Display aspect ratio : 16:9

    Frame rate : 25.000 FPS

    Standard : PAL

    Color space : YUV

    Chroma subsampling : 4:2:0

    Bit depth : 8 bits

    Scan type : MBAFF

    Scan type, store method : Interleaved fields

    Scan order : Top Field First

    Bits/(Pixel*Frame) : 0.154

    Stream size : 2.49 GiB (84%)

    Color range : Limited

    Color primaries : BT.709

    Transfer characteristics : BT.709

    Matrix coefficients : BT.709

    Audio #1

    ID : 4352 (0x1100)

    Menu ID : 1 (0x1)

    Format : MPEG Audio

    Format version : Version 1

    Format profile : Layer 2

    Codec ID : 4

    Duration : 44 min 36 s

    Bit rate mode : Constant

    Bit rate : 256 kb/s

    Channel(s) : 2 channels

    Sampling rate : 48.0 kHz

    Compression mode : Lossy

    Delay relative to video : 86 ms

    Stream size : 81.7 MiB (3%)

    Language : ned

    Language, more info : Clean effects

    Audio #2

    ID : 4353 (0x1101)

    Menu ID : 1 (0x1)

    Format : AC-3

    Format/Info : Audio Coding 3

    Format settings, Endianness : Big

    Codec ID : 129

    Duration : 44 min 36 s

    Bit rate mode : Constant

    Bit rate : 448 kb/s

    Channel(s) : 6 channels

    Channel positions : Front: L C R, Side: L R, LFE

    Sampling rate : 48.0 kHz

    Frame rate : 31.250 FPS (1536 SPF)

    Bit depth : 16 bits

    Compression mode : Lossy

    Delay relative to video : 31 ms

    Stream size : 143 MiB (5%)

    Language : ned

    Language, more info : Clean effects

    Service kind : Complete Main

    Audio #3

    ID : 4353 (0x1101)

    Menu ID : 1 (0x1)

    Format : AC-3

    Format/Info : Audio Coding 3

    Format settings, Endianness : Big

    Codec ID : 129

    Duration : 44 min 36 s

    Bit rate mode : Constant

    Bit rate : 448 kb/s

    Channel(s) : 6 channels

    Channel positions : Front: L C R, Side: L R, LFE

    Sampling rate : 48.0 kHz

    Frame rate : 31.250 FPS (1536 SPF)

    Bit depth : 16 bits

    Compression mode : Lossy

    Delay relative to video : 63 ms

    Stream size : 143 MiB (5%)

    Language : ned

    Language, more info : Clean effects

    Service kind : Complete Main

    Edited once, last by jaspov: editing (May 10, 2019 at 11:35 AM).

  • I reverted back to 8.2.5. Now everything looks good. Hopefully, 9.0.2 with Kodi 18.2 will fix the issues with Intel-based systems.

    Quote

    VAAPI on Intel has gained some corrections for interlaced content that toggled interlaced flags during playback, and therefore caused stutter by reconfiguring the decoder.