building mythtv light v31 for RP3B+

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

building mythtv light v31 for RP3B+

Post by jfabernathy »

I want to build mythtv light v31 so I can have mythfrontend on a RP3B+. Couple of questions.

1. Do I use the same configure options as I use for a RP4?
--disable-vdpau --enable-opengl --disable-vaapi --cpu=cortex-a7 --arch=armv7 --extra-cflags=-mfpu=neon --extra-cxxflags=-mfpu=neon

2. When building on an RP3 it suggest to limit the processes to 3. How is that controlled when building via the readme: https://github.com/MythTV/packaging/blo ... Readme.rst

Jim A
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: building mythtv light v31 for RP3B+

Post by MikeB2013 »

Jim,
Using mythtv-light build system, just use the same configure line you used for Pi4.
The script build.sh (called by build_package.sh) already limits the number of parallel make jobs to 2.

If you have created the mythtv-light...deb and mythplugins...deb files on a Pi4 you can install them on the Pi3.

Mike
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

Good to know about using the .deb created elsewhere.

So does that mean I could build my .deb file on a x86_64 Ubuntu 18.04 system to produce the same .deb for my RP3/4 since the .buildrc file specifies the --arch=armv7 ??

Jim A
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: building mythtv light v31 for RP3B+

Post by MikeB2013 »

jfabernathy wrote:
Mon Apr 06, 2020 4:14 pm
Good to know about using the .deb created elsewhere.

So does that mean I could build my .deb file on a x86_64 Ubuntu 18.04 system to produce the same .deb for my RP3/4 since the .buildrc file specifies the --arch=armv7 ??

Jim A
In a word no.

Building on any of Pi2, Pi3 or Pi4 is ok, you can install the resulting .deb files on Pi2, Pi3 or Pi4.

In theory cross-compile on X86_64 Ubuntu system is possible, but I have not managed to get it to work.
I did get distcc working on a Pi4 to a Xubuntu 18.04 system, this offloads the compile on the Pi4 to the Xubuntu system, but you need a special cross-compiler (one that understands Raspbian Buster). Build time on a Pi4 was about 1 hour, with distcc around 20 minutes.

Mike
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

using either the .deb built fon RP4 or Rp3 I get an error when starting using the run_mythfrontend.sh

Code: Select all

Starting MythTV Frontend -- this may take a few seconds -- Please wait
performance
tee: '/sys/devices/platform/soc/*.v3d/power/control': No such file or directory
on
Setting screen to 1920x1080@60
Could not open DRM device /dev/dri/card0 (No such file or directory)
Could not open DRM device
pi-utils/run_mythfrontend.sh: line 91:  2105 Aborted                 QT_QPA_PLATFORM=eglfs QT_QPA_EGLFS_KMS_CONFIG=/home/pi/pi_mythfrontend.json mythfrontend $ARGUMENTS
If I just run the actual command on line 91, the error I get is about QT not finding plugin eglfs.

This is on an RP3B+
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: building mythtv light v31 for RP3B+

Post by MikeB2013 »

Jim,

I just tried on a clean install of the Raspbian Buster on my Pi3, installed mythtv-light_31.0-13-g2cd6ccb419-0_armhf_buster.deb
built on my pi4 and it worked using same command line as you.

On the Pi3 did you enable the vc4-fkms-v3d driver using sudo raspi-config ?
7. Advanced Options > A8 GL Driver > G2 GL (Fake KMS)
and then reboot.

I get the same error messages as you if vc4-fkms-v3d driver is not enabled.

Mike
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

MikeB2013 wrote:
Tue Apr 07, 2020 9:19 am
Jim,
...
On the Pi3 did you enable the vc4-fkms-v3d driver using sudo raspi-config ?
7. Advanced Options > A8 GL Driver > G2 GL (Fake KMS)
and then reboot.

I get the same error messages as you if vc4-fkms-v3d driver is not enabled.

Mike
That makes sense since the default Fake KMS is in the config.txt but under a section for Pi4 only. I just need to move it.
Sorry to have missed that one. I got used to the fact that on a Pi4 it's automatically done.

