Opened 15 years ago

Closed 14 years ago

#6703 closed defect (fixed)

frontend and preview dies on local broadcasts

Reported by: hakon@… Owned by: Janne Grunau
Priority: minor Milestone: 0.24
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords: dvb-t aac h264
Cc: Ticket locked: no

Description

I'm running trunk with Paul Kendalls patch from Message-Id: <200907081851.01172.paul@…> on mythtv-dev@…. I'm running Myth on the digital terrestrial transmissions in norway.

Mythfrontend dies on certain local broadcasts, and no preview is generated for them. Attached (hopefully) is a complete log from starting the frontend, navigating to the offending recording and pressing enter. The frontend is running like so: "/usr/bin/mythfrontend -v important,audio,libav,extra".

I'm running Myth on the digital transmissions in norway. Mplayer identifies an OK recording like this:

This command:


$ mplayer -frames 0 -identify /pub2/mythtv/3009_20090709145130.mpg 2>&1 > nrk1.log


Gives this in nrk1.log:

Unsupported LATM configuration: 12 programs/ 10 subframes, 5 layers, allstreams: 1
FAAD: compressed input bitrate missing, assuming 128kbit/s!
MPlayer SVN-r29330-4.3.2 (C) 2000-2009 MPlayer Team
Spiller /pub2/mythtv/3009_20090709145130.mpg
Detekterte TS filformat!
ID_VIDEO_ID=512
ID_VIDEO_ID=512
ID_AUDIO_ID=640
ID_VIDEO_ID=512
ID_VIDEO_ID=512
ID_VIDEO_ID=512
[... snip ... ]
ID_AID_640_LANG=nor
ID_VIDEO_ID=512
[... snip ... ]
ID_VIDEO_ID=512
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
ID_VIDEO_ID=512
[... snip ... ]
ID_VIDEO_ID=512
VIDEO H264(pid=512) AUDIO AAC(pid=640) NO SUBS (yet)!  PROGRAM N. 1
ID_VIDEO_ID=512
ID_AUDIO_ID=640
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
FPS seems to be: 25.000000
ID_FILENAME=/pub2/mythtv/3009_20090709145130.mpg
ID_DEMUXER=mpegts
ID_VIDEO_FORMAT=0x10000005
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=0
ID_VIDEO_HEIGHT=0
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=0.00
ID_SEEKABLE=1
ID_CHAPTERS=0



A recording from the same channel that will not play in myth looks like this identified by mplayer:

MPlayer SVN-r29330-4.3.2 (C) 2000-2009 MPlayer Team
Spiller /pub2/mythtv/3009_20090708184200.mpg
Detekterte TS filformat!
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
ID_VIDEO_ID=515
[...snip...]
ID_VIDEO_ID=515
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
ID_VIDEO_ID=515
ID_AUDIO_ID=652
ID_AID_652_LANG=nor
ID_VIDEO_ID=515
[...snip...]
ID_VIDEO_ID=515
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
ID_VIDEO_ID=515
ID_VIDEO_ID=515
ID_AUDIO_ID=652
ID_VIDEO_ID=515
VIDEO H264(pid=515) AUDIO AAC(pid=652) NO SUBS (yet)!  PROGRAM N. 1
ID_VIDEO_ID=515
ID_AUDIO_ID=652
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
PROGRAM_ID=1 (0x01), PMT_PID: 259(0x103)
FPS seems to be: 25.000000
ID_FILENAME=/pub2/mythtv/3009_20090708184200.mpg
ID_DEMUXER=mpegts
ID_VIDEO_FORMAT=0x10000005
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=0
ID_VIDEO_HEIGHT=0
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=0.00
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)

Attachments (5)

xsession-errors (192.9 KB) - added by hakon@… 15 years ago.
log from running frontend
gdb.txt (17.1 KB) - added by hakon@… 15 years ago.
here is output from gdb. Seems it can't find symbol information, I'll see about fixing that. GDB otupt as per http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
gdb-with-symbols.txt (24.6 KB) - added by hakon@… 15 years ago.
Here is from a run with at least some symbols available.
gdb-video-frame-buffering-failing.txt (24.7 KB) - added by hakon@… 15 years ago.
I'm hitting C approximately 10 seconds after "please wait" is replaced by an entirely blue screen, appx. 5 secs before "Video frame buffering failed too many times"
myth.log-tail (248.1 KB) - added by hakon@… 15 years ago.
tail-end of myth.log running with -l myth.log -v audio,libav (from the same run as gdb-video-frame-buffering-failing.txt )

