How to build a MythTV v33 system for a Raspberry Pi 4
- jfabernathy
- Senior
- Posts: 536
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: How to build a MythTV v32 system for a Raspberry Pi 4
Okay, sudo removed from OP
EDIT: I had time today after the most recent edits to the OP to test build following these instructions and they still work to build a combo FE/BE.
EDIT: I had time today after the most recent edits to the OP to test build following these instructions and they still work to build a combo FE/BE.
-
- Newcomer
- Posts: 1
- Joined: Fri Oct 28, 2022 3:04 pm
Re: How to build a MythTV v32 system for a Raspberry Pi 4
I have a Raspberry Pi 4b with 4GB RAM, using HDHomeRun FLEX 4K tuner.
Currently I am using a 2.5" laptop 1 TB hard drive with a usb3 to sata adapter to run myth backend only.
After following these directions everything is working well.
The build and install worked perfectly.
But I am using ATSC OTA EIT for the program guide listings.
Now I would like to use the "Black Box" external tuner mythhdhrrecorder.
After following directions for mythhdhrrecorder I cannot get it to work.
Below is the error from backend.log
CoreContext recorders/dtvchannel.cpp:289 (SetChannelByString) DTVChan[2](/usr/local/bin/mythhdhrrecorder -d 0 --use-cloud-discovery): SetChannelByString(2_1): Failed to initialize multiplex options
I am wondering if this will not work with MythTV version 32.
Any ideas how to get mythhdhrrecorder working?
John
Currently I am using a 2.5" laptop 1 TB hard drive with a usb3 to sata adapter to run myth backend only.
After following these directions everything is working well.
The build and install worked perfectly.
But I am using ATSC OTA EIT for the program guide listings.
Now I would like to use the "Black Box" external tuner mythhdhrrecorder.
After following directions for mythhdhrrecorder I cannot get it to work.
Below is the error from backend.log
CoreContext recorders/dtvchannel.cpp:289 (SetChannelByString) DTVChan[2](/usr/local/bin/mythhdhrrecorder -d 0 --use-cloud-discovery): SetChannelByString(2_1): Failed to initialize multiplex options
I am wondering if this will not work with MythTV version 32.
Any ideas how to get mythhdhrrecorder working?
John
Re: How to build a MythTV v32 system for a Raspberry Pi 4
I'm also looking to upgrade my age old HDHomeRun dual tuner to a newer FLEX 4K tuner, so I am curious if anyone is able to make the mythhdhrrecorder work well?
- jfabernathy
- Senior
- Posts: 536
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: How to build a MythTV v33 system for a Raspberry Pi 4
I updated these instruction for v33. To get the best picture you still need to run from the console and not the Desktop Environment. I find that the Ubuntu 23.04 for RPI4 or the EndeavourOS for RPI4 are the best way to build a RPI4 with superior pictures over the Raspberry Pi OS 64 bit.
Re: How to build a MythTV v33 system for a Raspberry Pi 4
Hi!
Installed the myth-light deb:s as told in the above instructions and everything else works excep 1080 playback, which will just stay there and say "Wait..." .
The log contains:
And it just goes on after that
Also tried to build the deb:s myself and ended up with the same result.
This is on a 64-bit RaspiOS updated to newest version.
What should I look for debugging this?
Installed the myth-light deb:s as told in the above instructions and everything else works excep 1080 playback, which will just stay there and say "Wait..." .
The log contains:
Code: Select all
2023-05-31 20:27:58.422386 I [1949/1949] CoreContext mythvideoprofile.cpp:446 (LoadBestPreferences) - VideoProfile: LoadBestPreferences(1920x1080, 25.000,
h264)
2023-05-31 20:27:58.422413 I [1949/1949] CoreContext mythvideoprofile.cpp:471 (LoadBestPreferences) - VideoProfile: LoadBestPreferences result: priority:1
width: height: fps: codecs:
2023-05-31 20:27:58.422424 I [1949/1949] CoreContext mythvideoprofile.cpp:476 (LoadBestPreferences) - VideoProfile: decoder:v4l2-dec renderer:opengl-yv12 d
eint0:medium:shader deint1:medium:shader cpus:4 upscale:bilinear
2023-05-31 20:27:58.422495 I [1949/1949] CoreContext mythdrmprimecontext.cpp:66 (GetPrimeCodec) - DRMPRIMECtx: Found FFmpeg decoder 'h264_v4l2m2m'
2023-05-31 20:27:58.422529 I [1949/1949] CoreContext avformatdecoder.cpp:1428 (InitVideoCodec) - AFD: InitVideoCodec ID:h264 Type:Video Size:1920x1080
2023-05-31 20:27:58.422584 I [1949/1949] CoreContext mythplayer.cpp:697 (SetFrameInterval) - Player(0): SetFrameInterval Interval:40000 Speed:1 Scan:Progre
ssive Scan (Multiplier: 1)
2023-05-31 20:27:58.422604 I [1949/1949] CoreContext mythvideoscantracker.cpp:263 (DetectInterlace) - ScanTracker: DetectInterlace(Detect Scan, Interlaced
Scan, 25, 1080) ->Interlaced Scan
2023-05-31 20:27:58.422630 I [1949/1949] CoreContext avformatdecoder.cpp:2427 (ScanStreams) - AFD: Using v4l2-dec for video decoding
2023-05-31 20:27:58.422633 I [1949/1949] CoreContext mythv4l2m2mcontext.cpp:204 (SetDecoderOptions) - V4L2_M2M: Setting number of capture buffers to 6
2023-05-31 20:27:58.456024 I [1949/1949] CoreContext avformatdecoder.cpp:2508 (OpenAVCodec) - AFD: Opened codec 0x559185a880, id(h264) type(Video)
2023-05-31 20:27:58.472714 I [1949/1949] CoreContext audiooutputdigitalencoder.cpp:119 (Init) - DEnc: Using codec ac3 to encode audio
2023-05-31 20:27:58.473429 I [1949/1949] CoreContext audiooutputbase.cpp:782 (Reconfigure) - AOBase: Opening audio device 'iec958:CARD=sndrpihifiberry,DEV=
0' ch 2(2) sr 48000 sf signed 16 bit reenc 1
2023-05-31 20:27:58.484099 I [1949/1949] CoreContext decoderbase.cpp:1136 (AutoSelectTrack) - Dec: Selected track #1 (type 2) in the Unknown language(0)
2023-05-31 20:27:58.484122 I [1949/1949] CoreContext decoderbase.cpp:1136 (AutoSelectTrack) - Dec: Selected track #1 (type 3) in the Finnish language(67116
62)
2023-05-31 20:27:58.484129 I [1949/1949] CoreContext decoderbase.cpp:1136 (AutoSelectTrack) - Dec: Selected track #1 (type 7) in the Finnish language(67116
62)
2023-05-31 20:27:58.484141 I [1949/1949] CoreContext decoderbase.cpp:324 (SyncPositionMap) - Dec: Resyncing position map. posmapStarted = 0 livetv(0) watch
ingRec(0)
2023-05-31 20:27:58.515093 I [1949/1949] CoreContext decoderbase.cpp:193 (PosMapFromDb) - Dec: Position map filled from DB to: 79304
2023-05-31 20:27:58.517829 I [1949/1949] CoreContext decoderbase.cpp:208 (PosMapFromDb) - Dec: Duration map filled from DB to: 79304
2023-05-31 20:27:58.518335 I [1949/1949] CoreContext decoderbase.cpp:368 (SyncPositionMap) - Dec: SyncPositionMap prerecorded, from DB: 2681 entries
2023-05-31 20:27:58.518354 I [1949/1949] CoreContext decoderbase.cpp:405 (SyncPositionMap) - Dec: SyncPositionMap, new totframes: 79304, new length: 3172,
posMap size: 2681
2023-05-31 20:27:58.520573 I [1949/1949] CoreContext avformatdecoder.cpp:1198 (OpenFile) - AFD: Position map found
2023-05-31 20:27:58.520589 I [1949/1949] CoreContext avformatdecoder.cpp:1201 (OpenFile) - AFD: Successfully opened decoder for file: "myth://mythserv.newtech.fi/1021_20230531140700.ts". novideo(0)
2023-05-31 20:27:58.525038 I [1949/1949] CoreContext programinfo.cpp:2878 (QueryStartMark) - Using file start
2023-05-31 20:27:58.526207 I [1949/1949] CoreContext mythvideooutgpu.cpp:76 (Create) - VidOutGPU: Allowed renderers for H.264 v4l2-dec (Decoder: v4l2-dec): 'opengl,opengl-yv12'
2023-05-31 20:27:58.526224 I [1949/1949] CoreContext mythvideoprofile.cpp:1259 (GetFilteredRenderers) - VideoProfile: Safe renderers for 'v4l2-dec': null,opengl,opengl-yv12
2023-05-31 20:27:58.526231 I [1949/1949] CoreContext mythvideooutgpu.cpp:82 (Create) - VidOutGPU: Allowed renderers (filt: v4l2-dec): opengl,opengl-yv12
2023-05-31 20:27:58.530665 I [1949/1949] CoreContext mythvideoprofile.cpp:305 (MythVideoProfile) - VideoProfile: Accepting: cmp() w() h() framerate() codecs( ) dec(v4l2-dec) cpus(4) skiploop(enabled) rend(opengl-yv12) deint(medium:shader,medium:shader) upscale(bilinear)
2023-05-31 20:27:58.530699 I [1949/1949] CoreContext mythvideoprofile.cpp:446 (LoadBestPreferences) - VideoProfile: LoadBestPreferences(1920x1080, 25.000, h264_v4l2m2m)
2023-05-31 20:27:58.530716 I [1949/1949] CoreContext mythvideoprofile.cpp:471 (LoadBestPreferences) - VideoProfile: LoadBestPreferences result: priority:1 width: height: fps: codecs:
2023-05-31 20:27:58.530726 I [1949/1949] CoreContext mythvideoprofile.cpp:476 (LoadBestPreferences) - VideoProfile: decoder:v4l2-dec renderer:opengl-yv12 deint0:medium:shader deint1:medium:shader cpus:4 upscale:bilinear
2023-05-31 20:27:58.530745 I [1949/1949] CoreContext mythvideooutgpu.cpp:96 (Create) - VidOutGPU: Preferred renderer: opengl-yv12
2023-05-31 20:27:58.530748 I [1949/1949] CoreContext mythvideooutgpu.cpp:126 (Create) - VidOutGPU: Trying video renderer: 'opengl-yv12'
2023-05-31 20:27:58.553749 I [1949/1949] CoreContext mythhdrtracker.cpp:31 (Create) - HDRTracker: No HDR support detected for this display
2023-05-31 20:27:58.555370 I [1949/1949] CoreContext mythvideogpu.cpp:35 (MythVideoGPU) - VideoGPU: Discard stereoscopic fields: Yes
2023-05-31 20:27:58.556816 I [1949/1949] CoreContext mythopenglvideo.cpp:55 (MythOpenGLVideo) - GLVid: Chroma upsampling filter enabled
2023-05-31 20:27:58.556853 I [1949/1949] CoreContext mythpainteropengl.cpp:77 (ClearCache) - Clearing OpenGL painter cache.
2023-05-31 20:27:58.565819 I [1949/1949] CoreContext mythvideobounds.cpp:123 (PopulateGeometry) - VideoBounds: Window using screen 'HDMI-1' 1920x1080
2023-05-31 20:27:58.565834 I [1949/1949] CoreContext mythvideobounds.cpp:482 (PrintMoveResizeDebug) - VideoBounds: Window Rect: 1920x1080+0+0
2023-05-31 20:27:58.565847 I [1949/1949] CoreContext mythvideobounds.cpp:485 (PrintMoveResizeDebug) - VideoBounds: Display Rect: 1920x1080+0+0 Aspect: 1.77778
2023-05-31 20:27:58.565854 I [1949/1949] CoreContext mythvideobounds.cpp:489 (PrintMoveResizeDebug) - VideoBounds: Video Rect: 1920x1080+0+0 Aspect: 1.77778
2023-05-31 20:27:58.565886 I [1949/1949] CoreContext mythvideocolourspace.cpp:116 (SetSupportedAttributes) - ColourSpace: PictureAttributes: Brightness,Contrast,Colour,Hue,Range
2023-05-31 20:27:58.565924 I [1949/1949] CoreContext mythvideooutgpu.cpp:566 (InitDisplayMeasurements) - VidOutGPU: Display aspect ratio: 1.7782 (Detected)
2023-05-31 20:27:58.579400 I [1949/1949] CoreContext videobuffers.cpp:977 (CreateBuffers) - Created 8 YUV420P (1920x1080) video buffers
2023-05-31 20:27:58.585796 I [1949/2006] Decoder mythdecoderthread.cpp:23 (run) - DecThread: Decoder thread starting.
2023-05-31 20:27:58.595761 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window osd_message
2023-05-31 20:27:58.603702 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window osd_input
2023-05-31 20:27:58.636483 I [1949/1969] ImageLoad mythcommandlineparser.cpp:2922 (operator()) - Qt: libpng warning: iCCP: known incorrect sRGB profile2023-05-31 20:27:58.638264 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window program_info
2023-05-31 20:27:58.649037 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window browse_info
2023-05-31 20:27:58.661226 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window osd_status
2023-05-31 20:27:58.670450 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window osd_program_editor
2023-05-31 20:27:58.694701 I [1949/1949] CoreContext osd.cpp:132 (LoadWindows) - OSD: Loaded window osd_debug
2023-05-31 20:27:58.694732 I [1949/1949] CoreContext osd.cpp:71 (Init) - OSD: Loaded OSD: size 1920x1080 offset 0+0
2023-05-31 20:27:58.700496 I [1949/1949] CoreContext mythcaptionsoverlay.cpp:174 (InitSubtitles) - Captions: Created window aa_OSD_SUBTITLES
2023-05-31 20:27:58.705340 I [1949/1949] CoreContext mythplayercaptionsui.cpp:237 (EnableCaptions) - EnableCaptions(4) msg: Undertext 1: Finnish På
2023-05-31 20:27:58.705368 I [1949/1949] CoreContext mythplayer.cpp:1683 (ClearAfterSeek) - Player(0): ClearAfterSeek(0)
2023-05-31 20:27:58.708900 I [1949/1949] CoreContext mythplayer.cpp:697 (SetFrameInterval) - Player(0): SetFrameInterval Interval:40000 Speed:1 Scan:Interlaced Scan (Multiplier: 1)
2023-05-31 20:27:58.708935 I [1949/1949] CoreContext mythplayerui.cpp:513 (InitFrameInterval) - PlayerUI: Display Refresh Rate: 60.002 Video Frame Rate: 25.000
2023-05-31 20:27:58.708970 I [1949/1949] CoreContext mythvideoout.cpp:175 (SetDeinterlacing) - VideoOutput: SetDeinterlacing (Doublerate 1): Single Medium|CPU|GLSL Double Medium|CPU|GLSL
2023-05-31 20:27:58.709093 I [1949/1949] CoreContext tv_play.cpp:225 (StartPlaying) - TV::StartPlaying(): StartPlaying(): took 0 ms to start player.
2023-05-31 20:27:58.709129 I [1949/1949] CoreContext tv_play.cpp:4658 (StartPlayer) - TV::StartPlayer(): Created player.
2023-05-31 20:27:58.709382 I [1949/1949] CoreContext tv_play.cpp:2187 (HandleStateChange) - TV::HandleStateChange(): Changing from None to WatchingPreRecorded
2023-05-31 20:27:58.714548 I [1949/1949] CoreContext mythscreensaverx11.cpp:248 (Disable) - ScreenSaverX11: Inhibited X11 screensaver
2023-05-31 20:27:58.722448 I [1949/1949] CoreContext tv_play.cpp:2263 (HandleStateChange) - TV::HandleStateChange(): Main UI disabled.
2023-05-31 20:27:58.722652 I [1949/1949] CoreContext tv_play.cpp:356 (StartTV) - TV::StartTV(): Entering main playback loop.
2023-05-31 20:27:58.747888 I [1949/1949] CoreContext mythplayer.cpp:711 (SetBuffering) - Player(0): Waiting for video buffers...
2023-05-31 20:27:58.852911 N [1949/1949] CoreContext mythplayer.cpp:782 (PrebufferEnoughFrames) - Player(0): Waited 105ms for video buffers AAAAAAAA
2023-05-31 20:27:58.956900 N [1949/1949] CoreContext mythplayer.cpp:782 (PrebufferEnoughFrames) - Player(0): Waited 209ms for video buffers AAAAAAAA
2023-05-31 20:27:59.060559 N [1949/1949] CoreContext mythplayer.cpp:782 (PrebufferEnoughFrames) - Player(0): Waited 313ms for video buffers AAAAAAAA
Also tried to build the deb:s myself and ended up with the same result.
This is on a 64-bit RaspiOS updated to newest version.
What should I look for debugging this?
- jfabernathy
- Senior
- Posts: 536
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: How to build a MythTV v33 system for a Raspberry Pi 4
Well this is just a guess, but it may just be the video format?? All my test are recordings from a HDHR ATSC 1.0 networked tuner. So the video is MPEG2 1080i or 720p for HD. I have converted some of those to m4v using handbrake after editing out the commercials. It plays those fine, but the resolution is reduced, but still full screen 16:9.
I'd also make sure your video playback settings only use the OpenGL with 4 CPUs. The other don't work as well and the RPI4 has enough power to do the work all in software..
I'd also make sure your video playback settings only use the OpenGL with 4 CPUs. The other don't work as well and the RPI4 has enough power to do the work all in software..
Re: How to build a MythTV v33 system for a Raspberry Pi 4
Thanks. The video format is what comes out of YLE (The Finnish broadcasting company) on the HD channels.
But I did set the decoder to "General", which according to the help text is just using FFmpeg for the decoding, and it works surprisingly well. No problems with the different formats (SD/HD), pretty good picture, good framerate and a CPU load of about 50%. Not bad at all.I just always thought that this was the last resort.
And with 64-bit we do not really have any Hardware acceleration available.
I can use this, but it would still be interesting to know what is wrong with my OpenGL decoder. It worked with 0.31.
But I did set the decoder to "General", which according to the help text is just using FFmpeg for the decoding, and it works surprisingly well. No problems with the different formats (SD/HD), pretty good picture, good framerate and a CPU load of about 50%. Not bad at all.I just always thought that this was the last resort.
And with 64-bit we do not really have any Hardware acceleration available.
I can use this, but it would still be interesting to know what is wrong with my OpenGL decoder. It worked with 0.31.
Re: How to build a MythTV v33 system for a Raspberry Pi 4
I'm looking to add a slave backend to my existing system which is V32.
I'm assuming they all need to be on the same version so.
Is it easier to upgrade my existing system to V33 or can I just use these instructions and substitute 32 for 33?
I'm assuming they all need to be on the same version so.
Is it easier to upgrade my existing system to V33 or can I just use these instructions and substitute 32 for 33?
- jfabernathy
- Senior
- Posts: 536
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: How to build a MythTV v33 system for a Raspberry Pi 4
I don't know about v32. I know it works on v33 and v34.
Re: How to build a MythTV v33 system for a Raspberry Pi 4
I ask because this looks like the set of instructions I used to create my system. As I have asked questions before. And apart from the initial post all are titled MythTV v32jfabernathy wrote: ↑Fri Sep 15, 2023 11:14 amI don't know about v32. I know it works on v33 and v34.
Re: How to build a MythTV v33 system for a Raspberry Pi 4
Can I run different versions of the backend?
- jfabernathy
- Senior
- Posts: 536
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: How to build a MythTV v33 system for a Raspberry Pi 4
How easy is it to upgrade to a newer version without loosing everything?