Okay, here we go:
http://www.pblue.org/myth/mpeg2stuff.tgz

Follow the directions in README to build it.

The code has basically the same features as the last version I posted,
but has been completely rewritten and more thoroughly tested.  I'm
still experiencing some weirdness with ATSC video, but it seems to be
only in the last few frames.

I still don't support discontinuous PTS, and haven't figured out an
elegant way to do so yet.
Replex doesn't support subtitles, so those won't work either.
I haven't tried it on multiple audio-streams yet, as I don't have any
mpegs that look like that, but it should be supported.

There is one useful command line switch: -no3to2
This tells the utility to remove all 3:2 pulldown (telecine) and
enforce a strict frame-rate.  It should generate a MPEG2 stream which
can be demuxed/remuxed cleanly is needed, though the picture won't be
quite as smooth (3:2 adds additional half frames (fields), allowing
for smoother playback).

There is also a -fixup switch which will enforce correct PTS (turning
on -no3to2 will automatically enable this)

If a PTS discrepency is detected, extra I-frames are added to buffer
the video stream to stay in sync with the audio stream.  It turns out
you can't use a P-frame here because there is no way to know which
macro-blocks are present, and mpeg2 doesn't allow you to predict a
macro-block which wasn't in the previous frame.

I plan to add support for opportunistically using 3:2 instead of
building frames when -fixup is set but -no3to2 isn't, but am not quite
there yet.

As I said in my previous mail, this utility uses:
avformat to get ES frames
libmpeg2 to process video frames (and decode the picture as needed)
replex to multiplex the final result.
It seems to work fine with myth's libmpeg2 and libav*, but I needed to
patch replex to fix several bugs, so that is included in the above
archive.

I could really use some feedback on how well it works, and, perhaps
example streams where it doesn't.

.Geoff
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to