Download all attachments as: .zip

Change History (21)

Changed 15 years ago by hakon@…

Attachment: xsession-errors added

log from running frontend

comment:1 Changed 15 years ago by anonymous

Make sure you use the patch on this email. http://www.gossamer-threads.com/lists/mythtv/dev/388109#388109

Also, when sending bug reports make sure to include a stack trace. http://www.mythtv.org/wiki/Debugging has information on debugging and how to traces for bug reports.

comment:2 Changed 15 years ago by hakon@…

Just for the record: The patch i'm using is the one referred to in http://www.gossamer-threads.com/lists/mythtv/dev/388109#388109, as recommended by anonymous here. I will try to get a stacktrace.

Also for the record: This problem did exist in the custom versions by Paul for 0.21 and 0.22 before the latest integration of ffmpeg into myth. The reason I'm reporting this now is I feel the support for dvb-t in Norway is now more or less "official"

:-)

Changed 15 years ago by hakon@…

Attachment: gdb.txt added

here is output from gdb. Seems it can't find symbol information, I'll see about fixing that. GDB otupt as per http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2

Changed 15 years ago by hakon@…

Attachment: gdb-with-symbols.txt added

Here is from a run with at least some symbols available.

comment:3 Changed 15 years ago by danielk

Component: MythTV - DVB/ATSCMythTV - Video Playback
Owner: changed from danielk to Isaac Richards
Status: newassigned

Does this happen with current trunk without patches? There was a recent ffmpeg sync.

comment:4 Changed 15 years ago by danielk

Status: assignedinfoneeded

comment:5 Changed 15 years ago by hakon@…

I'm afraid I have to use the mentioned patch to get sound (AAC). As mentioned in the mail announcing the ffmpeg sync by Janne Grunau, "Importent parts still missing are AAC in LATM support and Spectral extension EAC-3." The patch I'm running is presumably more or less what will be done to get the AAC support going.If it would be REALLY essential I could compile a version without the patch, but hopefully the fact that the only channel that shows two sets of PIDS is the one with this problem will give a clue to fixing this. Maybe I did not make that sufficiently clear in my original report but to expand a bit, I ran this on one of my storage directories:

#!/bin/bash
cd /pub2/mythtv/
for f in *.mpg ; do
    CHANID=$(echo -n $f |sed -e 's/_.*/ /' )
    case $CHANID in
        #audio only
        3109*|2105*) ;;
        *)
        echo -n "$CHANID"
        mplayer -tsprobe 10000000 -frames 0 -identify  $f 2>/dev/null| grep -m 1 -e '^VIDEO' || echo $f error;;
    esac
done

The output contains 125 lines. Running sort -u on the output gives:

2102 VIDEO H264(pid=525) AUDIO AAC(pid=692) NO SUBS (yet)!  PROGRAM N. 1
2103 VIDEO H264(pid=521) AUDIO AAC(pid=676) NO SUBS (yet)!  PROGRAM N. 1
3009 VIDEO H264(pid=512) AUDIO AAC(pid=640) NO SUBS (yet)!  PROGRAM N. 1
3009 VIDEO H264(pid=515) AUDIO AAC(pid=652) NO SUBS (yet)!  PROGRAM N. 1

In other words: I have three dvb-t channels, and the only channel with varying pids is the offending channel. I am fairly sure that the only recordings that will not play are the ones with "divergent" PIDs. I have been trying to find out how the dvb-t channels are stored in the mysql tables, but I am unable to find my way around. Should I do a rescan of all the channels ? It has always been a bit of a hassle scanning the dvb-t channels because I've had to hand-edit the transport-id in mythconverg after scanning (off-by-one error somewhere). Trac seems to say there was a fix for that recently so I should try a rescan :-/

I should also have mentioned in the original report that I also have to configure with --enable-libfaad. Like Paul Kendall said on mythtv-dev: On Thursday 09 July 2009 02:06:43 am Håkon Alstadheim wrote:

