Open dr-m opened 2 years ago
Hi Marko, what I see is that the deinterlacer doesn't accept the video format that came from the decoder. It's curiously. Do you know the format from the picture? Can I get a small piece ( 1 minute ) video? Regards zille. Edit: The video format from the decoder should supported by the deinterlacer. libavfilter isn't used there, only MMAL.
Every Finnish free-to-view DVB-T2 channel or recording that I tried provokes the crash.
To hopefully avoid any copyright infringement, I made a 25-megabyte recording (over 30 seconds) from Estradi HD, which appears to exist so that anyone can broadcast (for a fee). Most of the time (including this time), it streams looped recordings of Finnish sceneries, with no sound or text. An attempt to play back the recording triggers this as well. The messages that precede the SIGSEGV are the same, only with different pointer addresses for the mmal_port_enable
messages.
I will try to figure out a way how to get the recording to you.
I educated myself a little further. There are two interfaces to the Videocore IV GPU: MMAL and OMX. Both are obsolescent according to raspberrypi/firmware#1168. The rpihddevice plugin uses OMX, while one of the supported interfaces of this plugin is MMAL. The future appears to be V4L2 M2M, but it is unclear to me if that interface is supported on the Raspberry Pi 2.
When I enabled the OpenGL driver in raspi-config
, I got a /dev/dri/card0
that the non-MMAL build of softhddevice-drm would look for. But, unfortunately it used CPU-based decoding. Even for DVB-T, I got very jerky playback. After I switched to a DVB-T2 channel, all I got was one still frame.
I will try to debug this further, because my goal is to be able to use the Raspberry Pi 2 that I already have. This is also a nice challenge to learn a little more about video decoding.
The recording are h264 1024i coded. Here it play fine. The easiest way to get a working setup is to use an older version of firmware. You can also make a bug report on raspberrypi/firmware. V4L2 M2M isn't a solution. There are no deinterlacer.
@zillevdr Thank you, I will try to test with older firmware. I understood that it works with raspberrypi/firmware@b324aea801f669b6ab18441f970e74a5a7346684 (Linux 5.4.79) on your system. It crashed on my system with raspberrypi/firmware@4877a7d918be6fab22ce5d345feefd9c43200a90 (Linux 5.10.63) and raspberrypi/firmware@74c4307951701f93bd94b4fd37e6adc44910d6e0 (Linux 5.10.103).
I think that the most interesting versions to test would be raspberrypi/firmware@70f1581eec2c036b7e9309f1af41c651fb125447 (Linux 5.4.83) and its successor in https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/release_notes.txt, raspberrypi/firmware@fcf8d2f7639ad8d0330db9c8db9b71bd33eaaa28 (Linux 5.10.17).
With raspberrypi/firmware@70f1581eec2c036b7e9309f1af41c651fb125447 (Linux 5.4.83) the DVB-T2 playback does not crash, and on some DVB-T2 channels I get a smooth playback after some initial delay of a few seconds. On other DVB-T2 channels, I get intermittent video or audio. My remote control unit did not work with this kernel, so I had to issue HITK
commands via SVDRP
; I apologize for some accidentally opened tickets when some blindly typed keyboard input went to the web browser window.
With raspberrypi/firmware@fcf8d2f7639ad8d0330db9c8db9b71bd33eaaa28 or raspberrypi/firmware@518ee7c871aaa9aaa88116953d57e73787ee6e43 (both claim to be Linux 5.10.17) the playback does not crash, and I get a better DVB-T2 playback on all channels that I tried.
The next firmware upgrade listed in https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/release_notes.txt is raspberrypi/firmware@4877a7d918be6fab22ce5d345feefd9c43200a90 (Linux 5.10.63). I had already tested it, but I upgraded to it again to double check, and I instantly got the SIGSEGV.
So, there seems to be a regression somewhere in the proprietary MMAL subsystem between Linux kernel version 5.10.17 and 5.10.63.
I was curious to see if this could be a viable work-around of reufer/rpihddevice#5 for my Raspberry Pi 2.
Good news first: the code as of cbccef7cc37c3122c75f58000a50227fe468ca45 compiled out of the box after the following:
and applying the patch:
On startup, I got an on-screen-display layer for the current channel, followed by a SIGSEGV before any video or audio played:
Here is the output followed by a stack trace of the crashing thread:
This is not a permission issue, because I got the same crash when running the software as the super user. I repeated this crash on two kernel versions:
and the newest that is currently available in Raspberry OS Lite (Legacy), raspberrypi/rpi-firmware@921f5efeaed8a27980e5a6cfa2d2dee43410d60d:
The current channel was in a DVB-T2 bouguet. After I edited
CurrentChannel
insetup.conf
to point to a DVB-T channel, it started to work, with subtitles and everything, using between 10% and 40% of one CPU core. There was nothing output to the standard output or error streams until I attempted to switch to a DVB-T channel:These messages were followed by SIGSEGV with the above stack trace. If I understood correctly, DVB-T2 here uses the H.264 encoding. It is supported natively by
rpihddevice
.