[mythtv-users] v30 and DVB-T2 part-time channels - recordings without audio/video hanging mythfrontend

Mark Cooke mpc_mythtv at jts.homeip.net
Mon Jul 29 19:24:20 UTC 2019


On 29/07/2019 12:56, John Pilkington wrote:
> re-sending to list
> 
> On 28/07/2019 23:29, Mark Cooke wrote:
>> Hi All,
>>
>> I finally managed to get my system updated from v28 (Ubuntu 16.04) to 
>> v30 (Ubuntu 18.04).
>>
>> I am using a self-compiled front end on OSX 10.13 (quite an involved 
>> process but thanks to everyone posting top tips to the forum and list).
>>
>> * Started with 
>> https://github.com/warpme/mythv-osx-build-script/blob/master/osx-packager-qtsdk.pl 
>>
>> * Updated to freetype 2.10.0
>> * Updated to QT 5.11.3
>> * Used MacPorts for python and freetype issue
>> * Used the SDK workaround for Quicktime framework missing from 
>> https://github.com/warpme/mythv-osx-build-script
>>
>>
>>
>> It was mostly plain sailing with using MythTV 30 itself, so thank you 
>> devs for the hard work!
>>
>>
>> I have come across one issue that appears to be due to the UK habit of 
>> having channels that broadcast 24x7 but only contain audio/video 
>> streams for some of the time.
>>
>>
>> The example I have most recently was from today.
>>
>> BBC FOUR HD starts broadcasting at 7pm, and I had a recording setup 
>> for the broadcast starting at 7pm.  With a system-wide 'start 
>> recording early' configured, the TS file started to be saved from 6.50pm.
>>
>>
>> Trying to play this recording jams up the frontend with a black screen 
>> saying 'Please Wait'.  I can't escape, jump forward or backward or 
>> bring up the menu when this happens.
>>
>> Eventually (5+ minutes later) it drops back to the Watch Recording 
>> screen with an error 'Video frame buffering failed too many times'.
>>
>>
>> Outside of MythFrontend, the TS file will play (eventually) in VLC, 
>> with the first video frame being ~ 650 MB into the file.
>>
>>
>> So Myth appears to hiccup with TS files without audio/video, and I 
>> don't know how to nicely fix this, other than avoid it happening by 
>> looking carefully at recording rules.
>>
>>
>> Anyone want this particular TS file to look further?  I have an 80MB 
>> chunk that covers the period just before the start of broadcast, and 
>> the 700MB snip that Myth was struggling with.
>>
>>
>> mediainfo on the long lead in doesn't detect the video/audio stream 
>> but there is a menu stream present, so the recording isn't completely 
>> absent:
>>
>> General
>> ID                                       : 45056 (0xB000)
>> Complete name                            : snip.ts
>> Format                                   : MPEG-TS
>> File size                                : 700 MiB
>>
>> Menu
>> ID                                       : 1004 (0x3EC)
>> Menu ID                                  : 1 (0x1)
>> List                                     : 206 (0xCE) ()
>>
>>
>> On the short extract, it is short enough that mediainfo reaches the 
>> start of the audio/video:
>>
>> General
>> ID                                       : 45056 (0xB000)
>> Complete name                            : snip2.ts
>> Format                                   : MPEG-TS
>> File size                                : 80.0 MiB
>> Duration                                 : 1 s 260 ms
>> Overall bit rate mode                    : Variable
>> Overall bit rate                         : 2 731 kb/s
>>
>> Video
>> ID                                       : 201 (0xC9)
>> Menu ID                                  : 1 (0x1)
>> Format                                   : AVC
>> Format/Info                              : Advanced Video Codec
>> Format profile                           : High at L4
>> Format settings                          : CABAC / 4 Ref Frames
>> Format settings, CABAC                   : Yes
>> Format settings, ReFrames                : 4 frames
>> Codec ID                                 : 27
>> Duration                                 : 680 ms
>> Width                                    : 1 920 pixels
>> Height                                   : 1 080 pixels
>> Display aspect ratio                     : 16:9
>> Frame rate                               : 25.000 FPS
>> Standard                                 : Component
>> Color space                              : YUV
>> Chroma subsampling                       : 4:2:0
>> Bit depth                                : 8 bits
>> Scan type                                : Progressive
>> Color range                              : Limited
>> Color primaries                          : BT.709
>> Transfer characteristics                 : BT.709
>> Matrix coefficients                      : BT.709
>>
>> Audio
>> ID                                       : 202 (0xCA)
>> Menu ID                                  : 1 (0x1)
>> Format                                   : AAC
>> Format/Info                              : Advanced Audio Codec
>> Format profile                           : LC
>> Muxing mode                              : LATM
>> Codec ID                                 : 17-2
>> Duration                                 : 1 s 260 ms
>> Bit rate mode                            : Variable
>> Channel(s)                               : 2 channels
>> Channel positions                        : Front: L R
>> Sampling rate                            : 48.0 kHz
>> Frame rate                               : 46.875 FPS (1024 SPF)
>> Compression mode                         : Lossy
>> Language                                 : English
>>
>> Text
>> ID                                       : 203 (0xCB)
>> Menu ID                                  : 1 (0x1)
>> Format                                   : DVB Subtitle
>> Codec ID                                 : 6
>> Language                                 : English
>>
>> Menu
>> ID                                       : 1004 (0x3EC)
>> Menu ID                                  : 1 (0x1)
>> Duration                                 : 1 s 260 ms
>> List                                     : 206 (0xCE) () / 201 (0xC9) 
>> (AVC) / 202 (0xCA) (AAC, English) / 203 (0xCB) (DVB Subtitle, English)
>> Language                                 :  /  / English / English
>>
>>
>> Cheers,
>>
>> Mark
> 
> It appears that my local DVB-T2 muxes are currently off-air, perhaps for 
> G5 preparations; but if I have interactive TV enabled
> 
> Frontend Setup > Video > Playback OSD > Enable interactive TV
> 
> and try
> 
> Menu > Watch this channel
> 
> for BBC FOUR I get, after a few seconds, a screen saying it's off-air 
> until 7.00 pm and suggesting use of iPlayer.
> 
> Without the interactive setting it shows a black screen, until Escaped.
> 
> One-off start-time adjustments can be done via the Edit menu of the 
> 'Upcoming recordings' screen.

