Opened 19 years ago

Closed 19 years ago

#1799 closed defect (fixed)

AVFormatDecoder setting video parameters incorrect in file with two video streams.

Reported by: anonymous Owned by: cpinkham
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords: avformatdecoder
Cc: jaymz@…, danielk@… Ticket locked: no

Description

ABC Australia is transmitting their closed captions-ish stream in 640x480, while the video is in 720x576 - this is a valid combination in mythtv itself, and indeed it records/plays just fine. However, when the stream is transcoded to mpeg4 the encoder reads the 720x576 pixels correctly into memory, however accesses them as if the stream was 640x480 - resulting in completly corrupted output (you know, that whole "lines wrapping around" effect that you get in such situations). I have uploaded a small (10meg) example from a promo at http://dspaudio.com/~jaymz/small-test.mpg, which will give the "right kind of incorrect output", as it were, and yet play perfectly fine in mythfrontend itself (actually taken from the start of one of my recordings). All using current SVN as at 2006-05-11. I attached the libav debug output as a file.

Attachments (2)

mythbug.txt (1.6 KB) - added by jaymz@… 19 years ago.
mythtranscode -v libav debug output
mpegts.patch.txt (1.4 KB) - added by dm@… 19 years ago.

Download all attachments as: .zip

Change History (7)

Changed 19 years ago by jaymz@…

Attachment: mythbug.txt added

mythtranscode -v libav debug output

comment:1 Changed 19 years ago by anonymous

Cc: jaymz@… added
Owner: changed from Isaac Richards to cpinkham

comment:2 Changed 19 years ago by cpinkham

Keywords: avformatdecoder added; mythtranscode removed
Milestone: 0.20
Summary: mythtranscode corrupt output on certain dvb streams that mythfronted playsAVFormatDecoder setting video parameters incorrect in file with two video streams.
Version: head

This is an avformatdecoder issue actually. The 640x480 is coming from some fallback code in the decoder as indicated here in a "-v all" log:

2006-05-12 02:52:09.184 AFD: Stream #4, has id 0x6080 codec id MPEG1VIDEO, type Video, bitrate 0 at 0x0x828cee0 2006-05-12 02:52:09.189 AFD: InitVideoCodec? failed to align dimensions, resetting decoder.

Right after that line is printed, AVFormatDecoder sets the info to 640x480 @ 29.97fps and 4/3 aspect ratio then calls NuppelVideoPlayer::SetVideoParams?().

You're lucky normal playback works.

From the looks of it, we should be ignoring this stream, but I'm not sure at this time of the morning. Just wanted to update the ticket to reflect the real issue.

comment:3 Changed 19 years ago by dm@…

It's possible that this and #2007 are related to some code that was added to handle private streams in UK interactive TV. The attached patch changes the handling of private streams so that they are considered as video or audio only if they have a component tag descriptor. This works for UK private streams and the change may mean that other private streams aren't accidentally treated in this way. It would be useful to know if this solves the problem.

David

Changed 19 years ago by dm@…

Attachment: mpegts.patch.txt added

comment:4 Changed 19 years ago by danielk

Cc: danielk@… added

Just adding myself to the CC so I can read about test reports from people trying David's patch.

comment:5 Changed 19 years ago by danielk

Resolution: fixed
Status: newclosed

(In [10458]) Fixes #1799. Applies patch on ticket. This looks at the component tag to set the stream type of private streams, and disables the playback of generic private streams.

Note: See TracTickets for help on using tickets.