Raspbian OS updated to Buster

For discussion of topics specific to MythTV on Raspberry Pi devices
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Raspbian OS updated to Buster

Post by MikeB2013 »

With the release of Raspberry Pi 4, the default Raspbian version is now Buster for ALL Pi models.
The normal download page is at https://www.raspberrypi.org/downloads/raspbian/

mythtv-light current 30 release is only supported on Stretch, so the Raspbian Stretch image is still required until mythtv-light is updated, which also means no mythtv-light on Pi 4 at present.

Older Raspbian images are available at http://downloads.raspberrypi.org/raspbian/images/

Mike
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Raspbian OS updated to Buster

Post by pgbennett »

Hmmm - good ideas always translate into hard work :(

I guess I need to look into Buster. I have no raspberry pi 4 so it will have to be built on rpi 3 for now.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by MikeB2013 »

pgbennett wrote:
Mon Jun 24, 2019 5:26 pm
Hmmm - good ideas always translate into hard work :(

I guess I need to look into Buster. I have no raspberry pi 4 so it will have to be built on rpi 3 for now.
Peter,

I have a pi 4 (4GB RAM version) arriving tomorrow and will try a mythtv master build from source.

The graphics part is going to be interesting, to quote from the pi 4 blog https://www.raspberrypi.org/blog/

"One notable step forward is that for Raspberry Pi 4, we are retiring the legacy graphics driver stack used on previous models. Instead, we’re using the Mesa “V3D” driver developed by Eric Anholt at Broadcom over the last five years. This offers many benefits, including OpenGL-accelerated web browsing and desktop composition, and the ability to run 3D applications in a window under X. It also eliminates roughly half of the lines of closed-source code in the platform."

Also from the raspberry pi forum https://www.raspberrypi.org/forums/view ... 2#p1483965

"One big change on the Pi4 - there is no HW support for MP2 or VC1. These are both now decoded in software with the more powerful ARM cores. . So you don't need a licence."

Mike
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Raspbian OS updated to Buster

Post by pgbennett »

Let me know how it goes.

Regarding MPEG2, that already works with software decoding on Pi3 and even on Pi2, if you don't have a license. So that should work fine.

I don't know about the new graphics and OpenGL - there may be opportunities to improve the rpi support there.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by MikeB2013 »

Have built fixes/30 using mythtv/packaging/deb-light on a pi3 running stock Raspbian buster with everything on an SSD.
Although I have also built mythplugins, don't bother, does not install due dependency problems (Depends: python-imaging but it is not installable as it is not available on buster).

It basically works on both pi 3 (still uses openmax) and pi 4 (uses vc4-fkms-v3d).
For pi 3 normal configuration applies, apart from Audio which I have at default of ALSA:default:CARD=ALSA, Video set to OpenMax.
For pi 4 which is connected to a 4K TV, I had to drop the screen resolution to 1920x1080 @50Hz, Audio at default, Video set to Normal or High Quality.

Edit 20190821
Official release of mythtv-light 30 for Raspbian Buster is now available see https://www.mythtv.org/wiki/MythTV_Light

Edit 20191001
My unofficial build is no longer available Dropbox link deleted.

Note I applied one patch to the build to get around the DVB-T/T2 Live TV issue in trac https://code.mythtv.org/trac/ticket/13292
The build also works into mythtv master backend at this time, as schemas are the same.

Download and then Install mythtv-light_30.0-60-gb9c1b41a6c-0_armhf_buster.deb as follows:

Code: Select all

sudo apt install ./mythtv-light_30.0-60-gb9c1b41a6c-dirty-0_armhf_buster.deb
This method of using apt resolves all the dependencies (sudo dpkg -i ...deb does not).

There were some issues with doing the build:
Could not use ansible (libcec4-dev not available) to setup the depends, so I installed manually as follows (includes mariadb):

Code: Select all

sudo apt install  build-essential ccache yasm help2man qtdeclarative5-dev libqt5webkit5-dev libqt5opengl5-dev qtscript5-dev qt5-qmake po-debconf linux-kernel-headers libdvdnav-dev libfreetype6-dev libavc1394-dev libiec61883-dev liblircclient-dev libxinerama-dev libxxf86vm-dev libxvmc-dev libxext-dev libimlib2-dev libasound2-dev libmp3lame-dev libvorbis-dev libdts-dev lsb-release libpulse-dev libxrandr-dev libfftw3-dev libva-dev libvdpau-dev libudev-dev libclass-dbi-perl libnet-upnp-perl libio-socket-inet6-perl libdbd-mysql-perl libjson-perl libwww-perl python python-oauth python-lxml python-mysqldb python-pycurl python-urlgrabber libgl1-mesa-dev libdvdread-dev fftw-dev libvorbis-dev libflac-dev libmad0-dev libcdaudio-dev libcdio-dev libcdparanoia-dev libsdl1.2-dev libfaad-dev libexif-dev libtiff5-dev libxv-dev libtag1-dev libvisual-0.4-dev libmariadb-dev-compat libmariadb-dev libdate-manip-perl libxml-simple-perl libimage-size-perl libdatetime-format-iso8601-perl libsoap-lite-perl libx264-dev libvpx-dev libavahi-compat-libdnssd-dev libssl-dev libcdio-cdda-dev libcdio-paranoia-dev libxml2-dev libass-dev libcec-dev libexiv2-dev uuid-dev libxml-xpath-perl git hello libtool-bin libsamplerate0-dev libbluray-dev libxnvctrl-dev liblzo2-dev libxcb-shm0-dev libraspberrypi-dev
Mike
Last edited by MikeB2013 on Tue Oct 01, 2019 2:15 pm, edited 2 times in total.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Raspbian OS updated to Buster

Post by pgbennett »

Good work Mike. I have not got around to it yet. Thanks for doing this.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by MikeB2013 »

I have uploaded new build of mythplugins to the Dropbox which I think fixes it, mythnews and mythbrowser work.

Download and install with :

Code: Select all

 sudo apt install ./mythplugins-light_30.0-60-gb9c1b41a6c-dirty-0_armhf_buster.deb
The only change was to deb-light packaging: python-imaging | python-pil, git diff as follows:

Code: Select all

diff --git a/deb-light/package.sh b/deb-light/package.sh
index 6886d6a..0b03b3b 100755
--- a/deb-light/package.sh
+++ b/deb-light/package.sh
@@ -183,7 +183,7 @@ Architecture: $arch
 Essential: no
 Installed-Size: `du -B1024 -d0 $installdir/$packagename | cut  -f1`
 Maintainer: Peter Bennett <pbennett@mythtv.org>
-Depends: mythtv-light, python, perl, libimage-size-perl, perlmagick, libxml-parser-perl, libxml-sax-perl, libcarp-clan-perl, libsoap-lite-perl, libdate-manip-perl, libdate-calc-perl, libwww-perl, libxml-simple-perl, libdatetime-format-iso8601-perl, libjson-perl, libxml-xpath-perl, mjpegtools, dvdauthor, genisoimage, dvd+rw-tools, python, python-imaging, python-mysqldb, pmount, python-feedparser, python-pycurl
+Depends: mythtv-light, python, perl, libimage-size-perl, perlmagick, libxml-parser-perl, libxml-sax-perl, libcarp-clan-perl, libsoap-lite-perl, libdate-manip-perl, libdate-calc-perl, libwww-perl, libxml-simple-perl, libdatetime-format-iso8601-perl, libjson-perl, libxml-xpath-perl, mjpegtools, dvdauthor, genisoimage, dvd+rw-tools, python, python-imaging | python-pil, python-mysqldb, pmount, python-feedparser, python-pycurl
 Conflicts: mythtv-common, mythtv-frontend, mythtv-backend
 Homepage: http://www.mythtv.org
 Description: MythTV Plugins Light

Mike
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Raspbian OS updated to Buster

Post by pgbennett »

Mike

In my RPI3 running buster I cannot see the necessary defines for H265. Please can you look at your RPI4 and see if it is different there.

Code: Select all

cd /opt/vc/include/IL
grep OMX_VIDEO_Coding OMX_Video.h
This is what I get. I expect to see an entry for HEVC or H265 but there is none:

Code: Select all

    OMX_VIDEO_CodingUnused,     /**< Value when coding is N/A */
    OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */
    OMX_VIDEO_CodingMPEG2,      /**< AKA: H.262 */
    OMX_VIDEO_CodingH263,       /**< H.263 */
    OMX_VIDEO_CodingMPEG4,      /**< MPEG-4 */
    OMX_VIDEO_CodingWMV,        /**< all versions of Windows Media Video */
    OMX_VIDEO_CodingRV,         /**< all versions of Real Video */
    OMX_VIDEO_CodingAVC,        /**< H.264/AVC */
    OMX_VIDEO_CodingMJPEG,      /**< Motion JPEG */
    OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
    OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    OMX_VIDEO_CodingVP6,        /**< On2 VP6 */
    OMX_VIDEO_CodingVP7,        /**< On2 VP7 */
    OMX_VIDEO_CodingVP8,        /**< On2 VP8 */
    OMX_VIDEO_CodingYUV,        /* raw YUV video */
    OMX_VIDEO_CodingSorenson,   /**< Sorenson */
    OMX_VIDEO_CodingTheora,     /**< Theora */
    OMX_VIDEO_CodingMVC,        /**< H.264/MVC */ 	
    OMX_VIDEO_CodingMax = 0x7FFFFFFF
 *                          component. When OMX_VIDEO_CodingUnused is 
 *                       component. When OMX_VIDEO_CodingUnused is specified, 
This means I will not be able to build for RPI4 with hardware H265 decoding.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by MikeB2013 »

Peter,
Pi 4 uses OpenGL
From /boot/config.txt

Code: Select all

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

There is also another option to enable 4k "hdmi_enable_4k=1"

Attached is output of glxinfo -l on pi4

Also attached is glxinfo -l output from pi3 with dtoverlay=vc4-fkms-v3d enabled.

Mike
Attachments
glxinfo-lpi3.txt
(52.4 KiB) Downloaded 135 times
glxinfo-l.txt
(73.7 KiB) Downloaded 145 times
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by jksj »

Hi just got my Pi 4

Trying to compare my results to yours. Your conclusion was that hardware decoding didn't work but software was ok. I can't get software decoding to work. The framerate is slow without the processors being loaded. Video playback in Chrome is the same, low cpu load and low frame rate. I understand that is the general state of the platform as the video libraries are yet to be optimized. Could you post the settings you are using for software playback including de-interlacing. My source material is UK DVB 1080i 25Hz
AFD: Using ffmpeg for video decoding
2019-06-29 16:59:12.205360 I AFD: Opened codec 0x2ee93a0, id(H264) type(Video)
2019-06-29 16:59:12.227219 I AOBase: Opening audio device 'sysdefault:CARD=ALSA' ch 2(2) sr 48000 sf signed 16 bit reenc 0
2019-06-29 16:59:12.356939 E VideoOutputXv: Desired video renderer '' not available.
codec 'H.264' makes 'xv-blit,xshm,xlib,' available, using 'xv-blit' instead.


Hadware playback with Openmax high quality worked for me with improved quality to Pi 3B but still an unacceptable amount of jitter especially when panning. Interestingly turning off high priority interrupts in the video setting produced slight tearing.

TV::HandleStateChange(): Attempting to change from None to WatchingPreRecorded
2019-06-29 17:34:53.072644 N AudioPlayer: Enabling Audio
2019-06-29 17:34:54.457395 I AFD: codec AAC/LATM has 2 channels
2019-06-29 17:34:54.457979 I AFD: Opened codec 0x5e01d80, id(AAC/LATM) type(Audio)
2019-06-29 17:34:54.458105 I AFD: codec AAC/LATM has 0 channels
2019-06-29 17:34:54.458421 I AFD: Opened codec 0x30bb8c0, id(AAC/LATM) type(Audio)
2019-06-29 17:34:54.458599 I AFD: Opened codec 0x5226df0, id(DVB_SUBTITLE) type(Subtitle)
2019-06-29 17:34:54.475482 I AFD: Using openmax for video decoding
2019-06-29 17:34:54.475760 I AFD: Opened codec 0x51dddd0, id(H264) type(Video)
2019-06-29 17:34:54.497499 I AOBase: Opening audio device 'sysdefault:CARD=ALSA' ch 2(2) sr 48000 sf signed 16 bit reenc 0
2019-06-29 17:34:54.694981 I VideoOutputOMX: Init: OSD display uses softblend

FPS: 25.18 Mean: 39719 Std.Dev: 12167 CPUs: 33% 24% 45% 25%
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by MikeB2013 »

On the pi4 I am running stock Raspbian Buster which uses vc4-fkms-v3d rather than OpenMAX, which I have not really tried, but from a quick look I don't see OpenMAX High Quality, only OpenMAX Normal, so it is possible I got the build wrong, I am looking into this it (it takes a while).

my pi4 is connected using hdmi-0 (the one nearest the usb-c power connector).
Setup screen resolution (Preferences>Screen Configuration HDMI-1) 1920x1080 @50Hz, I have it connected to 4k Television it defaults to 3840x2160 @30Hz.

Before running mythfrontend I changed the pi4 hostname from default of raspberrypi to something never seen by mythbackend, if mythbackend already has settings for the hostname these will be used, so it could try and setup a pi4 to use pi 3 settings.

In mythfrontend SetWizard I have
Audio Configuration Audio Device: ALSA:default:CARD=ALSA
Video Configuration Video Playback Profile: Normal (or High Quality)

In mythfrontend
Setup>video>Playback
Decoder Standard
Max CPUs 1
Deblocking filter ticked
video renderer xv-blit
OSD renderer softblend
Primary deinterlacer Linear blend
Fallback deinterlacer Linear blend

Theme is set to default i.e. MythCenter 1.4

I do see the odd problem with panning, mainly on HD channels.

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

Re: Raspbian OS updated to Buster

Post by MikeB2013 »

@pgbennett

Peter,

I was having a look at why OpenMAX High Quality was not available in my build (I failed to notice OpenGL ES 2.0 was not being enabled).

Output of a test taken from configure gives the following, which explains why OpenGL ES 2.0 is enabled in Stretch but not Buster:
Stretch:

Code: Select all

pi@pi3-stretch:~ $ echo QTCONF=$(pkg-config --variable=qt_config Qt5Core || pkg-config --variable=qt_config QtCore)
QTCONF=minimal-config small-config medium-config large-config full-config release_tools gtk3 fontconfig libudev evdev xkbcommon-evdev libinput xlib xrender xcb-plugin xcb-render xcb-glx xcb-xlib xcb-sm accessibility-atspi-bridge gbm linuxfb kms c++11 c++14 c++1z accessibility egl egl_x11 eglfs eglfs_egldevice eglfs_gbm opengl opengles2 shared qpa reduce_exports clock-gettime clock-monotonic posix_fallocate mremap getaddrinfo ipv6ifname getifaddrs inotify eventfd threadsafe-cloexec poll_ppoll system-jpeg system-png png system-doubleconversion system-freetype system-harfbuzz system-zlib mtdev cups iconv glib dbus dbus-linked openssl libproxy xcb xinput2 alsa pulseaudio gstreamer-1.0 icu concurrent audio-backend release

Buster:

Code: Select all

pi@pi4-buster:~ $ echo QTCONF=$(pkg-config --variable=qt_config Qt5Core || pkg-config --variable=qt_config QtCore)
QTCONF=shared release c++11 c++14 c++1z concurrent dbus reduce_exports release_tools stl properties animation textcodec big_codecs clock-monotonic codecs textdate datestring doubleconversion eventfd filesystemiterator filesystemwatcher gestures glib itemmodel proxymodel identityproxymodel inotify library mimetype process statemachine regularexpression settings sharedmemory sortfilterproxymodel stringlistmodel systemsemaphore temporaryfile threadsafe-cloexec translation xmlstream xmlstreamreader xmlstreamwriter

As you can see a lot of things are no longer in Buster.

Is this something that can be fixed in configure or is it more more fundamental ?
I was expecting a single build to handle pi2/pi3/p4.

All the usual stuff is in /opt/vc/ on Buster.

Mike
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Raspbian OS updated to Buster

Post by pgbennett »

On pi3 with buster I am also not getting openmax high quality, only openmax normal and a bunch of other options that are pretty useless. Openmax normal plays ok on the pi3. Does Openmax normal play with the pi4?

Possibly buster is set up for OpenGL rather than OpenGL ES. This may be the reason for ES being disabled.
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Raspbian OS updated to Buster

Post by jksj »

I built fixes 30 using the following configure
./configure --enable-omx-rpi --disable-vdpau --disable-opengl-video --enable-opengl --disable-opengl-themepainter --disable-vaapi

It runs using OpenMax on both RPI 3 and 4.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Raspbian OS updated to Buster

Post by pgbennett »

"Openmax Normal" works for me but not "Openmax High Quality". Also when openmax render is selected, I cannot select opengl osd, only softblend osd is available.

Do you see something different?
Post Reply