Thanks,

Jim A
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: building mythtv light v31 for RP3B+

Post by MikeB2013 »

Jim,

I have added a basic check in run_mythfrontend.sh that tests for drm presence (indicates dtoverlay=vc4-fkms-v3d has been enabled).
It exits with a message to run raspi-config, if drm is not found.

As you have have cloned pi-utils, to get the latest version.

Code: Select all

cd pi-utils
git pull
Mike
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

I have mythfrontend working now on my PI3B+
However, I notice that looking at the menu while playing LiveTV that the Deint field shows none regardless of whether it's a 1080i or 720p channel. Normally my 1080i channels will show whatever Deinit setting I have.

The picture is not very good at this point. I captured a log. Maybe you can see something I missed.

Jim A
mythfrontend.20200407151818.1390.log
(225.37 KiB) Downloaded 73 times
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

jfabernathy wrote:
Tue Apr 07, 2020 3:31 pm
I have mythfrontend working now on my PI3B+
However, I notice that looking at the menu while playing LiveTV that the Deint field shows none regardless of whether it's a 1080i or 720p channel. Normally my 1080i channels will show whatever Deinit setting I have.

The picture is not very good at this point. I captured a log. Maybe you can see something I missed.

Jim A
mythfrontend.20200407151818.1390.log
To make sure I didn't miss a step I went back to my RP4 system and git pull'ed the latest fixes/31, packaging, and pi-utils.
I built the new mythtv-light_31.0-15-gece4ff7ebc-0_armhf_buster.deb and installed it on the RP4 and RP3B+

With the Video Playback settings the same I still have no Deinterlacer displayed when I watch Live TV and use the menu to check the playback data on the RP3B+ system. The RP4 system does have Deinterlacers on 1080i channels and none on 720p channels.

Jim A
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: building mythtv light v31 for RP3B+

Post by MikeB2013 »

Jim,
You log file is showing a number of :

Code: Select all

2020-04-07 11:18:33.174968 I [1390/1390] CoreContext mythplayer.cpp:789 (OpenFile) - Player(0): Opening 'GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/raspberrypi/10501_20200407151832.ts'
I do not see this on my Pi3.
Is your configuration on Pi3 just mythfrontend running to a remote mythbackend ?
I presume the hostname on the frontend is different from the hostname on the remote backend (duplicate hostnames on a network are not good).

I tried playback of the sample file you gave me a while ago (10501_20200319100000.ts) and it has no issues on my Pi3.

There are differences in the way mpeg2 is handled on Pi3 and Pi4. Pi4 does not have a builtin codec for mpeg2 (uses cpu for everything).
I am no expert (mark_k on this board is) on playback.

One thing I have seen before, if the Pi3 with default hostname of 'raspberrypi' has the same hostname as a previously connected pi4 (again with default hostname of 'raspberrypi') strange things can happen (not sure if this is still the case). When I setup a Pi I always change the default hostname to something unique (never seen by mythbackend) before running mythfrontend. This ensures a clean configuration of mythfrontend for testing purposes.

Mike
Last edited by MikeB2013 on Wed Apr 08, 2020 10:42 am, edited 1 time in total.
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

Never considered hostname as a potential issue. Both the rp4, which is the backend, and and the rp3B+ are the default raspberrypi hostname.

Let me fix that and see if the problem goes away.

Jim A
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

jfabernathy wrote:
Wed Apr 08, 2020 10:37 am
Never considered hostname as a potential issue. Both the rp4, which is the backend, and and the rp3B+ are the default raspberrypi hostname.

Let me fix that and see if the problem goes away.

Jim A
I'm afraid the problem still exist. I started with a fresh Raspbian Buster on the RP3B+ and installed the packaged created on the RP4 yesterday.
The RP4 has a hostname of raspberrypi and the RP3B+ has a hostname of raspberrypi3 and has a MPEG3 license. (I think the fuse bit only has to be blown once and it always remembers it has the license)

So I get the same results. I tried a number of combinations in Video setup for the V4L2 Decode only but could not ever get a Deint other than 'None'

