I'm using Kodi mainly for playing internet radio (add-ons) and watching Live TV (PVR HTS & tvheadend 4.2.8) and have been struggling for some time to switch from the perfectly working Kodi 17.x with OpenMAX acceleration (MMAL is usless for PVR) on Raspberry (PiZero/Pi2B) to Kodi 19.5 on x86.
Recently abandoned the Raspberry platform because I found it useless for playing PVR with Kodi 18.x & Kodi 19.x - more details in the second half of this post:
https://forum.kodi.tv/showthread.php?tid...pid3135685
Now, I bought a quite powerful (and recent architecture) second hand x86 thin client - powered by a Gemini Lake dual Celeron N4000 & UHD Graphics 600 with 4 GB DDR4 RAM, considering it sufficient for my multimedia needs.
https://ark.intel.com/products/128988/In...o-2_60-GHz
I built Kodi 19.5 and found it running very fast and "smooth", everything except the PVR playback, which suffers from the same issues - audio speeding up / slowing down only when starting the PVR playback. Worse on SD Channels (MPEG2) where I also often get the error presented in this thread - namely: "ActiveAE - large audio sync error"
Here is a small snippet from the Kodi log - presenting the ActiveAE - large audio sync error - when switching to a SD Channel (MPEG2 video & audio MP2 - 2 channels), debugging was not activated since there are no useful additional details:
https://pastebin.pl/view/8b6383da
Interestingly, the audio speed-up & slow-down process on starting PVR playback is more "accentuated" on MPG2 channels (average 4Mbitps TS streams) where it takes around 10 seconds to settle, than for FullHD - MPEG4 (average 10Mbitps TS streams). And again, the ActiveAE - large audio sync error occurs solely on playing back the SD channels - MPEG2 - MP2 - 2 channels audio.
In my case I don't have "sync playback to display" enabled and the "threshold for pitch correction" has the default value of 2. Enabling "sync playback to display" or setting "threshold for pitch correction" on 0 doesn't seem to help at all.
The playback is done on a Dell monitor - 1920x1080-60Hz and I employ a HDMI switcher because I use only a monitor for both my workstation and the Kodi Thin Client box.
During playback of PVR, if I switch the HDMI back and forth, first the audio stops for 1 second and then the audio speed-up/slow down starts again and I also get often ActiveAE - large audio sync errors. Weird, how Kodi reinitialize the playback when the monitor becomes present again.
Additionally, the audio speed-up/slow down and the ActiveAE - large audio sync errors occur with all audio outputs - that's HDMI digital output (I used a HDMI audio extractor - has it's own DAC), internal Intel HD audio card (which I disabled in BIOS - crappy DAC) and the Creative USB sound card I'm currently using.
Some last details - I learned that Kodi doesn't enable HW decoding of MPEG2 & VC-1 by default and I enabled them both in the Player settings menu because I found out that my GPU supports them. That didn't help with the audio problems but eased up the the CPU load with ~10%.
Code:
$ vainfo
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Gemini Lake - 2.4.1
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD
And the average CPU usage for playing PVR (both SD - MPEG2 & HD - MPEG4) stays around 25-35% - htop ASCII screenshot:
Code:
0[|||||||||||||||||||||||||||| 23.9% 1338MHz 40°C] Tasks: 45, 88 thr, 89 kthr; 1 running
1[||||||||||||||||||||||| 20.4% 1100MHz 40°C] Load average: 2.09 0.99 0.50
Mem[||||||||||||||||||||||||||||||||||||||| 363M/3.45G] Uptime: 13:27:03
Swp[ 0K/1.63G] Disk IO: 1.2% read: 0K write: 12K
Network: rx: 0KiB/s tx: 0KiB/s (3/13 packets)
P.S.
Forgot to mention that I tested an old Kodi 17.4 build (I built & packaged for X86-64 some years ago - can't rebuild Kodi 17.x on my actual GCC 11) on this Thin Client box and it plays perfectly fine PVR (HTS), no audio speedup/slowdown and ActiveAE - large audio sync errors, whatever settings I tried to change.