When you want to cut out a piece from an existing AVI file and find that you can only successfully cut it at the keyframes, what do you do when the keyframes are not located where you want to perform the cut?
Is it possible to edit an AVI file without fully re-encoding the whole thing by inserting a keyframe where you want one to be so that you can then cut it at that point? If that is possible, what software do I need to do this?
Thanks
+ Reply to Thread
Results 1 to 4 of 4
-
-
Should be possible with AVIDemux's smart copy mode or VDub's new smart rendering mode.
With AVIDemux it only works for ASP MPEG-4 and MS MPEG-4. Not sure the restrictions of VDub, but chances are you have MPEG-4 video anyway. AVIDemux just encodes the section at at a fixed quant. Not sure about VDub, I guess you would need to setup the codec manually, in which case you could choose whatever. -
Hi-
Yes, it's possible. The principle isn't all that difficult to understand, but it will take some time to do it.
The software used is VDubMod. I always did it with AVIs I had encoded myself, so I knew the settings. If you didn't encode it yourself, it's possible that when you reencode the part within the keyframe, that you'll use settings that won't allow you to rejoin it later. So, try and learn what you can about the AVI before doing any reencoding (the codec, resolution, and other settings as much as possible).
Anyway, you'll need to have had some encoding experience, and I'm not going to go into every detail. If you don't understand what I'm about to say, then forget about it.
Extract the audio. Save the original AVI without audio. Break the now audioless AVI into 3 pieces, before the keyframe where you want to set a new keyframe, the part between 2 keyframes where you want to set a new keyframe, and the part after the middle part. So, you have parts 1, 2, and 3, and part 2 is the only one that's going to be reencoded. Open part 2 in VDubMod, choose the codec and other settings to match the original AVI as much as possible. Then space the keyframes by number of frames so that one falls where you want to make the cut later on. Bitrate isn't important, so I usually did a 1-pass for a fixed quant, roughly the same size as the original. When done, check to see if it can be split where you want. If it's good, join the 3 pieces back together, the original part 1, the reencoded part 2, and the original part 3. Add in the audio, and split at the newly made keyframe. If none of that made any sense, then don't even think about attempting this project. Good luck.
Edit: celtic_druid makes mention of newer methods with which I'm not familiar. Maybe one of those will be better choices. -
Thanks for that manono. Yeah that's the method I have been using up until now. It's too long and involved for my needs. I was hoping for something simpler and with far fewer steps.
Similar Threads
-
FFMpeg - warning: first frame is no keyframe - Encode to nearest keyframe?
By mh2011 in forum EditingReplies: 0Last Post: 3rd Nov 2011, 15:58 -
Convert Mov to Avi keep keep keyframe
By xicudiz in forum Video ConversionReplies: 5Last Post: 1st Apr 2011, 16:11 -
Extract from avi file and add to existing mkv file
By pathumx in forum MacReplies: 6Last Post: 8th Apr 2010, 18:57 -
Index and keyframe issues in AVI files
By cheerful in forum Newbie / General discussionsReplies: 15Last Post: 31st Dec 2007, 12:12 -
Cutting AVI files by frame or keyframe?
By squegole in forum EditingReplies: 6Last Post: 1st Jun 2007, 12:25