FG
💻 Software

FFMPEG add audio to a video but clip it to the video length

Fresh7 days ago
Mar 15, 20264086 views
Confidence Score0%
0%

Problem

I'm trying to create a video from an image sequence and add audio with FFMPEG The frame sequence is only 25 frames long but the audio is several minutes. I want FFMPEG to clip the audio to the length of the frame sequence. This is the command I have tried: This results in a video with the first ima…

Error Output

ffmpeg -i input_images%04d.jpg -pix_fmt yuv420p -vcodec mjpeg -qmin 1 -qmax 1 -r 25 -i audio_file.mp3 -ar 22050 -ab 192k -aframes 25 output.mov

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: FFMPEG add audio to a video but clip it to the video length

Low Risk

From the FFmpeg documentation: The option finishes encoding when the shortest input stream ends. When you're merging video and audio files, you can also copy the bitstreams to avoid encoding:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment