VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. 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!
    Quote Quote  
  2. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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.




    Bernix
    Last edited by Bernix; 22nd Sep 2018 at 07:03. Reason: Edit
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Originally Posted by ConvertKonvert View Post
    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!
    There is less friction if you use codec named "x264 8 bit...", this is special version of x264vfw. Specifically the "force keyframes" option actually does work (same effect as --keyint).
    Quote Quote  
  5. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  6. 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.
    Quote Quote  
  7. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  
  8. Originally Posted by Bernix View Post
    In virtual dub there is not AFAIK how to control audio. Cut video and keep audio for example.
    There is this option buried in strange place
    Video->Select range->Apply video edits to audio
    Quote Quote  
  9. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    @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
    Quote Quote  
  10. 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.
    Quote Quote  
  11. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!