How to Convert Media Files Using the Command Prompt on Windows 10

Configurare noua (How To)

Situatie

There are many ways to convert media files from one format to another on Windows 10, including using the Command Prompt—thanks to ffmpeg. If you prefer commands over graphical user interfaces, here’s how to convert your audio and video files using the Command Prompt.

Solutie

Pasi de urmat

Set up FFmpeg to Convert Audio and Video Using the Command Prompt
By default, the Command Prompt doesn’t offer the option to convert your media files. You need to install a third-party utility to perform these conversions, and FFmpeg is a great utility to do this with. It’s open-source, cross-platform, and very popular.

Using FFmpeg, you can convert nearly all audio and video formats to many other file formats. To use this utility, you need to download it first, then add its path to your system variables.

  • To begin, head over to the FFmpeg site, click “Download,” click the Windows icon under “Get packages & executable files,” and choose one of the providers to download the compiled FFmpeg package.

Download FFmpeg

  • When the package is downloaded, right-click it and select “Extract All.” Then press Ctrl+A to select all your extracted files, and press Ctrl+C to copy the selected files. Basically, you’re copying the following folders: bin, doc, include, and lib.

Copy FFmpeg folders

  • Open a File Explorer window, navigate to the “C” drive, and create a new folder called “ffmpeg”. Head inside this folder and press Ctrl+V to paste all your FFmpeg folders here.

Paste FFmpeg folders

  • It’s time to add FFmpeg’s path to your system. To do this, open the “Start” menu, search for “View advanced system settings,” and click the first result.

Open the Windows advanced system settings

  • Find the button that says “Environment Variables” and click it. Then select “Path” from the upper part of your screen, and click “Edit.”

Edit paths on Windows 10

  • Select “New” on the right to add a new path. Type the following path in the box, which is FFmpeg’s path on your PC, then click “OK.”

C:\ffmpeg\bin\

Add the FFmpeg path

FFmpeg is now ready to be used from the Command Prompt to convert your media files.

How to Convert a Video from One Format to Another

Since FFmpeg supports dozens of file formats, you can convert your videos from pretty much any format to any of your chosen target formats. Performing this conversion only requires typing a single command. You use a parameter with the command, and the command turns your source file into your chosen format.

For this example, we’ll convert a video called “fog.mp4” placed on your desktop to “fog.mkv”. To do this, open the “Start” menu, search for “Command Prompt,” and launch the tool.

Open the Command Prompt

Type the following command to make your desktop the current working directory:

cd desktop
Make desktop the current working directory in Command Prompt

Now, type the following command to convert “fog.mp4” to “fog.mkv”. Of course, replace the source and target files in the command to convert your actual files.

ffmpeg -i fog.mp4 fog.mkv

Convert a video using the Command Prompt

When the video is converted, the resulting file is placed in the same folder as the original file. It would be the desktop in this case.

Tip solutie

Permanent

Voteaza

(2 din 8 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?