[mythtv-users] MythTV Raspberry Pi 2+ MythFrontend Setup Tutorial Updated

Curtis Gedak gedakc at gmail.com
Wed Mar 23 16:35:19 UTC 2016


On 16-03-23 09:12 AM, Mike Bibbings wrote:
> On 23/03/16 14:18, Josh Rosenberg wrote:
>> On Mon, Mar 14, 2016 at 6:02 AM,  <mythtv-users-request at mythtv.org>
>> wrote:
>>> Message: 1
>>> Date: Sun, 13 Mar 2016 11:07:07 -0600
>>> From: Curtis Gedak <gedakc at gmail.com>
>>> To: Discussion about MythTV <mythtv-users at mythtv.org>
>>> Subject: [mythtv-users] MythTV Raspberry Pi 2+ MythFrontend Setup
>>>          Tutorial        Updated
>>> Message-ID: <56E59E3B.7060303 at gmail.com>
>>> Content-Type: text/plain; charset=utf-8
>>>
>>> Thanks to the work of Peter Bennett and Lawrence Rust I have been able
>>> to combine their work to create a new build of MythTV for the Raspberry
>>> Pi 2 or better.
>>>
>>> The build is available at:
>>>
>>> https://www.dropbox.com/s/1iyhq6usqzalmg6/mythtv-v0.27.6-69-g41a2a8d-RPI2-jessie.tar.bz2?dl=0
>>>
>>>
>>> MD5SUM:
>>> 43dd1a86a25e0dec74655f60df245635
>>> mythtv-v0.27.6-69-g41a2a8d-RPI2-jessie.tar.bz2
>>>
>>> SHA1SUM:
>>> 7f6d6960417a57c622afb4ded1950b1647f7f973
>>> mythtv-v0.27.6-69-g41a2a8d-RPI2-jessie.tar.bz2
>>>
>>> The key differences from Peter's excellent debian packages are:
>>>
>>>    -  Includes MythTV suite of plugins
>>>    -  Enables EGLFS mode for rock-steady OSD with custom video
>>>       playback profile
>>>
>>> The key difference from Lawrence's pioneering tarballs are:
>>>
>>>    -  Includes Peter's RPi fixes and enhancements
>>>    -  Built upon MythTV 0.27.6 instead of 0.27.5
>>>
>>>
>>> Installation of the new tarball is described in the updated MythFrontend
>>> Setup Tutorial.  See:
>>>
>>> Setting Up an Inexpensive Raspberry Pi 2 as a Cheap Frontend to MythTV
>>> with MythFrontend
>>> http://gedakc.users.sourceforge.net/display-doc.php?name=pvr-rpi-mythtv-frontend
>>>
>>>
>>> Curtis
>> I was able to try this out on my new Raspberry Pi 3 last night, and
>> everything went well! The one problem, and it was a surprising one, is
>> that H.264-encoded .mp4 files (transcoded using a custom job) were
>> choppy to watch, while non-transcoded recordings (from Comcast in the
>> US, so I assume MPEG-2) seemed to be fine even though I had not yet
>> enabled the MPEG-2 codec.
>>
>> Any suggestions on improving H.264 performance? Should I try the XCB
>> build rather than EGLFS? (I've never heard either of these terms
>> before this week.)
>>
>> Thanks!
>>
>> Josh Rosenberg
>> _______________________________________________
>>
> I doubt XCB will make any difference over EGLFS, it does not for me
> (caveat: I am not using the same build as you).
> 
> H.264 the decoding should be done in the gpu (which has H.264 decode
> builtin - no licence needed). The only thing I can think of for H.264 is
> make sure  gpu_mem=256 is set in your /boot/config.txt file. The default
> is 64 (and is not sufficient).
> 
> As you mentioned a custom transcode, the output of mediainfo could be
> useful, as it will provide full details of the encoding used in the
> recording.
> 
> As a final point, if you are using the builtin WIFI of the RPi 3, there
> are some outstanding issues which can cause  poor playback (blockiness,
> stuttering, juddering). One of the issues is that, by default, power
> management is enabled, you could try turning it off temporarily (sudo
> iwconfig wlan0 power off). The other issue which is not yet fixed, is
> the Broadcom WIFI  brcmfmac driver see
> https://github.com/raspberrypi/linux/issues/1313
> 
> 
> Mike
> 

Hi Josh,

You might double-check to ensure that the RPi mythfrontend is
configured to use the openmax video decoder.  This will ensure that
hardware GPU decoding is enabled.


Check *Setup -> Video -> Playback*.

Ensure (*Add New* if needed):

  Current Video Playback Profile:  OpenMAX EGLFS

Under *Edit* ensure:

  Match criteria:     >=          W:  0     H:  0
  Match criteria:     <empty>     W:  0     H:  0
  Decoder:            openmax
  Max CPUs:           1
  Deblocking filter:  yes
  Video renderer:     openmax
  OSD renderer:       opengl2
  OSD fade:           no

Choose *Next* and ensure:

  Primary deinterlacer:   Advanced (HW)
  Fallback deinterlacer:  Fast (HW)

Choose *Finish*.

Choose *Next* 5 times then *Finish* to save an exit playback settings.


I tested H.264 video playback with my RPi2 using an H.264 clip I
downloaded from the web site *H.264 Demo Clips* [1].

[1] http://www.h264info.com/clips.html
Star Wars Episode Vii: The Force Awakens - H.264 HD 1080p Theatrical Trailer

After placing this in the videos folder of my MythTV Backend, I tried
playing it using the RPi2 mythfrontend.  The video played smoothly on
my Raspberry Pi 2 connected via Ethernet cable to my Mythbuntu 14.04
Backend.

I also tried disabling the MPEG-2 license, rebooted, and the video
played smoothly again.

For reference, the mediainfo [2] for the Star Wars trailer has been
appended at the end of this message.

Regards,
Curtis Gedak


[2] mediainfo for Star Wars trailer

$ mediainfo Star\ Wars\ Episode\ VII\ -\ The\ Force\ Awakens\ -\
Trailer\ \(H.264\).mp4
General
Complete name                            : Star Wars Episode VII - The
Force Awakens - Trailer (H.264).mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42
File size                                : 142 MiB
Duration                                 : 2mn 18s
Overall bit rate mode                    : Variable
Overall bit rate                         : 8 612 Kbps
Writing application                      : HandBrake 6548svn 2014112401

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 2mn 18s
Bit rate                                 : 8 456 Kbps
Width                                    : 1 918 pixels
Height                                   : 816 pixels
Display aspect ratio                     : 2.35:1
Frame rate mode                          : Variable
Frame rate                               : 23.976 fps
Minimum frame rate                       : 13.705 fps
Maximum frame rate                       : 24.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.225
Stream size                              : 140 MiB (98%)
Writing library                          : x264 core 142 r2479 dd79a61
Encoding settings                        : cabac=1 / ref=3 /
deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 /
psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 /
8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 /
threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 /
interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 /
b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 /
weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 /
rc_lookahead=40 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 /
qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 /
crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color primaries                          : BT.709-5, BT.1361, IEC
61966-2-4, SMPTE RP177
Transfer characteristics                 : BT.709-5, BT.1361
Matrix coefficients                      : BT.709-5, BT.1361, IEC
61966-2-4 709, SMPTE RP177

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 2mn 18s
Bit rate mode                            : Variable
Bit rate                                 : 153 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 2.53 MiB (2%)
Title                                    : Stereo
Language                                 : English



More information about the mythtv-users mailing list