mythtv-light on Bullseye

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

mythtv-light on Bullseye

Post by jfabernathy »

Now that Raspberry Pi OS 32bit has been updated to Bullseye, I thought I might take a crack and seeing if I could install mythtv-light on it. During:

Code: Select all

sudo gdebi mythtv-light_31.0-158-g0680b37c68-0_armhf_buster.deb
I get the error:

Code: Select all

This package is uninstallable
Dependency is not satisfiable: libexiv2-14
I can't find a replacement package for this is Bullseye.

I'll see if I can build from source.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

I decided to solve this a different way. I went back and installed the latest beta for Raspberry Pi OS 64bit which is based on Debian Bullseye. Then I ran the same build from source using mythtv-light. The dependencies and ./configure options were the same as mentioned in earlier post on this forum.

It built clean and I installed the .deb package it created.

Then I used the pi-mythbackend-helper.sh from github.com/MikeB2012/pi-utils to install the rest of the stuff for the backend.

As far as the frontend, I modified the ./run_mythfrontend.sh script from pi-utils because the Bullseye version doesn't use the fake KMS OpenGL driver. Apparently OpenGL is already baked in. So my run_mythfront.sh is:

Code: Select all

#!/bin/bash

# script to run mythfrontend from version 31 on Raspberry Pi under Raspian Buster using EGLFS
# can be added to .bashrc to allow autostart of mythfrontend on boot

# Last Modified 24 July 2020

# Author Mike Bibbings

# check if running via SSH, if so skip running mythfrontend, it must only run locally.
SSH=$(printenv | grep SSH_CLIENT)
if [ -n "$SSH" ]; then
#    echo "run_mythfrontend.sh cannot be run over ssh"
    exit 1
fi

#check mythfrontend has been installed, if not abort with message
MYTHFRONTEND=`which mythfrontend`
if [ -z "$MYTHFRONTEND" ]; then
    echo -e "mythfrontend not found - please install MythTV-Light package"
    echo -e "See 'https://www.mythtv.org/wiki/MythTV_Light'\n"
    exit 1
fi

#check for any arguments on command line, if so use for mythfrontend command, so we can use different parameters
#e.g. run_mythfrontend.sh --logpath /home/pi --loglevel debug
# if no arguments set --logpath /tmp
if [ -z "$*" ] ; then
	ARGUMENTS="--logpath /tmp"
else
	ARGUMENTS="$*"
fi

echo "Starting MythTV Frontend -- this may take a few seconds -- Please wait"

PI_MODEL=$(grep -ic 'Pi 4' /proc/device-tree/model)
# set perfomance mode, not sure if needed for Pi4, do it anyway
echo performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

#strip out everything except resolution e.g. 1920x1080
CURRENT_RES=1920x1080

RESOLUTION="$CURRENT_RES@60"

echo "Setting screen to $RESOLUTION"

# we need override file to force correct resolution.
# QT defaults to using EDID from connected hdmi device
# pi2/3 use /dev/dri/card0,  pi4 /dev/dri/card1
# find out which model of Pi we have


if [ "$PI_MODEL" = 1 ]
then
      CARD="card1"
else
      CARD="card0"
fi

#file created everytime this script is run,avoids checking previous and current resolution everytime
bash -c "cat >/home/pi/pi_mythfrontend.json" <<ENDOFSCRIPTINPUT
{
    "device": "/dev/dri/${CARD}",
    "outputs": [
        { "name": "HDMI1", "mode": "${RESOLUTION}" }
    ]
}
ENDOFSCRIPTINPUT

#for QT debug add to command line QT_QPA_EGLFS_DEBUG=1 QT_LOGGING_RULES=qt.qpa.*=true
QT_QPA_EGLFS_ALWAYS_SET_MODE="1" QT_QPA_PLATFORM=eglfs QT_QPA_EGLFS_KMS_CONFIG=/home/pi/pi_mythfrontend.json mythfrontend $ARGUMENTS
# fixup keyboard after exit from mythfrontend, bug in QT causes segment fault which kills keyboard input
kbd_mode -u
# restore cursor
setterm  --cursor on

