since I want to sync an audio file with my video with vdub2 I need to cut my video file on point. I learned that I'm only allowed to cut on keyframes. So while compressing I used the "x264vfw -H.264" codec, saved the file in an .avi container and then I ticked the box "force keyframes every 2 frames".
In the output video, I got keyframes approximately every 250 frames and percisely every 10 seconds. I suggest I've not yet understood how to properly force keyframes with vdub2.
Thanks in advance!
+ Reply to Thread
Results 1 to 11 of 11
as in help. The GOP size is default set to auto = 250 frames.
Here from VD and you have to write it in extra command in the empty field
-I, --keyint <integer or "infinite"> Maximum GOP size 
-i, --min-keyint <integer> Minimum GOP size [auto]
Edit: but be aware of lost very much quality, because features that use x264vfw are disabled for example limited P and B frames and much more, so suggesting you to set CRF on very very low number. You get big file, but if quality matters it is unavoidable.
Last edited by Bernix; 22nd Sep 2018 at 08:03. Reason: Edit
High compression codecs get a large part of their compression from not repeating parts of the frame that don't change. They say something like "copy the last frame then make just these small changes..." Keyframes are encoded much like JPEG images -- everything needed to reproduce the entire picture is present in the compressed data. That makes them much larger (typically 10x to 20x) than all the other frames which only contain changes.
Consider a 250 frame GOP. The first frame is a keyframe, encoded in its entirety. The rest of the frames only encode changes relative to that frame (directly or indirectly). If you remove the keyframe you can no longer reconstruct the rest of the frames of the GOP. This is why simple cut editors can only cut on keyframes.
If you set the keyframe interval to 2 you will get very poor compression. You won't be able to take much advantage of this inter-frame encoding. You will get very low quality at the same file size, much larger files at similar quality, or some compromise between those two.
Last edited by jagabo; 22nd Sep 2018 at 12:47.
To me for this purpose seems be better chop video in several segments. And do I (K) frame lossless compression. It demands lot of space but not quality loss. Even x264 with 2 keyframe interval, to keep quality of original video will cost you plenty of space.
But don't know your workflow. Probably you need one file, probably you are limited by other factors. Don't know.
Actually, the OP's original premise is flawed. Since he is going to reencode his video he isn't limited to cutting on I frames. He can cut in/out on any type of frame.
i think his idea is delete frames to achieve some Audio video sync. But it seems to me better work with some for exmple non linear editing program. Where both tracks can be separated and visualized. So cut video doesn't affect audio and other way round. Also both track can be cut in same position with same length. In virtual dub there is not AFAIK how to control audio. Cut video and keep audio for example.
Sorry, didn't knows this. But still think some NLE software is more advanced for Audio video sync. I mean you can see waveform and filmstrip, you can delete any part visualy for both video and audio. You can save your project (not in this case lossy save probably several times). Virtualdub 2 is great software with wide range of possibilities and is very powerful also supporting Avisynth. But not sure if is it right choice for Audio-video syncing. It seems to me in VD2 you have to done it in one session if you do not save all work lossless. When there is more part to correct especialy somewhere cut video and somewhere audio.
Ferrari makes great cars, but for some type of race is not suitable at all. Also SVU cars are probably great, lot of space, but hardly to park in city centre.
What I was trying to say is that do not compare quality but what type of software seems to me be better for this work.
You are doing great job Shekh!