on RPi4 - MMAL or V4L2?

For discussion of topics specific to MythTV on Raspberry Pi devices
Post Reply
User avatar
jfabernathy
Senior
Posts: 245
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

on RPi4 - MMAL or V4L2?

Post by jfabernathy » Mon Jun 29, 2020 7:30 pm

I stay in a state of confusion, but for today I'm puzzled about which decoder to use with a Raspberry Pi 4 4GB on Mythtv v31. A while back I was testing V4L2 at someone's suggestion and I came up with a Video Playback Profile that seems to work okay.

Today I built up a new FE/BE combo with V31 using the pi-utils from https://github.com/MikeB2013/pi-utils.git and referred to https://www.mythtv.org/wiki/Raspberry_Pi#Overview and noticed the chart showing RP3 vs RP4 differences in configuring the video playback profiles. I tried both the V4L2 and MMAL and both work, but I think MMAL is better slightly.
My setup is the same as listed in the wiki link above, which is:

Only one entry:
Decoder MMAL Acceleration (decode only)
Max CPUs 4
Declocking Filter checked
Video Renderer OpenGL YV12
Deinterlacer Quality (single rate) Medium Quality
Prefer OpenGL deinterlacers Checked
Prefer driver deinterlacers Unchecked
Deinterlacer Quality (double rate) Medium quality
Prefer OpenGL Deinterlacers Checked
Prefer driver deinterlacers Unchecked

So my question, is there any consensus as to which decoded works best for ATSC MPEG2 OTA 1080i/720p USA recordings/liveTV ?

User avatar
mark_k
Developer
Posts: 54
Joined: Tue Jan 28, 2020 3:14 pm
Great Britain

Re: on RPi4 - MMAL or V4L2?

Post by mark_k » Tue Jun 30, 2020 10:54 am

There is no hardware acceleration of MPEG2 on the Pi4 - so it should be falling back to software/FFmpeg decoding regardless of whether V4l2 or MMAL is selected.

If there is a difference in playback, it may be due to the different profiles falling back to different defaults - check both are using 4 cores for decoding and that they are using the same deinterlacers.

I think you'll also get better playback on the Pi4 (when using software decoding) by deselecting OpenGL deinterlacers and using the medium quality software deinterlacer (which is a neon optimised linear blend).

Regards
Mark

User avatar
jfabernathy
Senior
Posts: 245
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: on RPi4 - MMAL or V4L2?

Post by jfabernathy » Tue Jun 30, 2020 2:34 pm

mark_k wrote:
Tue Jun 30, 2020 10:54 am
There is no hardware acceleration of MPEG2 on the Pi4 - so it should be falling back to software/FFmpeg decoding regardless of whether V4l2 or MMAL is selected.

If there is a difference in playback, it may be due to the different profiles falling back to different defaults - check both are using 4 cores for decoding and that they are using the same deinterlacers.

I think you'll also get better playback on the Pi4 (when using software decoding) by deselecting OpenGL deinterlacers and using the medium quality software deinterlacer (which is a neon optimised linear blend).

Regards
Mark
That makes sense now that you explained it that way, Thanks.
I tried MMAL but changed to the settings below

Only one entry:
Decoder: Standard
Max CPUs 4
Declocking Filter checked
Video Renderer OpenGL YV12
Deinterlacer Quality (single rate) Medium Quality
Prefer OpenGL deinterlacers Unchecked
Prefer driver deinterlacers Unchecked
Deinterlacer Quality (double rate) Medium quality
Prefer OpenGL Deinterlacers Unchecked
Prefer driver deinterlacers Unchecked

the OSD shows for 1080i the codec/dec as MPEG-2 ffmgeg with Deint: CPU Linearblend

If I use the setup as listed in the OP, I still get MPEG-2 ffmpeg but the Deint is GLSL Linearblend

It's starting to appear that these setting produce the same picture depending on the content. I'm currently leaning toward GLSL Linearblend, but it could be caused by watching too closely :-)

Post Reply