# Video editing. Audio and Video strip have different length

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?

• – user1853 Dec 19 '15 at 10:48
• Maybe this tutorial from Mikeycal Meyers helps... – Samoth Dec 19 '15 at 13:52
• I had to encode the video at a constant framerate using handbrake... only that solved my issue. – Jeet Parekh Dec 24 '15 at 11:53
• Here's a workaround that will help you to import your footage via the L-SMASH library without the need of a reencoding: blender.stackexchange.com/a/49219/2843 – Samoth Mar 21 '16 at 19:43

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.

• I had to encode the video at a constant framerate using handbrake... only that solved my issue. – Jeet Parekh Dec 24 '15 at 11:53

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

• Is my assumption right that it is the -crf 24 part that creates the constant frame rate, not the libx264 codec itself? – Ideogram Nov 18 '17 at 8:06
• @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. – user1133275 Nov 19 '17 at 12:39