FFmpeg/FFBatch Tutorial (WIN/MAC/Linux Only)
Last updated
Last updated
Alright so you've probably came across with these audio files, they are ogg's, or mp3's, or especially wavs but they are not mono, 16-bit, and 22050 sample rate.
Well, my friend, I'll show you how to batch convert these audio files into wavs, or if it's already wavs then we need them mono, 16-bit, and 22050.
This FFmpeg guide is not friendly for starters, so if you don't know how to do locations and command stuff. Please skip this FFmpeg guide by clicking Batch Converting with FFBatch on the right side or click this button.
Right, first things first you need to install FFmpeg, it might be hard, but if you follow this guide, you'll understand.
So, first things first. Go to the FFmpeg website.
You will then came across with this page:
Go ahead and click download.
Now you've came across with this page:
You'll see it down there, and now you need to select a specific OS.
If you are Linux, go hover the red box,
If you are on Windows, go hover the blue box,
And if you are on Mac, go hover the gray box.
We'll be covering on windows but on your end probably gonna be different than that.
Now once we hovered you are now going to select which links you gotta go:
I suggest selecting first one, the first one redirects to his website. However, the second link redirects to the Github page. But doesn't matter what to choose so we are going to choose the first one, gyan.dev
OK, now we are on this page:
What you wanna do right now is to scroll down till you find release:
Git is probably complicated for you to do that, but it requires software called Github Desktop. We'll be doing it on release instead.
Select a link, then paste it on your browser and it should be downloading for you.
If you can't open the 7z file then you need specific software to open that file.
What you need is 7-zip or Winrar. I mainly use Winrar but you can use 7-zip too.
So go ahead download either 7-zip or Winrar.
So, here we have a file with the folder of FFmpeg of it:
What you wanna do, is that drag that folder into anywhere you like (desktop, disk drive, etc.) once that's done, you open up that folder on your whatever end (and not zip of course) and you'll end up with three folders:
Go ahead and go to the bin folder and now you should see three executables:
And now you have done it, you have now FFmpeg!
You can't just open FFmpeg, however, FFmpeg is a terminal thing, it can be opened via cmd (Command-Line).
What you wanna do is type cmd inside of this folder:
You press enter and here, the window will be opened:
Now what you wanna do, is type FFmpeg. Go ahead, it won't bite.
If you see this:
That means it's working. Otherwise, if it's not, then I'm pretty much sure you are in the wrong folder or haven't installed it yet.
Let's test an info file. What you wanna type is ffmpeg -i "*file location*" make sure to include file extensions like mp3, ogg, or even wav.
Here's an example:
if you want to steal this command, go for it but change your file location on yours end.
You will now see this:
That will show everything of what file is.
FFmpeg works just like conversion, so if you want to convert into something else, you should use the same filename but replace it with a file extension that you need (like .wav, .ogg, etc)
Once that's done, it'll convert it into whatever you like.
Right now we would need to convert files into wavs for Tacotron (or if it's already wavs, we will need to convert them for Tacotron anyways.)
So what you want is to type this command:
Let's breakdown the command:
ffmpeg - As usual, your executable
-i - Input
"*file location*.mp3/ogg/wav/flac" - Basically your file location for example "D:\foo\bar.mp3"
-ac 1 - This will convert into mono.
-ar 22050 - Sample rate
-acodec pcm_s16le - This will convert into 16 bit
"*file location*.wav" - Same but for output.
Once you have done everything correctly this will convert into wav file.
Now go ahead and type ffmpeg -i on your converted file
You should see this:
If you see the same things on your end then you should be good to go. Otherwise do typing command correctly.
Okay so FFmpeg might be complicated but however, there's a program that can batch convert and user friendly.
We will be using called FFBatch. So, what we'll do is download and install FFBatch.
Go ahead download it here.
Now once that's done you will be greeted by this window:
Click next, Check I accept and click next, and next again, check if you want it on your desktop and click next, and then click install and you are done.
Now it will install some components for FFBatch, especially FFmpeg.
Now once you have done installing, go ahead open software and you'll be then opened by this window:
Alright here's the thing you wanna do. Import files that you need, there are two buttons which is:
Import files - choose specific files that you need
Subfolders - is basically selects one folder with audio files on it.
Once you have done that, you should see it like this:
What you want to do next, is see this down there?
That's the ones you should be editing. Just like in FFmpeg converting audio files guide, change format mkv into wav (we are not converting video even)
Then replace parameters with this:
Once you have done replacing it, it should be like this:
You can save preset for that so that you won't have to do this again.
Now we'll need to do is provide an output path.
On the right side, you should see the output path, change it or keep it if you want.
And now click Sequential encoding, or if you have a powerful CPU go for multi-file encoding (i never touched this button but that's my guess)
Now it should be converting into specific files that we need.
If you have done everything correctly, then congratulations. Let's move on to transcribing dialogue.