16
$\begingroup$

When I import a video in blender, I get audio and video on two separate channels.

And beside the name displayed on the channel I get some number:

video name: path | number I am talking about

The numbers in both the audio and video channel, do they have to match? The guy in a youtube video tries to match them by changing fps, and they match for him. But I can't get them to match.

So, do they have to match? How can I do it? Would there be any problem if they don't?

$\endgroup$
14
$\begingroup$

The number at the end of the name of the strip indicates the length of the strip in frames. If those numbers are not the same it means that the frame rate of your project and that of the video don't match. So video and audio will not be synchronized.

In other words, the audio will always play at the correct speed a second of audio will play in a second regardless of frame rate. But the video is not altered, it is not interpolated to accommodate for the desired frame rate. For example 300 frames will play in 10 seconds at a frame rate of 30fps, but will play in 12.5 seconds if the frame rate is 24fps.

To fix, open a Properties Window, and in the Dimensions section, set the frame rate of your project to match that of the video.

If you look at the following example you'll see that the final length of the video and audio are different The audio strip is 57 frames long and the video only 45.

In this case the video was shot at 23.98 fps and the project was set to 29.97fps.

Once you set the framerate, the length of the strips should change automatically. At the correct frame rate audio and video will have the same length, and play in sync.

enter image description here

$\endgroup$
  • $\begingroup$ I had to encode the video at a constant framerate using handbrake... only that solved my issue. $\endgroup$ – Jeet Parekh Dec 24 '15 at 11:53
  • $\begingroup$ Please update your answer to address variable frame rate. $\endgroup$ – user1133275 Mar 15 '16 at 13:35
2
$\begingroup$

Blender AV-sync is for playback not editing.

Selecting a frame rate to make the AV sync can produce Video that is not the correct speed.

Blender is unable to handle variable frame rate properly. Converting your file to constant frame rate can be accomplished with

ffmpeg -i "$IN" -async 1 -vcodec libx264 -crf 24 -acodec copy "$OUT"

Alternatives; Handbreak/VLC/etc

$\endgroup$
  • $\begingroup$ Is my assumption right that it is the -crf 24 part that creates the constant frame rate, not the libx264 codec itself? $\endgroup$ – Ideogram Nov 18 '17 at 8:06
  • 1
    $\begingroup$ @Ideogram yes other encodings docs.blender.org/manual/en/dev/data_system/files/media/… can be used with cfr but h264 is the most widely supported. $\endgroup$ – user1133275 Nov 19 '17 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.