View Full Version : How to split delta-frames?!
SirTomahawk
15th January 2002, 20:55
Hello,
problem: I want to split a file into 2 perfect equal parts (don't ask why it must be perfect :) ).
The first part is no problem, because the delta-frames have their keyframe. But what about the second part? For example: I want to cut 50 frames before the next keyframe. HOW? I didn't find a method that not re-compress the videostream (IMPORTANT, BECAUSE WHEN DO SO, THE STREAMS WOULDN'T BE COMPATIBLE) and I don't want to loss a single percent of quality.
How to insert a keyframe manually? With nandub for example? DONT THINK ITS EASY! I tested a lot.
PLEASE HELP GUYS, T.
DivxBr
15th January 2002, 22:29
Well,... split a file between delta frames...
I think it could be done, but I didnŽt tested it yet.
First Pass - Get the last frame of the first file, and encode only this frame with divx codec (this will make a movie with only 1 keyframe) - you may use virtualdub to do this.
Second Pass - Append to this generated file the second half of the movie (so you have a key frame).
This method (if works) generates an extra frame in the second file, but if you want the RIGHT FRAME COUNT, you have to encode the first frame of the second file (get it in virtual/nan-dub) USING the original file.
Using this second way, youŽll have after appending, to delete the delta frame who generated this keyframe.
Like I said, I donŽt know if this works :D
TheWEF
15th January 2002, 23:30
you have to split at a keyframe and
it's impossible to insert a keyframe after encoding.
the only possibility is to reencode the whole keyframe-interval (with an extra keyframe) and than edit all the parts together manually...
if we are talking divx3 you can specify the exact keyframe position with an ecf-file.
wef.
DivxBr
16th January 2002, 00:18
TheWEF is right. I made some tests, and virtual/nan-dub did not allow to make delta/keyframe order modifications (it always look for keyframes before doing save operations). :(
I think the only way to do this kind of change (without reencoding the keyframe-keyframe interval) would be changing the AVI file at byte level :confused: replacing the delta frame by a keyframe and reindexing the file. I donŽt think thereŽs a tool that allow this kind of operation.
gldblade
16th January 2002, 04:38
>I think the only way to do this kind of change (without reencoding the keyframe-keyframe interval) would be changing the AVI file at byte level replacing the delta frame by a keyframe and reindexing the file. I donŽt think thereŽs a tool that allow this kind of operation.
I don't think that's exactly right. If you change a delta frame to a keyframe, you have to reencode the rest of the delta frames after it until you reach another keyframe.
ffroms
16th January 2002, 12:21
I don't get it ? :confused:
I tried to cut .avi in the middle ( not on keyframe and had no problems)
Using VDub 1.4.8 , delete first part of .avi and save it with direct stream . VDub automaticly makes keyframe from delta frame.
FFS
DivxBr
16th January 2002, 12:57
When you cut an AVI file in the middle using direct stream copy, Vdub looks for the first keyframe before the delta frame that is the point of cut and saves from that point.
Try it! If you have an avi file with 1 keyframe and 9 delta frames, cut the keyframe and the first 4 delta frames, and save it with direct stream copy. YouŽll get a file with 1 keyframe and 9 delta frames (the original file!). :D
About reencoding the full keyframe interval, no doubt its the best way to do the job. We have to remember that weŽre talking about a lossy compression, so even if we generate a keyframe identical to delta frame result, it will not be EXACTLY the same. While encoding the full keyframe interval every difference from the delta frames that follow will be compensated in the next delta frames (regenerated).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.