Mythtv-light v31 de-interlacing not working with V4L2 decoders

For discussion of topics specific to MythTV on Raspberry Pi devices
Post Reply
mtbdrew
Junior
Posts: 30
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Mythtv-light v31 de-interlacing not working with V4L2 decoders

Post by mtbdrew » Sat Jun 27, 2020 6:21 pm

Raspberry Pi3 running Raspberry Pi OS Lite, Have installed Mythtv-light v31 using these steps:

sudo raspi-config
sudo apt update
sudo apt -y full-upgrade
sudo reboot
sudo apt install git
git clone https://github.com/MikeB2013/pi-utils.git
sudo apt-get install --no-install-recommends xserver-xorg
cd pi-utils
./pi-setup_mythtv_31.sh
reboot and it will start up in mythfrontend

Active video profile is:
Decoder V4L2 (Decode Only)
Max CPUs 4
Deblocking Filter ✓
Video Renderer OpenGL YV12
Deinterlacer Quality (SR) Medium
Prefer OpenGL Deinterlacer ✓
Deinterlacer Quality (DR) None

When watching recordings interlacing lines are visible, playback data shows Deint : None

Have tried all the V4L2 profiles with same results. The only profiles that shows De-interlacing are the MMAL Standard and MMAL decode only but video is jagged and unwatchable. However they do show Deint : GLSL Linearblend

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

Re: Mythtv-light v31 de-interlacing not working with V4L2 decoders

Post by mark_k » Sat Jun 27, 2020 10:52 pm

mtbdrew wrote:
Sat Jun 27, 2020 6:21 pm
When watching recordings interlacing lines are visible, playback data shows Deint : None

Have tried all the V4L2 profiles with same results. The only profiles that shows De-interlacing are the MMAL Standard and MMAL decode only but video is jagged and unwatchable. However they do show Deint : GLSL Linearblend
Sorry - this was mentioned in the original development branch notes (note: some other parts of that page are out of date):-

https://www.mythtv.org/wiki/2019-render ... imitations

but I missed it when writing the release notes for v31:-

https://www.mythtv.org/wiki/Release_Not ... nterlacing

Essentially, the v4l2 driver on the Raspberry Pi does not pass through the deinterlacing flags (from MMAL). So the MythTV code has nothing to work with (as written anyway) for detecting interlaced material. The deinterlacers should still work - they are just not switched on.

You can override the video scan from the OSD Menu (Video->Advanced->Video scan) - which is fiddly. A quicker workaround is to bind a key to the 'NEXTSCAN' action (Setup->Edit keys->TV Playback->NEXTSCAN).

Regards
Mark

mtbdrew
Junior
Posts: 30
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Mythtv-light v31 de-interlacing not working with V4L2 decoders

Post by mtbdrew » Sun Jun 28, 2020 5:28 pm

Thanks Mark I missed that in the release notes sorry.

As for the manual selection of de-interlacing, all but "Interlaced" still show Deint : None. "Interlaced" shows Deint : GLSL Linearblend or 2x GLSL Linearblend but both are unwatchable due to jitter/frame slips.

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

Re: Mythtv-light v31 de-interlacing not working with V4L2 decoders

Post by mark_k » Mon Jun 29, 2020 3:55 pm

mtbdrew wrote:
Sun Jun 28, 2020 5:28 pm
Thanks Mark I missed that in the release notes sorry.

As for the manual selection of de-interlacing, all but "Interlaced" still show Deint : None.
That is to be expected. Mythtv is 'detecting' the video as progressive - because it is not flagged as interlaced. So only overriding the scan to interlaced will force the deinterlacers to be enabled.
"Interlaced" shows Deint : GLSL Linearblend or 2x GLSL Linearblend but both are unwatchable due to jitter/frame slips.
Your profile is using v4l2 'decode only' - so the frames are in software. You can either use software deinterlacers or OpenGL/shaders. For the Pi3, I can't honestly remember which has the best performance but for OpenGL you almost certainly want low quality. I would also try CPU deinterlacing (disable 'prefer opengl deinterlacer') at either low or medium quality.

You didn't say what codec(s) your source material is - but I would definitely try using pure v4l2 (i.e. NOT decode only) which should have better rendering performance in general and there is an optimised deinterlacer available.

I would also make sure there is a 'fallthrough' option that uses software decoding and low or medium quality deinterlacing if, for example, your source is MPEG2 and you do not have an MPEG2 license installed.

Hopefully that makes sense.

Regards
Mark

mtbdrew
Junior
Posts: 30
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Mythtv-light v31 de-interlacing not working with V4L2 decoders

Post by mtbdrew » Mon Jun 29, 2020 8:35 pm

Video source is recorded TV from the BE and I do have the license installed.

V4L2 acceleration (not decode only) does allow de-interlacing to be used without the tearing and jitter. This reports as Deint : 2x EGL Onefield and I am able to run both single and double at medium with prefer driver deinterlacers checked and OpenGl not checked. Video plays smoother in this mode though not as crisp and clear as the old "Open" decoder in v30.

Post Reply