Hello everybody,
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!
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
-
-
Hi,
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
Frame-type options:
-I, --keyint <integer or "infinite"> Maximum GOP size [250]
-i, --min-keyint <integer> Minimum GOP size [auto]
--keyint 2
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.
BernixLast edited by Bernix; 22nd Sep 2018 at 07: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 11: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.
Bernix -
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.
-
Hi Jagabo,
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.
Bernix -
-
@Shekh
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!
Bernix -
VirtualDub has the ability to display the audio waveform via View -> Audio Display. It only works with uncompressed audio though. You can always create an uncompressed WAV file from your video or alternate audio file.
-
o.k. as alway wrong. add that virtualdub can create film strip and ashame on me.
Still several audio track can be good bonus to syncing.
Bernix
Similar Threads
-
VirtualDub2 Exporting Image Sequence
By MFZ in forum Video ConversionReplies: 10Last Post: 30th Aug 2018, 07:46 -
VirtualDub2 - Encoding MPEG2 Files (bad qualitiy compared to TmpGenc 2.5)
By TJFO in forum Video ConversionReplies: 11Last Post: 15th Aug 2018, 15:59 -
Green line around Virtualdub2 window
By Gotanno in forum EditingReplies: 9Last Post: 2nd Jun 2018, 14:56 -
Can I force ffmpeg to transcode 59.94 frames to display at 25 frames per se
By oduodui in forum EditingReplies: 4Last Post: 28th Apr 2018, 09:24 -
utility to show keyframe, p, b frames intervals
By cpliu in forum Newbie / General discussionsReplies: 6Last Post: 14th Aug 2014, 04:57