FFMPEG 将音频添加到视频中,但将其剪辑到视频长度
我正在尝试从图像序列创建视频并使用 FFMPEG 添加音频。
帧序列只有 25 帧长,但音频有几分钟。我希望 FFMPEG 将音频剪辑到帧序列的长度。
这是我尝试过的命令:
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
这会生成包含第一个图像序列但包含完整长度音频的视频。 -aframes 被忽略。有什么想法吗?
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:
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
This results in a video with the first image sequence but the full length audio. -aframes is ignored. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您正在寻找
-shortest
选项:It sounds like you're looking for
-shortest
option: