How to build the ultimate media converter (no experience required)

We've concentrated very much on the basics thus far, but that's not always powerful enough. What if we want to change the resolution of the output video? Use a different audio codec? Ignore the first few seconds of the video, maybe just convert five seconds from somewhere in the middle? None of this is any problem, but it's going to require a little more work.

Resizing a video is a key first step when you'd like to play it on a mobile device, and once again FFMPEG has several tools to help. The most powerful is the scale filter:

ffmpeg all in one

FFMPEG can handle most media conversion tasks

Drag and drop conversions

FFMPEG's various options aren't difficult to understand, as we've seen. And while it's not naturally easy to use, creating a few batch files can make a real difference.

To begin, add the FFMPEG BIN folder to your system's PATH, so that Windows can find it. In Explorer, right click This PC, select Properties > Advanced system settings > Environment Variables, double click "Path" in the System Variables list, and add a semi-colon and your BIN folder to the end of the current path (C:\PROGRAM FILES (X86)\Something would become C:\PROGRAM FILES (X86)\Something;C:\FFMPEG\bin).

To test this, open a command prompt, type ffmpeg and press [Enter]: if you see help on FFMPEG syntax, rather than "ffmpeg is not recognised..." then it's worked just fine.

With the preparations complete, use Notepad to create a batch file called To-MP4.bat, containing the following line:

ffmpeg -i %1 %1.mp4

Now drag and drop any video onto that file and it'll launch FFMPEG with your source file as a parameter, like "ffmpeg -i c:\video\dragged.mov c:\video.dragged.mov.mp4". Your new file will appear in the same folder as the source, with the same name, and an MP4 extension, without you having to type anything at all.

Create additional batch files as required, replacing MP4 with some other extension, for whatever other conversions you need.

This approach is simple, but limited, as it only converts one file at a time. To work with a group of files, use a batch file like this:

for %%a in (*.avi) do ffmpeg -i "%%a" "%%a".mp4

Place this file in a folder containing your source AVIs, double click it, and just wait for any conversions to finish.

There's a lot more scope for batch file trickery here, but even these core basic steps will take you a long way. Use different extensions, add extra commands, string them together to create your own scripts, maybe use Task Scheduler to run automatically, and you'll soon have the ultimate in media conversion toolkits – with no other software required.

Mike Williams
Lead security reviewer

Mike is a lead security reviewer at Future, where he stress-tests VPNs, antivirus and more to find out which services are sure to keep you safe, and which are best avoided. Mike began his career as a lead software developer in the engineering world, where his creations were used by big-name companies from Rolls Royce to British Nuclear Fuels and British Aerospace. The early PC viruses caught Mike's attention, and he developed an interest in analyzing malware, and learning the low-level technical details of how Windows and network security work under the hood.