Paul Kendall wrote:

[...about a patch for LATM ...]

I'm eager to try this on dvb-t in Norway, but I'm wondering what the correct flags to configure would be to use the new code. Do I still use --enable-libfaad ?

Yes, you still need --enable-libfaad as the ffmpeg AAC does not do HE-AAC yet.

Once I have myth compiled the official way, I'm sure I'll have some interesting bug-reports coming :-).

Cheers, Paul

comment:6 Changed 15 years ago by hakon@…

Video frame buffering failed too many times

Latest news is that the frontend does not always die. Sometimes I get a blank screen for some seconds and a dialog that says "video frame buffering failed too many times". I suspect that the frontend was not actually dead when i stopped the two bactraces attached to this ticket. I will try to get a bactrace from an actual crash to-morrow.

Changed 15 years ago by hakon@…

I'm hitting C approximately 10 seconds after "please wait" is replaced by an entirely blue screen, appx. 5 secs before "Video frame buffering failed too many times"

Changed 15 years ago by hakon@…

Attachment: myth.log-tail added

tail-end of myth.log running with -l myth.log -v audio,libav (from the same run as gdb-video-frame-buffering-failing.txt )

comment:7 Changed 15 years ago by hakon@…

Further data-point: A recording of the local broadcast that starts after switchover from the national broadcast will be playable in myth during recording, but it crashes when the local transmission is complete, and the file thus contains some minutes at the end with different pids. I may be jumping to conclusions here but it seems to me that files containing two sets of pids (one set after the other) is what is causing the frontend crash/"frame buffering failed".

comment:8 Changed 15 years ago by hakon@…

A log from a failing run of mythfrontend is too big to attach, but here is a link to a log http://alstadheim.priv.no/myth.log. while trying to watch an unwatchable recording. The recording was watchable while it was being recorded, but not afterwards

comment:9 Changed 15 years ago by robertm

Please try to reproduce w/ current trunk. The LATM audio patch has been updated and applied to trunk. Please test w/ no other patches applied.

If you need to attach logs and go above the size limit, you can gzip them.

comment:10 Changed 15 years ago by Håkon Alstadheim <hakon@…>

Running SVN revision 21538 now, configured with --enable-libfaad, no patches. Still crashes on stream with multiple sets of pids. I'll see if I can manage to get a new stacktrace on Sunday evening. If there is somewhere I could upload a sample, just give the word.

comment:11 Changed 15 years ago by robertm

Status: infoneededassigned

rapidshare or the like is fine for the sample. make the sample as large as it needs to be to trigger the error (if triggered immediately, upload a ~50MB sample)

comment:12 Changed 15 years ago by Håkon Alstadheim <hakon@…>

I moved a problem-recording to /apub2/media/mythtv/3009_20090827184000.mpg.orig and did:

 $ dd if=/apub2/media/mythtv/3009_20090827184000.mpg.orig of=/apub2/media/mythtv/3009_20090827184000.mpg bs=1024 count=100000 skip=10000

The above gets me a file that is playable in mythtv (switchover probably happens in the 10000kb i skipped, or in the part after what I copied). Then I did:

$ dd if=/apub2/media/mythtv/3009_20090827184000.mpg.orig of=/apub2/media/mythtv/3009_20090827184000.mpg bs=1024 count=50000

The above gets me a file that makes mythtv frontend crash. Longer samples created without "skip" also makes the frontend crash, so I've put the 50M sample up at http://alstadheim.priv.no/crashing.mpg

comment:13 Changed 15 years ago by Janne Grunau

Owner: changed from Isaac Richards to Janne Grunau
Status: assignedaccepted

thanks for the sample, I'll look at it

comment:14 Changed 14 years ago by Janne Grunau

Milestone: 0.220.24

seems to be an unsupported LATM configuration

comment:15 Changed 14 years ago by stuartm

Version: unknownTrunk Head

comment:16 Changed 14 years ago by stuartm

Resolution: fixed
Status: acceptedclosed

Attached sample doesn't cause a crash for me. The audio doesn't work, but that's another issue entirely.

Note: See TracTickets for help on using tickets.