[mythtv] New MPEG2 commercial-cut code ready for testing
Cory Papenfuss
papenfuss at juneau.me.vt.edu
Sat Nov 19 10:54:31 EST 2005
> Here we go again:
> http://www.pblue.org/myth/mpeg2fix-0.13.tgz
>
> This fixes a deadlock in replex on streams with multiple audio
> streams. i'm not 100% sure of the fix, but I think it is ok. This
> should resolve the problem Adam was having on IRC.
>
> It also should remove all deadlock conditions. The code should
> instead abort with an assert if it detects a deadlock (which at least
> tells the user what is going on, and may help debug)
>
Well, that seems true enough:
$ mpeg2fix -d4 -i cory_grad_luke_conf_alton.nuv -o test2.mpg > log4.txt
Input #0, mpeg, from 'cory_grad_luke_conf_alton.nuv':
Duration: N/A, bitrate: N/A
Stream #0.0[0x1e0], 29.97 fps: Video: mpeg2video, yuv420p, 704x480, 6000
kb/s
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s
Warning, QMAT_SHIFT is larger then 21, overflows possible
Mux rate: 6.29 Mbit/s
Deadlock detected. One buffer is full when
the other is empty! Aborting
mpeg2fix: mpeg2fix.cpp:627: void MPEG2fixup::add_frame(MPEG2frame*):
Assertion `ok' failed.
Aborted
Didn't see much useful out of end of the log4:
PTS discrepency: 609664731 != 609662909 on B-Type (13)
PTS discrepency: 609667975 != 609665912 on B-Type (14)
PTS discrepency: 609671216 != 609668915 on P-Type (15)
VID: P #:15 nb: 2 pts: 609671216 dts: 609659906 pos: 879b840
Id:0: 1:52:54.124 V:83 MP2: 199 AC3:
VID: B #:13 nb: 2 pts: 609664731 dts: 609664731 pos: 876f3e8
Id:0: 1:52:54.052 V:82 MP2: 199 AC3:
VID: B #:14 nb: 2 pts: 609667975 dts: 609667975 pos: 88a27c8
Id:0: 1:52:54.088 V:81 MP2: 199 AC3:
> The PTS wrapping code was added, though it hasn't been tested too thoroughly.
>
This *should* be a very unusual situation though, right? Probably
most likely from constructed sources like dvb or hdtv. ivtv captures
probably just happily spool the PTS along.
> I added code which attempts to preserve the interlaced/progresive info
> when rebuilding frames. libavcodec doesn't give enough control to do
> this right, so I hope the hack I put in works. Probably needs some
> user testing.
>
Unfortunately, my same issue is there. Not sure how to debug this
any further... everything seems good. The decoded/encoded/redecoded debug
frames all look great.
> So that is it. I now have no features I plan to add before this
code > goes into myth. I will likely begin working on the interface to
> mythtranscode, and commit the changes when I'm done.
>
> New bugs may have cropped, up, there are probably still lots of issues
> (I haven't fully resolved either Bryan's or Cory's issues, and there
> isn't anything in here which would do so), but any issues that I can't
> debug before the final merge I'll just deal with as bugs through the
> tracker.
>
I'm sure there will be a whole slew of them once it gets a larger
test base. Seems like everyone who's added their own "stream of death"
(I like that, BTW) has uncovered yet another obscure bug.
> Things which could be tackled at some point (after the merge)
> add subtitle support
> add ability to rebuild a bad frame from the previous good frame
> (possibly interpolate if good data is available). This is the only
> way I can fix Tom's corrupted stream problem, and it would be really
> cool, but will require significant effort.
That'd be pretty spiffy.
> support ATSC output (as opposed to converting to PS)
Does it currently require PS or will any TS work too? I don't have TS
sources, but just curious.
> enforce DVD compliance (add borders or clip to resize to a given
> dimension without reencoding, and build new I-frames as needed to meet
> the GOP requirements).
>
I didn't even think that could be done. It thought a frame was a
frame and you were stuck with the size unless you transcoded.
Cheers,
-Cory
--
*************************************************************************
* Cory Papenfuss *
* Electrical Engineering candidate Ph.D. graduate student *
* Virginia Polytechnic Institute and State University *
*************************************************************************
More information about the mythtv-dev
mailing list