Hi John,

Thanks for this.  Enable Interactive TV was already set.  I tried 
turning it off, and it didn't make any difference.


As a cross-check I've tried the recording using Ubuntu's frontend over 
SSH and had the same behaviour as for the OSX frontend.

Here is a sample of the log during the attempted playback:

2019-07-29 19:57:32.462917 I  TV::TV(): Creating TV object
2019-07-29 19:57:32.493357 N  Suspending idle timer
2019-07-29 19:57:32.512862 I  TV::Init(): Created TvPlayWindow.
2019-07-29 19:57:32.551847 I  TV::HandleStateChange(): Attempting to 
change from None to WatchingPreRecorded
2019-07-29 19:57:34.357724 E  ALSA: snd_pcm_info_get_card: Operation not 
permitted
2019-07-29 19:57:34.385882 N  AudioPlayer: Enabling Audio
2019-07-29 19:57:34.760608 I  AFD: codec AAC/LATM has 0 channels
2019-07-29 19:57:34.765109 I  AFD: Opened codec 0x55ab75cf7380, 
id(AAC/LATM) type(Audio)
2019-07-29 19:57:34.765523 I  AFD: codec AAC/LATM has 0 channels
2019-07-29 19:57:34.766012 I  AFD: Opened codec 0x55ab75d40640, 
id(AAC/LATM) type(Audio)
2019-07-29 19:57:34.766151 I  AFD: Opened codec 0x55ab75e10740, 
id(DVB_SUBTITLE) type(Subtitle)
2019-07-29 19:57:34.772595 I  AFD: Using ffmpeg for video decoding
2019-07-29 19:57:34.772748 I  AFD: Opened codec 0x55ab75e13680, id(H264) 
type(Video)
2019-07-29 19:57:34.772753 W  Enabling buffering optimisations for low 
bitrate stream.
2019-07-29 19:57:34.778210 N  AudioPlayer: Enabling Audio
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 19:57:34.951325 E  X11 ModeLine query failed
2019-07-29 19:57:34.956955 E  VideoOutputXv: Could not find suitable 
XVideo surface.
2019-07-29 19:57:34.956975 E  VideoOutputXv: Falling back to X11 video 
output over a network socket.
			      *** May be very slow ***
