FFMPEG and Windows – a small step into Advanced Video Conversion

If you’ve heard about FFMPEG and marveled at its video conversion capabilities, but you’ve never really bothered figuring out how to use this tool to make your life better, you were like me a few days ago.

Necessity breeds all kinds of things, and in this case, I had to learn FFMPEG.

I signed on for a new job for my freelancing services, and agreed to convert a whole lot of video files for a client. This client didn’t know anything about these video files except that he needed them ready to be put into a form that could be accessed via a web browser. I said that I’d be the guy for the job.

When I get his huge collection of video files, it was over 40 files in a .mkv format. Not a very common video format. Certainly not one that will play in the web or any stock OS media player like Quicktime or Windows Media Player. But even more problematic than that, these .mkv video files wouldn’t even load into Adobe Media Encoder.

Typically, my video conversion workflow would involve Apple Compressor or Adobe Media Encoder. But neither of these programs handle this particular type of video file at all.

So I had to look elsewhere.

FFMPEG is a tool that can do anything and everything with images, video, audio and other stuff. It’s a program and set of code and I wish I could say I had full knowledge of. I don’t fully grasp the ins and outs of this very powerful tool, but I do know how it can help me.

Using FFMPEG, I can easily convert any video file of any format to any other kind of media format known to man. In this post, I will very briefly go over the steps needed to batch convert a series of .mkv files into .mp4 files using FFMPEG on Windows 8

  • Download Zeranoe FFMPEG Build for Windows (Make sure you know how to use 7Zip)
  • Extract the downloaded archive and navigate to the “bin” folder
  • Create a new text document and enter the command (generically stated)

    for %%a in (“*.mkv”) do ffmpeg -i “%%a” -vcodec copy -acodec copy “newfiles\%%~na.mp4” pause

  • Make sure that you replace the (“*.mkv”) with the actual directory of your video files, and that you create a directory called ‘newfiles’ in that directory, as in

    for %%a in (“D:\client\*.mkv”) do ffmpeg -i “%%a” -vcodec copy -acodec copy “D:\client\newfiles\%%~na.mp4” pause

  • Save this text document as ‘batch.bat’
  • Double-click this newly created ‘batch.bat’

That’s it!

If this seems simple, it’s because I’ve outlined the most basic steps possible for doing the one specific purpose of mass-converting a series of .mkv files into .mp4 files using FFMPEG on Windows 8. I haven’t touched any of the countless possibilities that FFMPEG has to offer. For that reason, I suggest further reading for those of you who are intrigued by the possibilities.


FFMPEG official Home page

A forum thread containing a great outline on some basic FFMPEG usage