exit 0
I setup the EPG using XMLTV and SchedulesDirect as I usually do and setup the wait until pingable so the backend waits for the HDHR tuners.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

I forgot to mention that this may be the best Raspberry Pi 4 Frontend yet. The 64 bits helps and the video driver Bullseye uses in improved. I use HDHR tuners and RPI4 makes a good combo FE/BE.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

Some updates and results:

I built from source 2 different frontends, both on fixes/31 which gets you to v31-0-167. One frontend was on RPI OS 32 bits and the other on 64 bits. Both were Bullseye release for 32 bit and Beta for 64 bits.

Bullseye uses the vc4-kms-v3d instead of the vc4-fkms-v3d. I wonder if this is were the improvements come from. Both frontends look great on 1080i and 720P MPEG2 OTA recordings. Visually I have not spotted a difference, but if I look at the playback data, 64 bit Bullseye is slightly less bounce in the FPS number. Either is very low.

I used the mythtv-light build instructions instead of the pre-compiled one. I followed the instructions from:
https://www.mythtv.org/wiki/Build_from_Source and
https://github.com/MythTV/packaging/tre ... /deb-light

At his point ansible has not been updated for bullseye so I used a script for the dependencies:

Code: Select all

sudo apt install git g++ make build-essential nasm automake libtool ccache pkg-config libtool-bin uuid-dev libfreetype6-dev libmp3lame-dev libxv-dev libxxf86vm-dev libxinerama-dev libxrandr-dev libxml2-dev libavahi-compat-libdnssd-dev libexiv2-dev libasound2-dev libegl1-mesa-dev liblzo2-dev libhdhomerun-dev libsamplerate0-dev libxnvctrl-dev libva-dev libdrm-dev libvdpau-dev libass-dev libxvidcore-dev libx264-dev libvpx-dev libbluray-bdj libavc1394-dev libiec61883-dev libpulse-dev libfftw3-dev libssl-dev libsystemd-dev libgnutls28-dev libcec-dev libavc1394-dev libiec61883-dev libpulse-dev libfftw3-dev libssl-dev libsystemd-dev libbluray-dev libx265-dev python3-future python3-requests python3-requests-cache python3-mysqldb python3-lxml python3-oauth python3-pycurl python3-simplejson libdbi-perl libdbd-mysql-perl libnet-upnp-perl libwww-perl libio-socket-inet6-perl libdate-manip-perl libxml-simple-perl libxml-xpath-perl libimage-size-perl libdatetime-format-iso8601-perl libsoap-lite-perl libjson-perl libvorbis-dev libflac-dev libflac++-dev libtag1-dev libcdio-dev libcdio-paranoia-dev libminizip-dev libqt5core5a libqt5webkit5-dev libqt5opengl5-dev libqt5script5 qtscript5-dev qt5-qmake libqt5sql5-mysql libsoundtouch-dev libzip-dev
my .buildrc file to build mythtv-light is:
32 bit

Code: Select all

MYTHTV_CONFIG_OPT_EXTRA="--disable-vdpau --enable-opengl --disable-vaapi --arch=armv7"
64 bits

Code: Select all

MYTHTV_CONFIG_OPT_EXTRA="--disable-vdpau --enable-opengl --disable-vaapi --arch=aarch64
If anyone needs more details or has questions, just post them here.
kc2cbd
Newcomer
Posts: 5
Joined: Sat Nov 20, 2021 10:47 pm
United States of America

Re: mythtv-light on Bullseye

Post by kc2cbd »

Would you be willing to share your .deb files for 64bit Raspbian?
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