The Log for that session is attached and I just used LiveTV changing channels between a 1080i and a 720P station.
mythfrontend.20200408113141.944.log
(198.06 KiB) Downloaded 71 times
User avatar
jfabernathy
Senior
Posts: 577
Joined: Wed Feb 18, 2015 2:37 pm
Location: Raleigh, NC
United States of America

Re: building mythtv light v31 for RP3B+

Post by jfabernathy »

in case it helps I used mythtranscode to create two 5 minute videos; one 1080i and one 720p. There were originally USA OTA recordings from a HDHR Quatro in MPEG2 format.

If I play them on the RP4 frontend the 1080i shows in menu -> playback data 1920x1080@29.97 with the normal deinterlacer.
The 720p shows in the menu -> playback data 1280x720@59.97 with no deinterlacer.

However, on the RP3 frontend using the same .deb. There is no deinterlacer on either.

I have the 2 videos, ~320MB each on a google drive if someone wants to investigate the problem.

MikeB2013, I've PM'ed you the link.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: building mythtv light v31 for RP3B+

Post by MikeB2013 »

Jim,

Both of those files playback ok on my Pi3.

I suspect the reason you are seeing Deint: None on Pi3 for test_1080i and test_720p is that Codec/Dec shows MPEG-2 v4l2. Both of the files are mpeg2.

Code: Select all

mike@myth-server-1:/myth/mythtv/videos$ mythffmpeg -i test_720p.ts 
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --arch=x86 --sysinclude=/usr/include --cc='ccache gcc' --cxx='ccache g++' --ld=gcc --cpu=generic --target_os=linux --pkg_config=pkg-config --prefix=/usr --libdir=/usr/lib --as=gcc --objcc=gcc --dep_cc=gcc --host_cc=gcc --host_ld=gcc --disable-cross-compile --enable-libmp3lame --enable-libx264 --disable-libx265 --enable-libvpx --disable-libxvid --enable-vdpau --enable-libxml2 --enable-libass --disable-dxva2 --enable-libbluray --disable-libfontconfig --disable-libfreetype --disable-libiec61883 --disable-crystalhd --enable-sdl2 --enable-ffplay --enable-vaapi --enable-libdrm --extra-cflags=' -w' --extra-ldflags= --enable-stripping --strip='echo skipping strip' --disable-manpages --disable-podpages --disable-doc --disable-nvenc --enable-shared --disable-static --enable-gpl --enable-pic --disable-demuxer=mpegtsraw --disable-indev=dshow
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mpeg, from 'test_720p.ts':
  Duration: 00:05:02.07, start: 0.360000, bitrate: 9046 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
At least one output file must be specified
mike@myth-server-1:/myth/mythtv/videos$ mythffmpeg -i test_1080i.ts 
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --arch=x86 --sysinclude=/usr/include --cc='ccache gcc' --cxx='ccache g++' --ld=gcc --cpu=generic --target_os=linux --pkg_config=pkg-config --prefix=/usr --libdir=/usr/lib --as=gcc --objcc=gcc --dep_cc=gcc --host_cc=gcc --host_ld=gcc --disable-cross-compile --enable-libmp3lame --enable-libx264 --disable-libx265 --enable-libvpx --disable-libxvid --enable-vdpau --enable-libxml2 --enable-libass --disable-dxva2 --enable-libbluray --disable-libfontconfig --disable-libfreetype --disable-libiec61883 --disable-crystalhd --enable-sdl2 --enable-ffplay --enable-vaapi --enable-libdrm --extra-cflags=' -w' --extra-ldflags= --enable-stripping --strip='echo skipping strip' --disable-manpages --disable-podpages --disable-doc --disable-nvenc --enable-shared --disable-static --enable-gpl --enable-pic --disable-demuxer=mpegtsraw --disable-indev=dshow
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mpeg, from 'test_1080i.ts':
  Duration: 00:05:00.82, start: 0.360000, bitrate: 9208 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 320 kb/s
    Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (visual impaired)
At least one output file must be specified


Mike
Post Reply