[mythtv] Lossless MPEG2 editing!
Nigel Pearson
nigel at ind.tansu.com.au
Mon Jan 24 19:14:47 EST 2005
Cory, thanks for your clarifying thoughts here.
I didn't realise about PTSs.
> - GOP vs. non-GOP accurate edits. MPEG2 streams have I, P, and B
> frames. Only the I frames can "stand alone." The other two rely on
> previous/future combinations of other frames to generate a frame.
Yes, but...
a) If I want to chop say 5 seconds off the end of a sequence,
the edit needn't and on an I-frame. If playing forward, it will
be frame accurate. If playing backwards from the end, there is
garbage until the next I-frame, but from my point of view that
is an imperfect scenario anyway (e.g. if the audio is even able
to be played back, it sounds strange, so a video glitch is OK)
b) If I want to take a few seconds out of the middle of a sequence,
then there are 2 simple "hacky" scenarios:
1) Frame accurate start of cut, non-frame-accurate end of cut
(join sequence at next I frame like the crude original utility)
2) Frame accurate start and end of cut, by generating a new
I-frame at the end of the cut
Now, these are far from perfect. They both change the bitrate
of the original stream, and neither would seek backwards correctly,
but I think they are a workable alternative to transcoding.
Until someone codes up a self-contained correct/perfect solution!
--
Nigel Pearson, nigel at ind.tansu.com.au | "In this city I confess
Telstra BI&D, Sydney, Australia | god is mammon, more is less
Office: 8255 4222 Fax: 8255 3153 | off like lemmings at the gun
Mobile: 0408 664435 Home: 9792 6998 | I know better, still I run"
More information about the mythtv-dev
mailing list