2022-03-07, 02:21
Hi forum,
I am trying to setup a new media box based on RPi4, ArchLinux, tvheadend, Sundtek USB tuner and Kodi. To be more specific:
Rpi4B 2GB Ram, 32bit Linux 5.15.26-2-rpi-ARCH #1 SMP armv7l GNU/Linux 19.4 (19.4.0) Git:20220303-nogitfound from Arch repository running as Kodi standalone (GBM)
A problem happens when trying to play some video files, there is no error message, just video does not appear. It is related to hardware decoding, similar to what is described in the other thread https://forum.kodi.tv/showthread.php?tid...ight=prime
My videos are not 4k, yet they fail to play, only audio is heard. Comparing debug output from working ones I do not see any error or a difference comparing to a working playback.
After some analysis and tests I was able to confirm that the failing files have HD resolution and are encoded with colorspace yuv420p(tv, bt709), complete info:
Files with lower resolution and H264 codec start playing, but at some random time they stop, and kodi outputs lot of errors to log file, eventually crashes:
Based on the other thread I understand that the hardware is likely not capable of decoding the file, but I have some points I'd like to understand:
Many thanks for any hint or enhancement that could be made.
amk
I am trying to setup a new media box based on RPi4, ArchLinux, tvheadend, Sundtek USB tuner and Kodi. To be more specific:
Rpi4B 2GB Ram, 32bit Linux 5.15.26-2-rpi-ARCH #1 SMP armv7l GNU/Linux 19.4 (19.4.0) Git:20220303-nogitfound from Arch repository running as Kodi standalone (GBM)
A problem happens when trying to play some video files, there is no error message, just video does not appear. It is related to hardware decoding, similar to what is described in the other thread https://forum.kodi.tv/showthread.php?tid...ight=prime
My videos are not 4k, yet they fail to play, only audio is heard. Comparing debug output from working ones I do not see any error or a difference comparing to a working playback.
After some analysis and tests I was able to confirm that the failing files have HD resolution and are encoded with colorspace yuv420p(tv, bt709), complete info:
Code:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1664 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 444 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default)
Files with lower resolution and H264 codec start playing, but at some random time they stop, and kodi outputs lot of errors to log file, eventually crashes:
Code:
Property: FB_ID ID: 17 Value: 255
2022-03-07 01:02:37.252 T:2253 ERROR <general>: CDRMAtomic::DrmAtomicCommit - atomic commit failed: Bad file descriptor
2022-03-07 01:02:37.260 T:2253 ERROR <general>: CDRMAtomic::DrmAtomicCommit - test commit failed: (Bad file descriptor) - falling back to last successful atomic request
2022-03-07 01:02:37.260 T:2253 ERROR <general>:
Object: plane ID: 99
Property: FB_ID ID: 17 Value: 254
2022-03-07 01:02:37.261 T:2253 ERROR <general>: CDRMAtomic::DrmAtomicCommit - atomic commit failed: Bad file descriptor
2022-03-07 01:02:37.404 T:2380 WARNING <general>: OutputPicture - timeout waiting for buffer
2022-03-07 01:02:47.421 T:2380 WARNING <general>: Skipped 126 duplicate messages..
2022-03-07 01:02:47.421 T:2380 WARNING <general>: OutputPicture - timeout waiting for buffer
2022-03-07 01:02:57.462 T:2380 WARNING <general>: Skipped 195 duplicate messages..
2022-03-07 01:02:57.462 T:2380 WARNING <general>: OutputPicture - timeout waiting for buffer
Based on the other thread I understand that the hardware is likely not capable of decoding the file, but I have some points I'd like to understand:
- Is it possible to match HW capability with video properties before attempting to use and report to the user that file cannot play?
- If the file is broken and HW decoding fails during playback, is there any watchdog to recover from the situation?
- Would it make sense to fallback to software decoding? Disabling PRIME works well for this contents, but if I keep it like that, the device is too slow to decode HD DVB stream.
Many thanks for any hint or enhancement that could be made.
amk