kc2cbd wrote:
Sat Nov 20, 2021 10:49 pm
Would you be willing to share your .deb files for 64bit Raspbian?
At this point I only have the .deb file for what I'm running which is Bullseye 64 bits v32-pre that was built using a development version that is testing merging in ffmpeg 4.4.1. It works great and I think its the best I've seen so far. However, it would mean you need a v32 or Master backend, Or you need to just build a combo FE/BE. (Use pi-mythbackend-helper.sh from https://github.com/MikeB2013/pi-utils)

If you want to wait until tomorrow, I can build mythtv-light v31 on Bullseye 64 bit and post that. Just let me know.
Google Drive folder where I will post debs.

https://drive.google.com/drive/folders/ ... sp=sharing
kc2cbd
Newcomer
Posts: 5
Joined: Sat Nov 20, 2021 10:47 pm
United States of America

Re: mythtv-light on Bullseye

Post by kc2cbd »

Thanks. That is what I needed.
kc2cbd
Newcomer
Posts: 5
Joined: Sat Nov 20, 2021 10:47 pm
United States of America

Re: mythtv-light on Bullseye

Post by kc2cbd »

Are the plugins built also?
Thanks again.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

kc2cbd wrote:
Sat Nov 20, 2021 11:42 pm
Are the plugins built also?
Thanks again.
just posted in the same Google Drive folder
kc2cbd
Newcomer
Posts: 5
Joined: Sat Nov 20, 2021 10:47 pm
United States of America

Re: mythtv-light on Bullseye

Post by kc2cbd »

Thank You Sir. :)
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

I just added ,deb files for Bullseye 64 bit mythtv-light v31 and mythplugin-light v31

https://drive.google.com/drive/folders/ ... sp=sharing
zachron
Newcomer
Posts: 10
Joined: Thu Nov 25, 2021 5:21 pm
United States of America

Re: mythtv-light on Bullseye

Post by zachron »

question about running on bullseye and the new kms driver, what audio device do you use? it list a bunch for me, but they are all "headphones" and i cannot get any audio to go out via the HDMI. That is with a clean install from the 2021-10-30-raspios-bullseye-arm64-lite.zip image and the myth deb file you built. Any ideas are appreciated, or maybe i am just missing something obvious.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

zachron wrote:
Fri Nov 26, 2021 3:38 pm
question about running on bullseye and the new kms driver, what audio device do you use? it list a bunch for me, but they are all "headphones" and i cannot get any audio to go out via the HDMI. That is with a clean install from the 2021-10-30-raspios-bullseye-arm64-lite.zip image and the myth deb file you built. Any ideas are appreciated, or maybe i am just missing something obvious.
did you do all the raspberry OS updates??

I have noticed that on the RPI, sometimes I have to select the wrong audio device so that I can then select the right on. I just checked my RPI4 attached to my UHD 4k TV and it's audio says ALSA:hdmi:CARD=vc4hdmi0,DEV=0. However, I can't really check V31 on 64 bit Bullseye right now because I'm running the mythtv-light_test_32~Pre-2989-g1147ad9a91-0_arm64_bullseye.deb. It's the best picture I can get so I'm running that.

Jim A
zachron
Newcomer
Posts: 10
Joined: Thu Nov 25, 2021 5:21 pm
United States of America

Re: mythtv-light on Bullseye

Post by zachron »

did you do all the raspberry OS updates??
i thought i had done this, but apparently i had not, after doing a full-update, "ALSA:hdmi:CARD=vc4hdmi0" showed up for me and everything seems to be working correctly, so thank you.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: mythtv-light on Bullseye

Post by jfabernathy »

zachron wrote:
Fri Nov 26, 2021 4:38 pm
did you do all the raspberry OS updates??
i thought i had done this, but apparently i had not, after doing a full-update, "ALSA:hdmi:CARD=vc4hdmi0" showed up for me and everything seems to be working correctly, so thank you.
This morning I added the .deb file for the one I'm using. If you are building a combo with a backend then you can use that to compare video performance.
mythtv-light_test_32~Pre-2989-g1147ad9a91-0_arm64_bullseye.deb
It's based on the Master v32~Pre but the devel/ffmpeg-resync branch. It's just for testing. On the RPI4 I think it is better that even Master.
DISCLAIMER: not for production, just for testing.
Post Reply