I am having difficulty getting Virtualdub to cut at precisely the point I want, or even at a keyframe. This is for all videos in general that I have tried to cut, and am wondering if I am doing anything wrong.
Say for example, I am cutting a video of a baby smiling. I get near the point where the baby smiles using the slider and then push the keyframe next button until it shows his mouth closed, just before he is about to smile. I click mark in. Then I keep on clicking keyframe next until the baby stops smiling, and click mark out. With this selection, the resulting video will sometimes not cut at the points I want and instead I get a good second of non-smiling baby in the beginning, the baby already smiling in the beginning, the video ending before the baby stops smiling, the video ending long after the baby stopped smiling which can sometimes be a complete scene change, which makes the video clip look really shoddy. The baby smiling example doesn't give a lot of leeway, but I get the same problems trying to get video clips that allow for more error, like cutting end credits. I've tried manually just going to the specific frame and cutting out of keyframe, or cutting only at the places the virtualdub slider lands un when being dragged as opposed to using the buttons or the arrow keys. All the results are very unpredictable from video to video.
I'm using virtualdub mainly so I can do direct stream copy and preserve quality. Also, virtualdub has this annoying problem where when you use the keyframe buttons, if you happen to click too much and bypass the intended keyframe and you try to go back several keyframes, the picture displayed in the preview area is completely wrong, displaying keyframes from the opposite direction you are clicking even though the frame number on the bottom is consistent with what you are clicking. I usually just drag the slider away and slowly move towards the cut point again, hoping to not screw up again.
+ Reply to Thread
Results 1 to 17 of 17
-
-
It has been a while but is your raw video in raw .avi format or in some compressed format
-
Convert your source to packed bitstream with Mpeg4Modifier.
In the past I've always cut out a portion of the video with Vdub, and save it as an uncompressed avi. Then cut out the section I wanted and saved it in the desired format. This approach seems simpler, i would try it now but my PC is currently converting episodes of Heoes from HD DVD to MKV. So i don't have the CPU cycles to spare at the moment. -
Originally Posted by dragonkeeper
Take a frame sequence like IBBP. This is the order they are to be viewed, first the I frame, then the first B frame, then the second B frame, and finally the P frame. I is a keyframe, the two B frames are backwards predicted from the P frame, and the P frame is forward predicted from the I frame. To decode this sequence properly you first have to decompress the I frame, then you decompress the P frame, and finally you can decompress the two B frames. This confuses VFW decoders because they can't decompress the P frame before decompressing the B frames.
Packed Bitstream works around this problem by encapsulating the BBP sequence as if it is a single frame, then adding two N (null) frames as placeholders: I[BBP]NN. Now when a program reads the sequence it first reads in the I frame data and VFW decompresses it. Then the program reads the BBP sequence thinking it's one frame of video. The decoder knows it's three frames so it decompresses all three, stores them internally, and returns the first decompressed B frame to the program. Next the program reads the first N frame and passes it to the decoder. The decoder ignores the N frame and returns the second B frame that it already decoded. Finally the program reads in the second N frame and passes it to the decoder. Again, the decoder ignores the N frame and hands the already decoded P frame to the program. -
AAhh too technical for me. I'll just take your word and try it. How will this change the filesize? It doesn't mess up the quality right? I am using divx and xvid files.
-
Originally Posted by silverwolf0
Originally Posted by silverwolf0
Originally Posted by silverwolf0 -
Uhoh having another problem. The checkbox next to pack is greyed out.
-
I can't remember exactly, but it was certain builds either ffdshow vfw or xvid vfw that caused similar problems to what you describe, where non-linear seeks would disrupt the keyframes and they would be totally different than what they were when you just went over them.
You can try changing decoders (e..g if you are using ffdshow vfw to decode, disable it and install xvid vfw or vice-versa)
It might be worth giving avidemux a shot
use it in "copy" mode, similar to direct stream copy for vdub -
Originally Posted by silverwolf0
You might try re-deriving the keyframe list in VirtualDub. When you open the file put a checkmark in the Ask For Exteneded Options... box. When the extended options dialog comes up select Rederive Keyframe Flags.
Could you post a short segment that shows the problem? Ie, 5 or 10 minutes where I can see the same bad seeks. I'd like to figure out what's going on... -
-
I have been using Mpeg4Modifier to fix the problem described by the OP and it works beautifully with AVI files. However, I have found the same problem with some MP4 files. Since Mpeg4Modifier only works with AVI files, it doesn't help with the MP4s. Is there another tool that does the same thing with MP4s? Or is there a way of making Mpeg4Modifier work with MP4?
Thanks -
Originally Posted by #14, Alonshow
Yes and no.
The really important is the video codec of your file, not the container. (AVI is a container, MPEG-TS/MPEG-PS is other, OGM is other, Matroska is other, etc.). Diverse tools exists to change the container, demuxing and remuxing the streams inside of the files.
But, for your case especially, the important thing is that the video codec must be MPEG4-ASP not MPEG4-AVC.
MPEG4-ASP (Advanced Simple Profile) is a video codec derived from old H263 specification, and is the format behind the DIVX and XVID logos.
MPEG4-AVC (Advanced Video Coding) known also as H264, is the successor of the previous one.
Unfortunately, Mpeg4Modifier only works with MPEG4-ASP video streams.
How convert .mp4 files to .avi?
I personally use the mkvtoolnix tools for remux the .mp4 files in .mkv (matroska) files.
Then, i use virtualdub with the matroska reader plugin of fcchandler for saving in a new .avi (direct stream copy option enabled), and voilá: a have my mpeg4 video without recompression (taking only some minutes) in full quality in AVI container.
Now, the MPeg4-Modifier from Moitah can work with it.
Last edited by Empatojayos; 28th Aug 2012 at 23:51.
-
From the VideoHelp website section called "Tools/Software and Downloads"
SolveigMM AVI Trimmer + MKV is a free video editor for fast and lossless AVI and MKV editing. This freeware AVI editor is small, smart, easy to use and involves no encoding/decoding processes. No video / audio degradation and out of sync problem arises after editing. All AVI and MKV file types of any size and video / audio content are supported.
Right now you might be saying, "But a MP4 file is NOT a MKV file?"
Well yes but a MKV file is just a container and it can hold all kinds of different video and audio formats. So basically you need to demux and remux the MP4 file into a MKV file. The process is fairly easy, doesn't take long and no re-encoding nor transcoding takes place.
Once the MP4 file is a MKV file you can then use SolveigMM to edit out the part you want (or cut out parts you don't want keeping the rest). The resulting new file is a MKV but it can easily be demuxed and remuxed back into a MP4 file if you so wish (again without any re-encoding nor transcoding).
Oh and just now while typing this I tried it (since I never used EXACTLY in this way) and it worked. I took a MP4 and made a MKV and cut out a part of it and then changed it back to a MP4 and like I said it worked (all without any re-encoding/transcoding taking place).
- John "FulciLives" Coleman
P.S.
Here's a link to the program: CLICK HERE"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
Sorry for bumping an ancient thread, but...
sooo... How do you go about all this if your file is H264? It's convenient for me to use Vdub with lots of filters for it, but the cutting problem is the pain.
(Also tried loading the file through Avisynth script (FFVideoSource), did not help)
A trick like packed bitstream would be cool.
Or maybe making Vdub to work directly with a container such as MKV or MP4 instead of AVI, and doing it that way, is enough?
upd. I've found one workaround, is to output uncompressed files. Seems to work properly thenLast edited by rebus_x; 2nd Jun 2023 at 06:33.
Similar Threads
-
Cutting video sections with Virtualdub without recompressing
By rantpolicy in forum EditingReplies: 11Last Post: 16th Apr 2012, 06:48 -
How to precisely cut AVI in Virtualdub?
By user2008 in forum EditingReplies: 7Last Post: 26th Sep 2011, 11:21 -
virtualdub: Cutting video in batch mode?
By zzyzx2 in forum EditingReplies: 2Last Post: 21st May 2010, 14:18 -
how to cut a wav file precisely?
By Lastman369 in forum AudioReplies: 14Last Post: 6th Apr 2010, 23:21 -
Is there not something better than virtualdub for divx cutting?
By pondleaping in forum EditingReplies: 23Last Post: 5th Jun 2007, 11:45