FFMpeg批处理图像+多个音频到视频 [英] FFMpeg Batch Image + Multiple Audio to video

查看:77
本文介绍了FFMpeg批处理图像+多个音频到视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用FFMpeg执行以下操作,我想用一个图像和不同的音频文件(音乐专辑)创建多个视频.这些是我自己的相册,因此在您提出要求之前,我有权这样做.我有100多个音频文件要贴在youtube上.

Im trying to do the following with FFMpeg I want to create multiple videos with one image and different audio files (music albums). These are my own albums so I have rights to do so before you ask. I have 100's of audio files to stick up on youtube.

有没有一种方法可以批量创建此文件,这样我就可以加载一张图像(专辑封面)和多个音频文件(专辑曲目)并自动将视频恢复为曲目长度?

Is there a way I can create this in batch so i can just load one image (album cover) and multiple audio files (the album tracks) and get videos to the tracks length automatically?

感谢任何帮助

推荐答案

我使用这部分代码来转换我的YouTube视频:

i use this portion of code to do the conversion for my YouTube video:

for %%a in ("*.*")
do
"C:\ffmpeg\bin\ffmpeg" -loop 1 -i  "C:\ffmpg\bin\input.jpg" -i  "%%a" -c:v libx264 -preset veryslow -tune stillimage -crf 18 -pix_fmt yuv420p -vf scale=854:480 -c:a aac -shortest -strict experimental -b:a 192k -shortest "C:\mp4\%%~na.mp4"
pause

  • "C:\ ffmpeg \ bin \ ffmpeg"编解码器文件夹
  • "C:\ ffmpg \ bin \ input.jpg"图像路径
  • "C:\ mp4 \ %%〜na.mp4"输出文件夹
  • -vf scale = 854:480,您可以为youtube视频指定视频16:9的分辨率
  • -c:aac-最短使用aac编解码器,通过指定-shortest,视频长度将与音频长度匹配
  • 如果出现错误,请使用libvo_aacenc而不是像这样的aac编解码器:

    if there an error use libvo_aacenc instead of aac codec like that:

    -c:a libvo_aacenc -shortest -strict experimental
    

    我希望有帮助

    这篇关于FFMpeg批处理图像+多个音频到视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