2019-07-29 19:57:34.982753 I  OSD: Base theme size: 800x600
2019-07-29 19:57:34.982766 I  OSD: Scaling factors: 0.8x0.8
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
greedyhdeint: size changed from 0 x 0 -> 640 x 480
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
[freemheg] WARN Launch not found //a
[freemheg] WARN Launch not found //startup
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 19:57:35.036642 I  OSD: Base theme size: 800x600
2019-07-29 19:57:35.036649 I  OSD: Scaling factors: 0.8x0.8
2019-07-29 19:57:35.044334 E  X11 ModeLine query failed
2019-07-29 19:57:35.050625 E  X11 ModeLine query failed
2019-07-29 19:57:35.054650 I  Player(0): Video timing method: USleep 
with busy wait
2019-07-29 19:57:35.055198 I  TV::StartPlayer(): Created player.
2019-07-29 19:57:35.055230 I  TV::HandleStateChange(): Changing from 
None to WatchingPreRecorded
2019-07-29 19:57:35.059211 I  TV::HandleStateChange(): Main UI disabled.
2019-07-29 19:57:35.059236 I  TV::StartTV(): Entering main playback loop.
2019-07-29 19:57:35.069083 E  X11 ModeLine query failed
2019-07-29 19:57:35.163926 N  Player(0): Waited 103ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:35.267895 N  Player(0): Waited 207ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:35.371964 N  Player(0): Waited 311ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:35.476020 N  Player(0): Waited 415ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:35.579882 N  Player(0): Waited 519ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:35.683956 N  Player(0): Waited 623ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:37.011085 I  OSD: Base theme size: 800x600
2019-07-29 19:57:37.011110 I  OSD: Scaling factors: 0.8x0.8
2019-07-29 19:57:37.026589 N  Player(0): Waited 1966ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:37.130042 N  Player(0): Waited 2069ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:37.234250 N  Player(0): Waited 2174ms for video buffers 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
2019-07-29 19:57:37.338374 N  Player(0): To see more buffering messages 
use -v playback
2019-07-29 19:58:05.061477 E  Player(0): Waited too long for decoder to 
fill video buffers. Exiting..
2019-07-29 19:58:05.149189 I  TV::HandleStateChange(): Attempting to 
change from WatchingPreRecorded to None
2019-07-29 19:58:05.250235 W  Player(0): Waited 100ms for decoder to pause
2019-07-29 19:58:05.350445 W  Player(0): Waited 100ms for decoder to pause

These go on for about 15 seconds until:

2019-07-29 19:58:15.163760 W  Player(0): Waited 100ms for decoder to pause
2019-07-29 19:58:20.268477 E  Player(0): Failed to stop decoder loop.
2019-07-29 19:58:20.278620 I  Player(0): Waited 10ms for decoder lock
2019-07-29 19:58:20.288726 I  Player(0): Waited 10ms for decoder lock

which then repeat for 3 minutes before the frontend becomes responsive 
again:

2019-07-29 20:01:09.612981 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.623120 I  Player(0): Waited 10ms for decoder lock
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 20:01:09.633265 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.643392 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.653536 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.663099 I  AFD: codec AAC/LATM has 0 channels
2019-07-29 20:01:09.663676 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.663867 I  AFD: Opened codec 0x7f362401f980, 
id(AAC/LATM) type(Audio)
2019-07-29 20:01:09.663992 I  AFD: codec AAC/LATM has 0 channels
2019-07-29 20:01:09.664725 I  AFD: Opened codec 0x7f36240470c0, 
id(AAC/LATM) type(Audio)
2019-07-29 20:01:09.664865 I  AFD: Opened codec 0x7f3624062540, 
id(DVB_SUBTITLE) type(Subtitle)
2019-07-29 20:01:09.673761 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.683861 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.688066 E  X11 ModeLine query failed
2019-07-29 20:01:09.689018 I  AFD: Using ffmpeg for video decoding
2019-07-29 20:01:09.689211 I  AFD: Opened codec 0x7f362401e6c0, id(H264) 
type(Video)
2019-07-29 20:01:09.689221 W  Enabling buffering optimisations for low 
bitrate stream.
2019-07-29 20:01:09.694001 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.704134 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.714251 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.724356 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.734430 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.744496 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.754619 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.764719 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.774804 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.784889 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.794982 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.805111 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.815233 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.825337 I  Player(0): Waited 10ms for decoder lock
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 20:01:09.835455 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.845560 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.855647 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.865742 I  Player(0): Waited 10ms for decoder lock
2019-07-29 20:01:09.873282 E  X11 ModeLine query failed
2019-07-29 20:01:09.882671 I  TV::HandleStateChange(): Changing from 
WatchingPreRecorded to None
2019-07-29 20:01:09.882686 I  TV::StartTV(): Exiting main playback loop.
2019-07-29 20:01:09.938637 N  Resuming idle timer
2019-07-29 20:01:09.942458 I  TV::TV(): Creating TV object
2019-07-29 20:01:09.955845 N  Suspending idle timer
2019-07-29 20:01:09.963415 I  TV::Init(): Created TvPlayWindow.
2019-07-29 20:01:09.989389 I  TV::HandleStateChange(): Attempting to 
change from None to WatchingPreRecorded
2019-07-29 20:01:10.013607 E  ALSA: snd_pcm_info_get_card: Operation not 
permitted
2019-07-29 20:01:10.033935 N  AudioPlayer: Enabling Audio
2019-07-29 20:01:10.382039 I  AFD: codec AAC/LATM has 0 channels
2019-07-29 20:01:10.382556 I  AFD: Opened codec 0x55ab758a8940, 
id(AAC/LATM) type(Audio)
2019-07-29 20:01:10.382651 I  AFD: codec AAC/LATM has 0 channels
2019-07-29 20:01:10.383136 I  AFD: Opened codec 0x55ab758a9c00, 
id(AAC/LATM) type(Audio)
2019-07-29 20:01:10.383232 I  AFD: Opened codec 0x55ab77037b80, 
id(DVB_SUBTITLE) type(Subtitle)
2019-07-29 20:01:10.396312 I  AFD: Using ffmpeg for video decoding
2019-07-29 20:01:10.396428 I  AFD: Opened codec 0x55ab77038000, id(H264) 
type(Video)
2019-07-29 20:01:10.396439 W  Enabling buffering optimisations for low 
bitrate stream.
2019-07-29 20:01:10.396538 N  AudioPlayer: Enabling Audio
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
greedyhdeint: size changed from 0 x 0 -> 640 x 480
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
[freemheg] WARN Launch not found //a
[freemheg] WARN Launch not found //startup
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 20:01:10.560597 E  X11 ModeLine query failed
2019-07-29 20:01:10.564753 E  VideoOutputXv: Could not find suitable 
XVideo surface.
2019-07-29 20:01:10.564761 E  VideoOutputXv: Falling back to X11 video 
output over a network socket.
			      *** May be very slow ***
2019-07-29 20:01:10.572537 I  OSD: Base theme size: 800x600
2019-07-29 20:01:10.572550 I  OSD: Scaling factors: 0.8x0.8
2019-07-29 20:01:10.590618 I  OSD: Base theme size: 800x600
2019-07-29 20:01:10.590624 I  OSD: Scaling factors: 0.8x0.8
2019-07-29 20:01:10.596033 E  X11 ModeLine query failed
2019-07-29 20:01:10.601888 E  X11 ModeLine query failed
2019-07-29 20:01:10.602468 I  Player(0): Video timing method: USleep 
with busy wait
2019-07-29 20:01:10.603503 I  TV::StartPlayer(): Created player.
2019-07-29 20:01:10.603532 I  TV::HandleStateChange(): Changing from 
None to WatchingPreRecorded
2019-07-29 20:01:10.608257 E  X11 ModeLine query failed
Handling Segmentation fault
Segmentation fault (core dumped)

The player was showing black screen with 'Please Wait...' during the 
buffering and decoder lock time.  The segv appears to be as was trying 
M, Escape, P etc whilst it was in the loop.  Just leaving it alone 
returns to the recordings screen with 'Video frame buffering failed too 
many times.':

2019-07-29 20:21:36.837432 I  Player(1): Waited 10ms for decoder lock
2019-07-29 20:21:36.847511 I  Player(1): Waited 10ms for decoder lock
2019-07-29 20:21:36.854956 E  X11 ModeLine query failed
2019-07-29 20:21:36.863731 I  TV::HandleStateChange(): Changing from 
WatchingPreRecorded to None
2019-07-29 20:21:36.863760 I  TV::StartTV(): Exiting main playback loop.
2019-07-29 20:21:36.909821 N  Resuming idle timer



