FLV to MKV batch conversion (article illustration picture)

To convert, or not convert? That is the question
And the answer is binary…

I wanted to convert some FLV files to a format that would play on my stand-alone LG Blu-Ray player via Home-Link and found a working solution worth sharing.

To convert one or more FLV (Adobe Flash Video Container) files to the more compatible MKV (Matroska) container “format”, simply follow the instructions below:

  1. You’ll need a copy of the FFmpeg executable:
    Download the latest Static 32-bit build from Zeranoe’s FFmpeg Builds page.
  2. You’ll now extract the compressed FFmpeg build you just downloaded.
    To extract the .7z file, I recommend using either 7-Zip (free!) or WinRAR (unlimited use shareware).
  3. Now copy the executable ffmpeg.exe from the bin folder that you just extracted to the same folder as your FLV files reside in.
  4. Open Notepad. (Shortcut: Windows key + R / Windows key + Q and type “notepad”. Hit enter.)
    1. Write or copy the following line into the empty notepad text editor box:
      for %%a in (“*.flv”) do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.mkv
  1. Go to File and click “Save As…”
  2. Browse to the folder where your FLV files reside.
  3. In the file name box, enter (including the double quotes) a name for the file, with a .bat extension. For example:
  4. Hit Save.
  5. Browse to your newly created batch file and double click it to start the batch conversion process. It should only take up to a couple of minutes for a 300 MB file on a relatively new computer. You should see the progress clearly in the black command box that pops up.

NOTE #1: If nothing happens or you get an error message that you can’t read, try running the .bat file from the command line: Hit the Windows key + R / Windows key + Q . Type CMD. Hit ENTER. Type the full path to the batch file and hit ENTER again. You should now be able to read any error messages.

NOTE #2: You may need to rename the files to remove any spaces or special characters, or else the script can fail. I would suggest making copies of the original files, then you can simply copy and paste the old filenames back after conversion.

NOTE #3: Some FLV files may have MP4 extensions, and vice-versa. Either rename the extension to FLV if this is the case, or try changing the .bat command line to:
for %%a in (“*.mp4”) do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.mkv

Learn more