[mythtv-users] Pi3 Playback problems with 1080i MPEG2?
Tom Harris
thom.j.harris at gmail.com
Mon Jun 6 00:26:55 UTC 2016
On Sun, Jun 5, 2016 at 2:17 PM, Peter Bennett <cats22 at comcast.net> wrote:
>
>
> ------------------------------
> *From: *"Tom Harris" <thom.j.harris at gmail.com>
> *To: *"Discussion about MythTV" <mythtv-users at mythtv.org>
> *Sent: *Saturday, June 4, 2016 2:05:02 PM
> *Subject: *Re: [mythtv-users] Pi3 Playback problems with 1080i MPEG2?
>
>
>
>
> On Wed, Jun 1, 2016 at 8:39 AM, Tom Harris <thom.j.harris at gmail.com>
> wrote:
>
>>
>>
>> On Mon, May 30, 2016 at 7:35 AM, Peter Bennett (cats22) <
>> cats22 at comcast.net> wrote:
>> >
>> > On 05/29/2016 09:58 PM, Tom Harris wrote:
>> > > I just set up a new Pi3 frontend on Raspbian Lenny + Peter’s .deb
>> > > package for 0.27.
>> > > After some tweaking of various settings in raspbian and mythfrontend,
>> > > it is working well.
>> > >
>> > > The one issue is that playback of 1080i content has problems. It
>> > > misses frames, pauses, and is generally not watchable. 720p video is
>> > > fine.
>> > >
>> > > I verified a few things in debugging it: content streams are fine,
>> > > bandwidth to frontend is fine, settings are correct (as far as I can
>> > > tell). I played back the same videos just fine via Kodi’s mythtv
>> > > add-on on my Pi2 as well as the Apple TV mythfrontend.
>> > >
>> > > ‘-v playback’ confirms openmax is enabled. But, there is an error,
>> > > which I’m not sure if it’s normal or a real problem: “E AFD: Unknown
>> > > decoding error"
>> > >
>> > > Has anyone else run into this? Any more settings I should check?
>> > >
>> > Check your playback profile. You should have "Openmax normal" selected.
>> > Also edit the profile and check that the decoder and renderer are both
>> > set to openmax. Set the number of processors to 4.
>>
>> Yes, all of those settings are correct. The other settings on those
>> pages, I just left default:
>>
>> ‘Deblocking filter’ is selected
>> ‘OSD fade’ is not selected
>> ‘OSD renderer’ is soft blend
>>
>> Primary deinterlacer: Advanced (HW)
>>
>> Fallback deinterlacer: One field
>>
>>
>>
>> >
>> > Do you have the latest version? There was a bug with dropping frames
>> > that has been fixed. "Unknown decoding error" is one message that
>> > occurred with that bug.
>>
>> Yes, it appears to be current (same version currently downloadable from
>> your site).
>>
>> >
>> >
>> > What type of content is this? Is it MPEG2 or H264? Is it recordings or
>> > videos? Is it only one particular recording?
>>
>> MPEG2. It’s Comcast cable TV recordings, from several stations - some
>> local NBC/CBS, some national TNT, etc.
>>
>> >
>> > Are you using an on screen display (e.g. Subtitles or Info)?
>>
>> No. No subtitles, etc.
>>
>> >
>> > If you still have problems let us know your version (mythfrontend
>> > --version).
>>
>> MythTV Version : v0.27.6-86-ge2ccfdf
>> MythTV Branch : raspi/0.27
>> Network Protocol : 77
>> Library API : 0.27.20151025-1
>> QT Version : 5.3.2
>> Options compiled in:
>> linux profile use_hidesyms using_asa using_oss using_pulse
>> using_pulseoutput using_backend using_bindings_perl using_bindings_python
>> using_bindings_php using_dvb using_firewire using_frontend using_hdhomerun
>> using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcrypto
>> using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg
>> using_qtwebkit using_qtscript using_qtdbus using_sdl using_taglib
>> using_v4l2 using_x11 using_xrandr using_xv using_profiletype
>> using_bindings_perl using_bindings_python using_bindings_php
>> using_mythtranscode using_opengles using_openmax using_ffmpeg_threads
>> using_mheg using_libass using_libxml2
>>
>> Here is some more complete output from ‘-v playback’.. anything else I
>> can enable for more debugging detail?
>>
>> 2016-05-31 19:35:47.336368 I
>> FileRingBuf(myth://mythbackend/1720_20160531230000.mpg):
>> OpenFile(myth://mythbackend/1720_20160531230000.mpg, 2000 ms)
>> 2016-05-31 19:35:49.477791 I MythCoreContext: Connecting to backend
>> server: 10.1.1.11:6543 (try 1 of 1)
>> 2016-05-31 19:35:49.502527 I TV: StartPlayer(0, WatchingRecording, main)
>> -- begin
>> 2016-05-31 19:35:49.502727 I TV: Elapsed time since TV constructor was
>> called: 2709 ms
>> 2016-05-31 19:35:49.931088 N AudioPlayer: Enabling Audio
>> 2016-05-31 19:35:50.109956 I Player(0): Stretch Factor 1, allow passthru
>> 2016-05-31 19:35:50.128786 I AFD: Buffer size: 32768 streamed 0 seekable
>> 1
>> 2016-05-31 19:35:50.629389 I AFD: Stream #0, has id 0xe23 codec id
>> MPEG2VIDEO, type Video, bitrate 0 at 0x1f67420
>> 2016-05-31 19:35:50.629440 I AFD: Stream #1, has id 0xe24 codec id AC3,
>> type Audio, bitrate 384000 at 0x1f64570
>> 2016-05-31 19:35:50.629462 I AFD: codec AC3 has 6 channels
>> 2016-05-31 19:35:50.629477 I AFD: Looking for decoder for AC3
>> 2016-05-31 19:35:50.630466 I AFD: Opened codec 0x1f64770, id(AC3)
>> type(Audio)
>> 2016-05-31 19:35:50.636921 I AFD: Stream #2, has id 0xe25 codec id AC3,
>> type Audio, bitrate 192000 at 0x1f64d70
>> 2016-05-31 19:35:50.636954 I AFD: codec AC3 has 2 channels
>> 2016-05-31 19:35:50.636971 I AFD: Looking for decoder for AC3
>> 2016-05-31 19:35:50.637973 I AFD: Opened codec 0x2450270, id(AC3)
>> type(Audio)
>> 2016-05-31 19:35:50.638221 I AFD: Trying to select best video track
>> 2016-05-31 19:35:50.638325 I AFD: Selected track #0 (id 0xe23 codec id
>> MPEG2VIDEO, type Video, bitrate 500000 at 0x1f67420)
>> 2016-05-31 19:35:50.675151 I VDP: Accepting: cmp(> 0 0) dec(openmax)
>> cpus(4) skiploop(enabled) rend(openmax) osd(softblend) osdfade(disabled)
>> deint(openmaxadvanced,onefield) filt()
>> 2016-05-31 19:35:50.675233 I VDP: LoadBestPreferences(2048x2048, 0)
>> 2016-05-31 19:35:50.675309 I VDP: LoadBestPreferences(2048x2048, 60)
>> 2016-05-31 19:35:50.675362 I VDP: LoadBestPreferences(1920x1080, 60)
>> 2016-05-31 19:35:50.704657 I DOMX:2 Codec MPEG2VIDEO =>
>> OMX_VIDEO_CodingMPEG2
>> 2016-05-31 19:35:50.707993 I AFD: Using 1 CPUs for decoding
>> 2016-05-31 19:35:50.708047 I AFD: InitVideoCodec() 0x1f64190
>> id(MPEG2VIDEO) type (Video).
>> 2016-05-31 19:35:50.708163 I AFD: Selected FPS is 29.97 (avg 29.97 codec
>> 29.97 container 90000 estimated 29.97)
>> 2016-05-31 19:35:50.708237 I Player(0): SetFrameInterval ps:1 scan:3
>> 2016-05-31 19:35:50.708309 I Player(0): detectInterlace(Detect Scan,
>> Interlaced Scan, 29.97, 1080) ->Interlaced Scan
>> 2016-05-31 19:35:50.708492 I AFD: Using openmax for video decoding
>> 2016-05-31 19:35:50.708560 I AFD: Opened codec 0x1f64190, id(MPEG2VIDEO)
>> type(Video)
>> 2016-05-31 19:35:50.752930 I AOBase: Opening audio device 'OpenMAX:hdmi'
>> ch 2(6) sr 48000 sf signed 16 bit reenc 0
>> 2016-05-31 19:35:50.773447 I Dec: Selected track #1 (type 2) in the
>> Unknown language(0)
>> 2016-05-31 19:35:50.773522 I Dec: Resyncing position map. posmapStarted
>> = 0 livetv(0) watchingRec(1)
>> 2016-05-31 19:35:51.427047 I Dec: Position map filled from DB to: 388010
>> 2016-05-31 19:35:51.519841 I Dec: Duration map filled from DB to: 388010
>> 2016-05-31 19:35:51.529885 I Dec: SyncPositionMap watchingrecording,
>> from DB: 17072 entries
>> 2016-05-31 19:35:51.529991 I Player(0): Filling position map from 388011
>> to end
>> 2016-05-31 19:35:51.562345 I Dec: Position map filled from Encoder to:
>> 388070
>> 2016-05-31 19:35:51.562516 I Dec: Duration map filled from Encoder to:
>> 388070
>> 2016-05-31 19:35:51.562550 I Dec: SyncPositionMap watchingrecording
>> total: 17076 entries
>> 2016-05-31 19:35:51.562600 I Dec: SyncPositionMap, new totframes:
>> 388070, new length: 12948, posMap size: 17076
>> 2016-05-31 19:35:51.571581 I AFD: Partial position map found
>> 2016-05-31 19:35:51.571619 I AFD: Successfully opened decoder for file:
>> "myth://mythbackend/1720_20160531230000.mpg". novideo(0)
>> 2016-05-31 19:35:51.638587 I VideoOutput: Allowed renderers:
>> xv-blit,xshm,xlib,openmax
>> 2016-05-31 19:35:51.638644 I VideoOutput: Allowed renderers (filt:
>> openmax): openmax
>> 2016-05-31 19:35:51.681016 I VDP: Accepting: cmp(> 0 0) dec(openmax)
>> cpus(4) skiploop(enabled) rend(openmax) osd(softblend) osdfade(disabled)
>> deint(openmaxadvanced,onefield) filt()
>> 2016-05-31 19:35:51.681067 I VDP: LoadBestPreferences(2048x2048, 0)
>> 2016-05-31 19:35:51.681135 I VDP: LoadBestPreferences(2048x2048, 60)
>> 2016-05-31 19:35:51.681188 I VDP: LoadBestPreferences(1920x1080, 60)
>> 2016-05-31 19:35:51.681254 I VideoOutput: Preferred renderer: openmax
>> 2016-05-31 19:35:51.681285 I VideoOutput: Trying video renderer:
>> 'openmax'
>> 2016-05-31 19:35:51.976045 I VDP: Accepting: cmp(> 0 0) dec(openmax)
>> cpus(4) skiploop(enabled) rend(openmax) osd(softblend) osdfade(disabled)
>> deint(openmaxadvanced,onefield) filt()
>> 2016-05-31 19:35:51.976099 I VDP: LoadBestPreferences(2048x2048, 0)
>> 2016-05-31 19:35:51.976171 I VDP: LoadBestPreferences(2048x2048, 60)
>> 2016-05-31 19:35:52.027648 I VideoOutWindow::SetPIPState. pip_state: 0]
>> 2016-05-31 19:35:52.027702 I VDP: LoadBestPreferences(2048x2048, 29.97)
>> 2016-05-31 19:35:52.027815 I VOMX:3 Init vbuf=1920x1088 vdisp=1920x1080
>> aspect=1.77778 win=0,0,1920x1080 codec=MPEG2
>> 2016-05-31 19:35:52.027855 I Snapping width to avoid scaling: width:
>> 1920, left: 0
>> 2016-05-31 19:35:52.027888 I Display Rect left: 0, top: 135, width:
>> 1920, height: 810, aspect: 1.33333
>> 2016-05-31 19:35:52.027920 I Video Rect left: 0, top: 0, width: 1920,
>> height: 1080, aspect: 1.77778
>> 2016-05-31 19:35:52.027949 I VDP: LoadBestPreferences(1920x1088, 29.97)
>> 2016-05-31 19:35:52.027993 I Snapping width to avoid scaling: width:
>> 1920, left: 0
>> 2016-05-31 19:35:52.028025 I Display Rect left: 0, top: 135, width:
>> 1920, height: 810, aspect: 1.33333
>> 2016-05-31 19:35:52.028061 I Video Rect left: 0, top: 0, width: 1920,
>> height: 1080, aspect: 1.77778
>> 2016-05-31 19:35:52.028091 I VDP: SetVideoRenderer(openmax)
>> 2016-05-31 19:35:52.028115 I VDP: SetVideoRender(openmax) ==
>> GetVideoRenderer()
>> 2016-05-31 19:35:52.029805 E X11 ModeLine query returned zeroes
>> 2016-05-31 19:35:52.030347 I VideoOutput: Pixel dimensions: Screen
>> 1920x1080, window 1920x1080
>> 2016-05-31 19:35:52.030404 I VideoOutput: Actual display dimensions:
>> 508x286 mm Aspect: 1.77622
>> 2016-05-31 19:35:52.030538 I VideoOutput: Estimated window dimensions:
>> 508x286 mm Aspect: 1.77622
>> 2016-05-31 19:35:52.136229 I Snapping height to avoid scaling: height:
>> 1080, top: 0
>> 2016-05-31 19:35:52.136281 I Snapping width to avoid scaling: width:
>> 1920, left: 0
>> 2016-05-31 19:35:52.136347 I Display Rect left: 0, top: 0, width: 1920,
>> height: 1080, aspect: 1.77778
>> 2016-05-31 19:35:52.136414 I Video Rect left: 0, top: 0, width: 1920,
>> height: 1080, aspect: 1.77778
>> 2016-05-31 19:35:52.136531 I VOMX:3 SetVideoRect display=0,0,1920x1080
>> (1.77622) video=0,0,1920x1080 (1.77778)
>> 2016-05-31 19:35:52.205637 I Over/underscan. V: 0, H: 0
>> 2016-05-31 19:35:52.205687 I Snapping height to avoid scaling: height:
>> 1080, top: 0
>> 2016-05-31 19:35:52.205706 I Snapping width to avoid scaling: width:
>> 1920, left: 0
>> 2016-05-31 19:35:52.205747 I Display Rect left: 0, top: 0, width: 1920,
>> height: 1080, aspect: 1.77778
>> 2016-05-31 19:35:52.205780 I Video Rect left: 0, top: 0, width: 1920,
>> height: 1080, aspect: 1.77778
>> 2016-05-31 19:35:52.205960 I Player(0): LoadFilters(''..) -> 0x0
>> 2016-05-31 19:35:52.242865 I Player(0): Decoder thread starting.
>> 2016-05-31 19:35:52.259468 I OSD: Loaded window osd_message
>> 2016-05-31 19:35:52.272461 I OSD: Loaded window osd_input
>> 2016-05-31 19:35:52.304081 E MythFontProperties: Failed to load
>> 'Liberation Sans', got 'DejaVu Sans' instead
>> Location: /usr/share/mythtv/themes/Terra/osd.xml
>> @ 119
>> Name: 'timefont' Type: 'fontdef'
>> 2016-05-31 19:35:52.308133 I OSD: Loaded window program_info
>> 2016-05-31 19:35:52.325793 E MythFontProperties: Failed to load
>> 'Liberation Sans', got 'DejaVu Sans' instead
>> Location: /usr/share/mythtv/themes/Terra/osd.xml
>> @ 247
>> Name: 'timefont' Type: 'fontdef'
>> 2016-05-31 19:35:52.329043 I OSD: Loaded window browse_info
>> 2016-05-31 19:35:52.340911 I OSD: Loaded window osd_status
>> 2016-05-31 19:35:52.356016 I OSD: Loaded window osd_program_editor
>> 2016-05-31 19:35:52.394023 I OSD: Loaded window osd_debug
>> 2016-05-31 19:35:52.394120 I OSD: Loaded OSD: size 1920x1080 offset 0+0
>> 2016-05-31 19:35:52.394604 I OSD: Created window aa_OSD_SUBTITLES
>> 2016-05-31 19:35:52.394787 I Player(0): ClearAfterSeek(0)
>> 2016-05-31 19:35:52.396431 E X11 ModeLine query returned zeroes
>> 2016-05-31 19:35:52.396708 I VDP: GetFilteredDeint() : openmax ->
>> 'openmaxadvanced'
>> 2016-05-31 19:35:52.396782 I VOMX:3 SetupDeinterlace switching on
>> 'openmaxadvanced'
>> 2016-05-31 19:35:52.397203 I VSYNC: DRMVideoSync: Could not open device
>> /dev/dri/card0, No such file or directory
>> 2016-05-31 19:35:52.397324 E VSYNC: RTCVideoSync: Could not open
>> /dev/rtc:
>> eno: No such file or directory (2)
>> 2016-05-31 19:35:52.398550 E X11 ModeLine query returned zeroes
>> 2016-05-31 19:35:52.398790 I Player(0): Video timing method: USleep with
>> busy wait
>> 2016-05-31 19:35:52.398867 I Player(0): Display Refresh Rate: 59.941
>> Video Frame Rate: 29.970
>> 2016-05-31 19:35:52.398921 I Player(0): SetFrameInterval ps:1 scan:1
>> 2016-05-31 19:35:52.402965 I playCtx: StartPlaying(): took 0 ms to start
>> player.
>> 2016-05-31 19:35:52.403052 I TV: Created player.
>> 2016-05-31 19:35:52.403146 I TV: StartPlayer(0, WatchingRecording, main)
>> -- end ok
>> 2016-05-31 19:35:52.403280 I TV: Changing from None to WatchingRecording
>> 2016-05-31 19:35:52.442642 I TV: DrawUnusedRects() -- begin
>> 2016-05-31 19:35:52.442686 I TV: DrawUnusedRects() -- end
>> 2016-05-31 19:35:52.442857 I TV: Main UI disabled.
>> 2016-05-31 19:35:52.442885 I TV: HandleStateChange(0) -- end
>> 2016-05-31 19:35:52.443040 I TV: tv->Playback() -- end
>> 2016-05-31 19:35:52.443099 I TV: Entering main playback loop.
>> 2016-05-31 19:35:52.481832 I DOMX:2 SettingsChanged - begin
>> 2016-05-31 19:35:52.483807 I OMX:2 Port 131: output, bufs=2(1)
>> bufsize=3133440 at 16 discontiguous, disabled, unpopulated
>> 2016-05-31 19:35:52.483963 I OMX:2 Port 131: video, w=1920 h=1080
>> stride=1920 sliceH=1088 bps=0 fps=29.97 compress=OMX_VIDEO_CodingUnused
>> enc=OMX_COLOR_FormatYUV420PackedPlanar
>> 2016-05-31 19:35:52.484300 I DOMX:2
>> OMX_InterlaceFieldsInterleavedUpperFirst
>> 2016-05-31 19:35:52.484466 I DOMX:2 Pixel aspect x/y = 1/1
>> 2016-05-31 19:35:52.499934 I ScreenSaverX11Private: DPMS Deactivated 1
>> 2016-05-31 19:35:52.501348 I Player(0): Waiting for video buffers...
>> 2016-05-31 19:35:52.504373 I DOMX:2 SettingsChanged - end
>> 2016-05-31 19:35:52.504407 E AFD: Unknown decoding error
>> 2016-05-31 19:35:52.569794 I VDP: GetFilteredDeint() : openmax ->
>> 'openmaxadvanced'
>> 2016-05-31 19:35:52.569854 I Player(0): Enabled deinterlacing
>> 2016-05-31 19:35:53.019851 I VideoOutput: Created YV12 OSD.
>> 2016-05-31 19:35:53.029279 I TV: DrawUnusedRects() -- begin
>> 2016-05-31 19:35:53.029310 I TV: DrawUnusedRects() -- end
>> 2016-05-31 19:35:53.033187 I TV: DrawUnusedRects() -- begin
>> 2016-05-31 19:35:53.033217 I TV: DrawUnusedRects() -- end
>> 2016-05-31 19:35:53.131675 I TV: DrawUnusedRects() -- begin
>> 2016-05-31 19:35:53.131711 I TV: DrawUnusedRects() -- end
>> 2016-05-31 19:35:53.171827 I Player(0): Video is 6.27117 frames behind
>> audio (too slow), dropping frame to catch up.
>> 2016-05-31 19:35:53.189281 I Player(0): Video is 10.7273 frames behind
>> audio (too slow), dropping frame to catch up.
>>
>> (snip.. it keeps generating messages about skipping frames, etc.)
>>
>
> I scanned through all the list postings about Pi setup to verify my
> settings. The only one that differed in some posts was the number of CPU
> cores used for playback. I changed mine from 4 to 1, but that made no
> difference.
>
> I also installed Kodi on raspbian, as a sanity check on the
> hardware/software/network, and playback is perfect in Kodi with the
> mythtv.pvr add-on playback the same recordings in Kodi that didn’t play
> well in mythtv. I’m not sure where to go from here.. is there any way
> to get more debugging information out of OpenMax to narrow down the issue?
>
>
>
> Other things to check
> - GPU memory, must be at least 128MB, but try 256MB to see if that helps
>
I’ve got it set to 256MB. At that level, there is still free memory
available and zero swap usage.
> - Perhaps some other process is using CPU. Try running top from ssh while
> playing back and see if anything other than mythfrontend is using lots of
> CPU.
>
Mythfrontend is the only significant CPU user, and there is plenty of idle
CPU.
> - Is the mpeg2 license correctly installed?
>
Yes, confirmed via the command “vcgencmd codec_enabled MPG2” and also via
playback in Kodi.
Thanks for the help. At this point, I think I’ll continue with Kodi for
MythTV playback, and maybe when the next mythtv update is available I’ll
give that another try.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160605/f03cbab7/attachment-0001.html>
More information about the mythtv-users
mailing list