4K HDR playback problems
#1
Hello everyone

For a long time i'm trying to solve a problem on playback Film or TV shows that occurs randomly but quite frequently during the film.
It is so random that it can occur at different times and frequencies on multiple plays of the same film.

DESCRIPTION:
As i said bebore during playback of video in 4k HDR 10bit (with bandwidth around 60-75Mb/s only for video) occurs randomly a sort of "long lag" where the audio continue to play flowlesly and without interruption, the video start move on frame by frame. This obviusly cause a desync of audio and video, in a manner that seems the video trying to catch the audio. Sometimes on screen appear the loading cirlce.
The only way to retrive this behaviour is pause playback (and the audio stop immediately) while the vidieo continue to move on frame by frame until after an amount of time the video stops to move frame by frame and the playback is (really) in pause. Or alternatively (the fastest way) exit the playback and restart it.

If I manage to record the event I will post a video of what is described. I apologize but this behavior is quite difficult to explain.

MY SETUP:
CPU: Ryzen 3 3200G
GPU: the processor iGPU (vega 8)
RAM: HyperX FURY 8 GB (1x8 GB) DDR4 2666 MHz
MOBO: Gygabyte B450M DS3H

In addition:
  1. The playback is handled by the build above with jellifin add-on configured in add-on mode.
  2. Another server with jellyfin take care of media library and streaming.
  3. The connection between server and HTPC is rocksolid 1Gigabit.
  4. The HTPC is connected to an AV reciver trought HDMI for audio and video playback.
  5. Audio on kodi is configured to passtrough to the AV receiver.

WHAT I TRIED:
In a frist attempt i thought was a buffer problem so following this docs I had increease cache/buffer with this:
advancedsettings.xml:

<advancedsettings>
  <cache>
     <memorysize>139460608</memorysize>
     <readfactor>20</readfactor>
  </cache>
</advancedsettings>
Nothing changed, maybe need to increase it futher? idk

I monitored the GPU usage during playback but nothing strange detected, usage stay around 70% usage. Temperature of CPU an GPU  around 30°C with spikes of 40°C

I can try to enable selective debugging on kodi but idk waht component enable maybe ffmpeg?

I hope to solve this problem because it's strange and i don't understant how is possible that a powerful CPU like ryzen that have vega8 iGPU have trobule on 4k HDR when a fire TV stick or google cast can handle it with no problems.
Reply
#2
Hello, the generic debug log would do at first, no need for extra components. ffmpeg which would blow up the size of the log.
With network excluded, it sounds like something interfering on your system.
BTW you can check the fill level of the video and audio buffer in the video osd (ctrl+shift+o).
If not done already, check Windows task manager for gpu / cpu core utiliization in case something maxes out or has spikes.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Hi thanks for your help.
I made some test following your suggestions i enabled the buffer osd during playback but first i hade made some changes to the settings:
  1. Enlarged the buffer to 500Mb
  2. Set display to Full screen rather than window borderless
the OSD after some times of playback says:
Code:

aq:65%, Kb/s:1472.22, a/v corrections(22ms): 0
vq:99%, Mb/s:65.17, fr:23.979, drop:0, skip:4, pc:1
Player: a/v:-0.455, forward:383.9 MB 34%
VSynOff: -22.4 latency: 0.166
The forward statistics start at a value around 480Mb 100% and slightly decrease to the value reported above or minor.

Unfortunately the problem occur the same and after pause the playback and waiting some time (as described in post #1)
Quote:The only way to retrive this behaviour is pause playback (and the audio stop immediately) while the vidieo continue to move on frame by frame until after an amount of time the video stops to move frame by frame and the playback is (really) in pause.
 the OSD report:
Code:

aq:65%, Kb/s:1472.22, a/v corrections(22ms): 0
vq:99%, Mb/s:65.17, fr:23.979, drop:5, skip:4, pc:none
Player: a/v:-0.455, forward:383.9 MB 12% 419362msec
VSynOff: -22.4 latency: 0.166
(little tricky to read because log osd and buffer osd overlap)

At this point if i play the video the buffer stay the same or even decrease, seems that kodi is not able to fill it up

For the log i forgot to disable ffmpeg selective debug and the logfile blow up as you said (my bad Sad). Anyway jumping at the time where the problem occurs this is the log that describe it (and I post this snippets for this reason)
log:
    info <general>: CVideoPlayerAudio:Tonguerocess - stream stalled
  debug <general>: CVideoPlayer::HandlePlaySpeed - audio stream stalled, triggering re-sync
  debug <general>: CVideoPlayer::FlushBuffers - flushing buffers
  debug <general>: CDVDAudio::Flush - flush audio stream
  debug <general>: CDVDAudio:Tongueause - pausing audio stream
  debug <general>: CVideoPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
  debug <general>: CVideoPlayer::SetCaching - caching state 1
  debug <general>: CVideoPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
  debug <general>: CDVDClock::SetSpeedAdjust - adjusted:0.000000
  debug <general>: CVideoPlayerVideo - Stillframe left, switching to normal playback
  debug <general>: demuxer seek to: 471182.000000
  debug <general>: CDVDDemuxFFmpeg::SeekTime - seek ended up on time 471221
  debug <general>: demuxer seek to: 471182.000000, success
  debug <general>: CVideoPlayer::FlushBuffers - flushing buffers
  error <general>: ffmpeg[0x1eb11141510]: [hevc] Could not find ref with POC 66
  error <general>: ffmpeg[0x1eb11141510]: [hevc] Could not find ref with POC 69
  debug <general>: ------ Window Init (DialogSeekBar.xml) ------
  debug <general>: ------ Window Init (Custom_1109_TopBarOverlay.xml) ------
this repeat itself until the sync is established.

I know that the full log is needed so i apologise for this and tomorrow i will repeat the test and i will post the complete log   
   So che è necessario il registro completo, quindi mi scuso per questo e domani ripeterò il test e pubblicherò il registro completo
Reply
#4
Hi, here we are.

I repeated the test and here is the log file here.

For some reason the log contains >>10 000 lines due to some log spam of jellyfin so i've replaced this lines from log with "#jellyfin logspam", there are all over.
Code:
2024-01-12 11:03:06.992 T:8636    debug <CAddonSettings[0@plugin.video.jellyfin]>: trying to load setting definitions from old format...
2024-01-12 11:03:06.993 T:8636    debug <CSettingsManager>: requested setting (LastIncrementalSync) was not found.
2024-01-12 11:03:06.993 T:8636    debug <CSettingsManager>: requested setting (SyncInstallRunDone) was not found.
2024-01-12 11:03:06.993 T:8636    debug <CSettingsManager>: requested setting (groupedSets) was not found.
2024-01-12 11:03:06.993 T:8636    debug <CSettingsManager>: requested setting (platformDetected) was not found.

Unfortunally there are other spam due to folders not found by kodi
I'm thinking to move this tread to Video support section mybe is moore appropriate?
Reply
#5
Let's do a quick test, install kodi via Portable mode (wiki) no add-ons, no jellyfin, no extras... just the default Kodi with one or two video problematic media as a 'local source' and see if we have continuous play and functionality with this hardware.
Reply

Logout Mark Read Team Forum Stats Members Help
4K HDR playback problems0