I will note that the Ubuntu frontend running over SSH can playback other 
recordings.  Example section of the log during playback of a known good 
recording:

2019-07-29 20:05:59.306444 I  TV::TV(): Creating TV object
2019-07-29 20:05:59.368828 N  Suspending idle timer
2019-07-29 20:05:59.388757 I  TV::Init(): Created TvPlayWindow.
2019-07-29 20:05:59.420069 I  TV::HandleStateChange(): Attempting to 
change from None to WatchingPreRecorded
2019-07-29 20:05:59.553062 E  ALSA: snd_pcm_info_get_card: Operation not 
permitted
2019-07-29 20:05:59.579526 N  AudioPlayer: Enabling Audio
2019-07-29 20:05:59.611582 I  AFD: codec MP2 has 2 channels
2019-07-29 20:05:59.611641 I  AFD: Opened codec 0x55dffa527d40, id(MP2) 
type(Audio)
2019-07-29 20:05:59.630339 I  AFD: Using ffmpeg for video decoding
2019-07-29 20:05:59.630360 I  AFD: Opened codec 0x55dffa5281c0, 
id(MPEG2VIDEO) type(Video)
2019-07-29 20:05:59.630434 I  AOBase: Opening audio device 'default' ch 
2(2) sr 48000 sf signed 16 bit reenc 0
2019-07-29 20:05:59.665677 E  ALSA: no playback control PCM found on 
mixer device default
2019-07-29 20:05:59.665681 E  ALSA: Unable to open audio mixer. Volume 
control disabled
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 20:05:59.796613 E  X11 ModeLine query failed
2019-07-29 20:05:59.801652 E  VideoOutputXv: Could not find suitable 
XVideo surface.
2019-07-29 20:05:59.801662 E  VideoOutputXv: Falling back to X11 video 
output over a network socket.
			      *** May be very slow ***
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
greedyhdeint: size changed from 0 x 0 -> 720 x 576
Xlib:  extension "XFree86-VidModeExtension" missing on display 
"hdcap5:10.0".
2019-07-29 20:05:59.832217 I  OSD: Base theme size: 800x600
2019-07-29 20:05:59.832227 I  OSD: Scaling factors: 0.9x0.96
2019-07-29 20:05:59.885250 I  OSD: Base theme size: 800x600
2019-07-29 20:05:59.885257 I  OSD: Scaling factors: 0.9x0.96
2019-07-29 20:05:59.894794 E  X11 ModeLine query failed
2019-07-29 20:05:59.900253 E  X11 ModeLine query failed
2019-07-29 20:05:59.910082 I  Player(0): Video timing method: USleep 
with busy wait
2019-07-29 20:05:59.911137 I  TV::StartPlayer(): Created player.
2019-07-29 20:05:59.911173 I  TV::HandleStateChange(): Changing from 
None to WatchingPreRecorded
[freemheg] WARN Launch not found //a
[freemheg] WARN Launch not found //startup
2019-07-29 20:05:59.917303 I  TV::HandleStateChange(): Main UI disabled.
2019-07-29 20:05:59.917345 I  TV::StartTV(): Entering main playback loop.
2019-07-29 20:05:59.927207 I  OSD: Base theme size: 800x600
2019-07-29 20:05:59.927222 I  OSD: Scaling factors: 0.9x0.96
2019-07-29 20:06:00.000434 I  VideoOutput: Created YV12 OSD.
2019-07-29 20:06:00.411239 I  MythCodecContext: Disabled hardware 
decoder based deinterlacer.
2019-07-29 20:06:04.014628 E  VideoOutputXv:
***
* Your system is not capable of displaying the
* full framerate at 800x600 resolution.  Frames
* will be skipped in order to keep the audio and
* video in sync.


So looks to be a fault with the main player loop waiting for the decoder 
to stop when there isn't any video in the stream, judging by the logs. 
Hopefully a pointer for someone familiar with the code to go 'Ah ha' 
before I try to start hacking!

Cheers,

Mark


More information about the mythtv-users mailing list