S905x Video Error - H264 1080i/50 w AC3 5.1Ch Down To 1 Frame / Sec

  • Frame rate error on Libreelec build 7.0.2.009 from 7.0.2.009

    Device details - AMLogic S905X, Mini M8S II, 2GB/8GB boot from SD Card (16GB Sandisk)

    see log at Ubuntu Pastebin problem occurs at log time 12:05:07 (close to the end of the log)
    Note log entries at log time 12:05:07, this is when the freeze-frame-motion commenced

    From the log it appears there's an AC3 synch problem, then the video is displayed as a series of freeze frames .. aprox. 1 frame / sec

    video sample cannot be posted (too large at 18GB and haven't yet worked out how to cut appropriately)

    source file is Australian Hidef TV H264 1080i/50 recorded via Mythtv (separate backend on server). Recording can be played successfully by

    • Kodi on Pi 2 (Libreelec)


    • Kodi on Braswell Nuc (ppa install on Ubuntu 16.04)


    • Mythtv on Braswell Nuc

    doesn't matter whether played via pvr-mythtv ... or as video (copied to NFS share), problem is the same, video goes to intermittent frames while sound continues ok

    consistent issue at 5:17:50 of video ie. something about the source.
    whole screen refresh is impacted eg. menu overlay also impacted (play time "jumps"), probably no surprise

    The problem is not specific to one file / show or tv station (at least 2 cause this issue, though I have only retained one example so far)
    The problem has so far related to sport programs ie. fast pans, bold colours and lots of sudden sounds. Most other hidef progams are ok (except the separately noted 720p issue)

    Tried (without success) -

    • adjust display refresh rate on start/stop, delay 0.1 seconds, also tried change display refresh rate OFF


        

    • "sync to display" set Off


      

    • disable subtitles


      

    • audio passthrough = ON and passthrough = OFF


      

    • attempt to disable all deinterlacing with "echo 1 > /sys/module/di/parameters/bypass_all" in autostart. TV continues to report 1080P signal (??)


      

    • buffer entries in /storage/.kodi/userdata/advancedsettings.xml eg.


    will often resolve itself .. temporarily

    • over time, if wait long enough


    • if jump back (30 secs), (obviously have to go 30 secs past problem point first)


    Problem resolves, then occurs again later

    No obvious CPU issues - track with top and never looked like a problem
    No obvious Network issues, iftop shows about 6.5Mb/s consistently

    Other notes

    • MPEG2 576i plays ok if via software decode, stereo sound. Problems if hardware decoded


    • MPEG2 1080i AC3 plays ok via hardware decode ie. accelerated (also AC3 sound). This applies to older recordings
      Stations have subsequently moved to H264 for 1080i with AC3 which is where the problems occur.


    • MPEG2 720p, stereo sound, has a different problem though similar, will post a separate bug report


    • Many H264 1080i/50 AC3 programs play ok. Sports seem to be a particular problem (weird, but that's what I have at present)


    Some other "problem" time points in this file (for my documentation - repeatability)

    • 5:17:47


    • 5:18:05


    • 5:27:36


    - filename 1013_20161204005500.ts (sport - car racing)
    - H264 MPEG-4 AVC (part 10) (h264), 1920x1090, display 1920x1080, framerate 25hz
    - A52 Audio (aka AC3) (a52) 3F2R/LFE Rate 48000 Hz Bitrate 448kb/s

    - filename 1013_20161201083000.ts (wildlife documentary) ... codec details same as above
    - problem point at 00:43:55

    Edited once, last by redger (December 7, 2016 at 6:40 AM).

  • MOD NOTICE: moved to amlogic community forum because the user is using a community build not an official build

  • The problem can be reproduced on the alpha version LibreELEC-S905.arm-8.0-devel-20161204210449-r24821-g9f57b18.img.gz

    Log Ubuntu Pastebin starting from log time 07:41:10.735

    In this case the same content as above is played (a) on the alpha release (b) from a file on an NFS share rather than via the pvr-mythtv addon - note that it's still the same file being played
    Filename = 1013_20161204005500.ts


    This looks like -

    • A highly repeatable problem. It always occurs at exactly the same points in the file
    • It's related to an audio synch issue, based on the log records
    • The problem will sometimes resolve itself (example not given, I will endeavour to find an example)
    • The workaround is to skip past the problem time point eg. wait 1-2 secs then skip forward and skip back to where you were (1-3 secs after the problem arose) the sound should resynch and everything's hunky-dory
    • The issue occurs in both the "stable" and "alpha" releases ie. Kodi v16 and v17


    This does not look like a de-interlacing issue based on the available information (of course I could be wrong :)

    For contrast, the following log was taken from an Intel Chromebox (cpu = 455u) running Kodi under Kubuntu 16.04
    Ubuntu Pastebin
    See log time 13:47:16 ... you can see an audio error occurs at exactly the same point in the source file. The difference is that the intel machine recovers from the error and plays on. Visually there is a slight delay where video appears to break up briefly but then continues as if nothing happened.

    Edited once, last by redger (December 8, 2016 at 2:54 AM).

  • link to test file Dropbox - 1090_20161207040000_short.7z
    the password is the same as my 6 letter user name

    problem occurs at 00:01:37 ie. 1 minute 37 secs or so

    The following kodi log is specific to the above test file
    Ubuntu Pastebin

    problem seems to occur at log time 20:49:51 In this case the log message appears different, but the visual outcome on the screen is similar ie. very very slow frame rate / skipped frames

    The unix truncate command was used to generate the test file, so file integrity is a bit dodgy, however players all seem to accept it ok ... and play it. Most importantly, the "problem" remains in the file and is consistently reproduced

    Edited once, last by redger (December 8, 2016 at 10:01 AM).