Peco
Peco

Reputation: 19

FFMpeg Batch Image + Multiple Audio to video

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?

Appreciate any help

Upvotes: 2

Views: 2314

Answers (2)

blueskuc
blueskuc

Reputation: 3

Im trying almost same thing, look how ive done:

@echo off
set /P format="Type the Video Format: "
  
 
        for  %i in (*.%format)   <<<< geting not a reconiezed by CMD 

        do @echo file '%i' > Lista-%format%.txt  
    
                                
    
    mylist=Lista-%format%.txt
    
    ffmpeg.exe -i %mylist% -vf scale=480:320 output-%mylist%.%format% 

Upvotes: 0

nlahkim
nlahkim

Reputation: 11

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" the folder of codec
  • "C:\ffmpg\bin\input.jpg" image path
  • "C:\mp4\%%~na.mp4" output folder
  • -vf scale=854:480 you can specify the resolution of your video 16:9 for youtube video
  • -c:a aac -shortest use aac codec, by specify -shortest the video length will match the audio length

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

-c:a libvo_aacenc -shortest -strict experimental

i hope that help

Upvotes: 1

Related Questions