Posts by Lirk

    Workaround #1:
    Please try this with MPEG2 hardware decoding enabled:
    echo 1 > /sys/module/di/parameters/bypass_all

    In fact, this solution also only works in some cases, but it worked for me for PAL (576i50) format DVDs.

    If this method has led to positive results, it is worth applying it at startup, for example:
    echo "echo 1 > /sys/module/di/parameters/bypass_all" >> /storage/.config/autostart.sh

    Hardware deinterlacer works properly for me with MPEG2, conditionally without frame dropping, but the main problem is the old method - BOB, which gives worse results, than YADIF software deinterlacer, video with hardware deinterlacer is slightly blurry on static regions.

    Workaround #2:
    An alternative solution may be if your display is a television that natively supports interlaced input format, because in this case you can also set the output to an interlaced resolution (e.g. 1080i), and then you can turn off deinterlacing with software decoding.

    In this case, your television is responsible for performing the deinterlace in real time, so this will definitely provide better results than any software solution. Of course, this is not a working solution for a standard PC monitor.

    In both solutions, it is important that the frame rate of the source media and the display refresh rate are in sync, so the Players Settings -> Adjust display refresh rate setting option should never be turned off.

    I tried this years ago, but this doesn't have any effect for video deinterlacing. And of course I am using autoframerate option, it works properly as the current resolution and framerate shows in the corner of the screen by TV OSD.

    But AFAIK on Kodi Leia the software method causes the same frame drops you are experiencing, and this issue is not exclusive to Amlogic devices.

    Why it cannot be fixed by comparison Kodi 17.6 changes in the sources? Maybe it can be fixed by replacing some old files from Kodi 17.6?

    So. I have an old question about software deinterlacing support.

    I tested old kszaq's image version 8.2.3 and software deinterlacing works properly with the same CPU load in debug info for both versions - 8.2.3 and 9.2.8.18, it shows about 170% of CPU-KODI load and 30%-40% for each of cores, but in 9.2.8.18 version it works with frame dropping.

    I used this video sample for testing with disabled AMCODEC support. May be there is a way to repair this functionality?

    DVD playback support was dropped in version 9.2.8.17, but it works in 9.2.8.16.

    Logs:

    2025-03-29 18:20:19.531 T:4092837952 NOTICE: VideoPlayer::OpenFile: smb://NET/DVD/VIDEO_TS/VIDEO_TS.IFO
    2025-03-29 18:20:19.532 T:3563033344 NOTICE: Creating InputStream
    2025-03-29 18:20:19.563 T:3563033344 ERROR: Error on dvdnav_open
    2025-03-29 18:20:19.563 T:3563033344 ERROR: CVideoPlayer::OpenInputStream - error opening [smb://NET/DVD/VIDEO_TS/VIDEO_TS.IFO]
    2025-03-29 18:20:19.563 T:3563033344 NOTICE: CVideoPlayer::OnExit()
    2025-03-29 18:20:19.717 T:3896873728 ERROR: EXCEPTION: XBMC is not playing any file
    2025-03-29 18:20:19.741 T:4092837952 NOTICE: CVideoPlayer::CloseFile()
    2025-03-29 18:20:19.741 T:4092837952 NOTICE: VideoPlayer: waiting for threads to exit
    2025-03-29 18:20:19.741 T:4092837952 NOTICE: VideoPlayer: finished waiting

    In LE 7.0.3/8.2.5 releases software deinterlace worked properly with doubling framerate. But from version 18.x deinterlace works poor with frame dropping. Hardware deinterlace works properly, but videos a little blurry with it in comparison with software deinterlace. Just compare playback this interlaced video: https://samples.ffmpeg.org/MPEG2/interlaced/burosch1.mpg in versions 7.0.3/8.2.5 with disabled hardware acceleration. This problem also is present in CoreELEC releases with the same versions of Kodi.

    Was this a clean install?

    Yes.

    I think that problem gone in new releases with some fixes in new kernels 5.x/6.x.


    So, about software deinterlace problem... In LE 16.5/17.6 releases software deinterlace worked properly with doubling framerate. But from version 18.x deinterlace works poor with frame dropping. Hardware deinterlace works properly, but videos a little blurry with it in comparison with software deinterlace.

    Just compare playback this interlaced video: https://samples.ffmpeg.org/MPEG2/interlaced/burosch1.mpg in version 17.6 and in 18.9 with disabled hardware acceleration.

    That's why it would be good to have the relevant part of a kernel log from a previous working system.

    For example: dmesg | grep dhd

    (If it's really Ampak, which is actually an SDIO wifi+bt combo adapter based on Broadcom chips.)

    Log from this 9.2 build, without working WIFI. Can it help? I have no way to run working LE 13 build now.

    dmesg | grep dhd

    [ 11.049187@2] dhd_module_init: in
    [ 11.049222@2] dhd_wifi_platform_load: Enter
    [ 11.792953@2] dhdsdio_probe : no mutex held. set lock
    [ 11.878301@2] dhd_conf_set_chiprev: chip=0xa9a6, chiprev=0
    [ 11.878336@2] dhd_conf_set_conf_path_by_nv_path: config_path=/usr/lib/firmware/brcm/config.txt
    [ 11.878513@2] dhd_os_open_image: /usr/lib/firmware/brcm/config.txt (399 bytes) open success
    [ 11.909689@2] dhd_conf_read_nv_by_chip: nv_by_chip_count=12
    [ 11.909702@2] dhd_conf_read_nv_by_chip: chip=0xa962, chiprev=0, name=nvram_ap6181.txt
    [ 11.909706@2] dhd_conf_read_nv_by_chip: chip=0xa962, chiprev=1, name=nvram_ap6210.txt
    [ 11.909710@2] dhd_conf_read_nv_by_chip: chip=0xa9a6, chiprev=0, name=nvram_ap6212.txt
    [ 11.909714@2] dhd_conf_read_nv_by_chip: chip=0xa9a6, chiprev=1, name=nvram_ap6212a.txt
    [ 11.909718@2] dhd_conf_read_nv_by_chip: chip=0x4345, chiprev=6, name=nvram_ap6255.txt
    [ 11.909722@2] dhd_conf_read_nv_by_chip: chip=0x4330, chiprev=4, name=nvram_ap6330.txt
    [ 11.909726@2] dhd_conf_read_nv_by_chip: chip=0x4339, chiprev=1, name=nvram_ap6335.txt
    [ 11.909730@2] dhd_conf_read_nv_by_chip: chip=0x4354, chiprev=2, name=nvram_ap6356.txt
    [ 11.909740@2] dhd_conf_read_nv_by_chip: chip=0x4335, chiprev=1, name=nvram_bcm4335.txt
    [ 11.909753@2] dhd_conf_read_nv_by_chip: chip=0xa94c, chiprev=2, name=nvram_ap6234.txt
    [ 11.909758@2] dhd_conf_read_nv_by_chip: chip=0x4359, chiprev=9, name=nvram_ap6359sa.txt
    [ 11.909762@2] dhd_conf_read_nv_by_chip: chip=0x4334, chiprev=3, name=nvram_bcm4334.txt
    [ 11.909821@2] dhd_conf_read_config: mimo_bw_cap = 1
    [ 11.910138@2] dhd_conf_read_config: bcn_timeout = 20
    [ 11.910258@2] dhd_conf_read_config: kso_enable = 0
    [ 11.910576@2] dhd_conf_read_config: PM = 0
    [ 11.911775@3] dhd_attach(): thread:dhd_watchdog_thread:af0 started
    [ 11.911802@3] dhd_attach(): thread:dhd_dpc:af1 started
    [ 11.911830@3] dhd_attach(): thread:dhd_rxf:af2 started
    [ 11.911839@3] dhd_deferred_work_init: work queue initialized
    [ 12.209740@2] dhd_open: WLAN driver is not initialized
    [ 12.209857@2] dhd_wl_ioctl: returning as busstate=0
    [ 12.210445@2] dhd_txglom_enable: enable 0
    [ 12.210449@2] dhd_conf_set_txglom_params: swtxglom=0, txglom_ext=0
    [ 12.210452@2] dhd_conf_set_txglom_params: txglom_bucket_size=0
    [ 12.210456@2] dhd_conf_set_txglom_params: txglomsize=0, deferred_tx_len=0, bus_txglom=-1
    [ 12.210460@2] dhd_conf_set_txglom_params: tx_in_rx=1, tx_max_offset=0
    [ 12.210469@2] dhd_bus_devreset: WLAN OFF DONE
    [ 12.211549@2] dhdsdio_probe : the lock is released.
    [ 12.211738@2] dhd_module_init: Exit err=0
    [ 13.216570@2] dhd_open: Enter ffffffc0238e9000
    [ 16.077307@2] dhd_open : wl_android_wifi_on failed (-110)
    [ 16.077359@2] dhd_stop: Enter ffffffc0238e9000
    [ 16.077583@2] dhd_wl_ioctl: returning as busstate=0
    [ 16.077660@2] dhd_net_bus_devreset: dhd_bus_devreset: -35
    [ 16.277041@2] dhd_stop: Exit
    [ 16.277333@2] dhd_open: Exit ret=-1

    chip:0xa9a6. It looks like AP6236?

    1. Doesn't work WIFI module, as in previous LE versions (16.x to 17.x). According to MAC Address range: 44:2C:05:00:00:00 - 44:2C:05:FF:FF:FF, vendor is "AMPAK". I tried to run LE with different device trees, working without WIFI support was: gxbb_p200_1G_100M.dtb, gxbb_p200_1G_100M_RealtekWiFi.dtb, gxbb_p200_1G_wetek_hub.dtb, gxbb_p200_k1_plus.dtb. But WIFI work on LE13 with "meson-gxbb-nexbox-a95x.dtb" device tree.

    2. Properly working software deinterlace on SD resolutions was from 16.x to 17.x versions, but from 18.x version it work with frame dropping.

    3. From 18.x version doesn't work OK button, but it fixed with this solution manually: RE: Ok button doesn't work on H1 remote