[mythtv] NuppelVideo format, keyframes, and the cutlist
Geoffrey Hausheer
ou401cru02 at sneakemail.com
Wed Jun 18 14:51:14 EDT 2003
On Wed, 18 Jun 2003 12:46:18 -0400, "Craig Longman craigl-at-begeek.com
|mythtv/1.0-Allow|" <sa9nhe32c40t at sneakemail.com> said:
> Geoffrey Hausheer wrote:
> >If this isn't clear take the following example:
> >'#' denotes a key frame:
> >'b' denotes the begining of a cut section
> >'e' denotes the end of a cut section
> >(the example assumes key frames occur every 10 frames)
> >
> >original file:
> >1---------2---b-----3---------4-----e---5---------6
> >cut file (no key adjustment done)
> >1---------2---x--5---------6
> >(a new key frame is added at 'x' since it is a sudden scene change)
> >the frames now get renumbered as:
> >1---------2---3--4---------5
> >and the key-adjust map contains:
> >key : adjustment
> >3 : 6 (frame 3 is 10 - 6 frames from frame 2)
> >4 : 7 (frame 4 is 10 - 7 frames from frame 3)
> >
> one question here though, is numbering the new keyframe necessary? if
> the frame is too close to the previous frame, then couldn't it just not
> get included in the keyframe map? so in the case above, although '3'
> would be a real keyframe, if it wasn't inclukded in the map, and then #4
> would actually be #3. the inserted keyframe wouldn't be used to
> calculate any lengths, etc. and the actual number of extra/removed
> frames would be much lower than if a counted keyframe was inserted.
when I say 'key' I really mean an 'S' frame (i.e. the sync frame followed
by ann 'I' video frame). I could mark 3 as an 'I' frame, but syncing the
audio won't work properly (at least I don't think it will). Note that in
my example the # of frames between 2 and 4 is not 10, and so I need to
map frame 4 anyhow, so mapping frame 3 doesn't really cost us anything
besides a couple frame headers. I seem to be vascillating between my
current implementation and Isaac's idea of micro-cutlists. There are
tradeoffs for either method. I believe the ReencodeFile code needed is
pretty different depending on which method we choose, but it is hard to
evaluate them without having an example. Ahh well.
.Geoff
these are audio/video sync frames, follwoed by
>
> >Hmm.. though.. Had you thought of a new frametype that just says 'skip
> >> the
> >> next X frames'? That way you should be able to just cut on key-frame
> >> boundaries, and then just skip up to the real end of the cut
> >> automatically
> >> during playback.. I dunno, though
> >
> i think this is the best idea. it will mean a bit of extra stored data
> in the file, but it won't be visible, and no video reencoding will be
> required. i hadn't been able to figure out any other way of acheiving a
> perfect copy.
>
> forcing the cuts to keyframes is really not an option i think. as issac
> pointed out, if we're going to allow frame resolution in the cutlists,
> it should be used. aside from the fact that many of the commercials
> that one might cut out are much louder then the actual desired cutpoint
> (probably black and quiet), so you'd have it fade to black and go quiet,
> then a sudden noise and video, then fade to black and the program
> starting again. very distracting.
>
> cheers,
>
> CraigL->Thx();
>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev
>
--
Geoffrey Hausheer
XXXXXXXXXXXXXXXXXXXXX
More information about the mythtv-dev
mailing list