Understandably, most people are a little lost when it comes to using command-line programs like FFmpeg. But don’t worry, I was there not too long ago, and now I’ll try explain as thoroughly as I can how to install it and start using it.

But first, a little info from their site:

FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge.

So really, you’re doing yourself a huge favour by installing it, you just need a little help to get started.

(click to expand each section)

1: Download

Head on over to http://ffmpeg.zeranoe.com/builds/ and download either the 32 or 64-bit Static version (depending on your system). Most modern computers are 64-bit, but just in case you’re not sure, it’s pretty easy to check.

At the time of writing this, the latest build is from 2014-05-30:

2: Unzip

To make the download size nice and small, it’s compressed into a .7z file, which is just like a .zip file but smaller. Chances are you know exactly what this is and how to extract it, but if not, you’ll just need to download a program called 7zip which will allow you to unzip it. I know it sounds like I’m sending you further down the rabbit hole, but 7zip is another program you’ll not regret you installed.

Unzip it to a folder that’s easy to find, like directly to your C:\ drive. It should create a folder like ffmpeg-20140530-git-98a6806-win64-static, but just rename it to ffmpeg for simplicities sake. You’ll thank me later.

It should look something like this:

3: Add to Path

Finally, we need to add the bin folder, which contains the ffmpeg.exe file, to our system path to allow us to run the commands easily.

Technically, you could always do something like C:\ffmpeg\bin\ffmpeg.exe -codecs,
but it’s much easier to type ffmpeg -codecs.

If you try that right now, you’ll get an error saying that the ffmpeg is not recognized as an internal or external command.

That basically means windows has not idea what you’re talking about.

All we need to do is add C:\ffmpeg\bin to our system path, and it’ll understand us.

So, in the Start Menu, right click on Computer and choose Properties.

Then select Advanced system settings:

Open up the Environment Variables:

And then edit the Path variable:

The Path is just a list of folders that contain commands you’re allowed to use without typing in the full path of the exe files.

So, go ahead and add C:\ffmpeg\bin to the end of the line, making sure that there’s a semi-colon (;) after the previous folder:

4: Use it!

Since FFmpeg is a command-line program, we’re going to need to open a command line!

There are several ways to do this:

  1. Search in the start menu for command prompt or just cmd
  2. Hit Win+R to open the Run utility and type cmd there
  3. Shift+Right Click in a folder (without any files selected) and choose Open command window here. That’s what I usually do.

Once you’ve got a console open, check that FFmpeg is installed properly by typing ffmpeg -codecs, which will show you all the codecs you have access to, including audio and video.

If it still tells you that it doesn’t recognize the command, double check that you successfully added the ffmpeg bin folder to the system path.

If all is well – congratulations, it’s installed!

Now you can play around with all sorts of things, like converting an image sequence into a video, a video into an image sequence, rotate and scale videos, discover information about a video, stabilize that shaky video you took at you Great Aunt’s 4th wedding, stream the webcam you planted in your girlfriend’s ex-boyfriend’s bedroom, or convert your 250 frame cube render to a super-crispy lossless h264 of unparalleled awesomeness.

There’s really an endless number of things you can do, so have a look at the documentation some time. But if that sounds like too much hard work, here’s my own personal reference I keep to remind me of common tasks:


Make video from image sequence:
ffmpeg -i frame_%04d.png -c:v h264 test.mp4 – ‘%04d’ is the padding, like ‘frame_0001.png’

lossless h264:
ffmpeg -i frame%04d.png -c:v libx264 -preset veryslow -qp 0 vid.mkv
ffmpeg -i frame%04d.png -c:v libx264 -preset ultrafast -qp 0 vid.mkv – larger file size, but quicker to encode

quicktime (camtasia can use these):
ffmpeg -i frame%04d.png -c:v prores vid_prores.mov
ffmpeg -i frame%04d.png -c:v qtrle qtrle.mov – possibly lossless compression

HTML5 supported video:
ffmpeg -i frame%04d.png -c:v libx264 -b:v 1M -c:a aac -r 10 output.mp4 – ‘-r 10’ specifies a framerate of 10 fps
ffmpeg -i frame%04d.png -c:v libvpx -b:v 2M -c:a libvorbis -r 10 output.webm
ffmpeg -i frame%04d.png -vf scale=680:-1 -c:v libvpx -b:v 2M output.webm – 680p (auto height), no audio

Make image sequence from video:
ffmpeg -i video.avi image%04d.png
ffmpeg -i video.avi .\imgs\image%04d.png – outputs the images to a folder (the folder must already exist!)

Get info on video:
ffmpeg -i video.avi

Deshake video (stabalize):
ffmpeg -i input.mov -vf deshake output.mov

Side-by-side:
ffmpeg -i left_video.mov -vf "[in] scale=iw/2:ih/2, pad=2*iw:ih [left];movie=right_video.mov, scale=iw/2:ih/2 [right];[left][right] overlay=main_w/2:0 [out]" sidebyside.mov


That’s it!
If you weren’t successful, just post a comment below and I’ll help you out :)

 

  • Pingback: Camera Stabilisation with FFmpeg / Adaptive Samples()

  • fwefr

    what is this

  • daNi

    Thank you so much for the great tutorial you have shared on how Windows recognized this ffmpeg. Great help!

    • My pleasure! Glad it helped :)

      • g. kershaw

        I second daNi’s comments. I’ve flipped through many ffpmeg installation tutorials and this is the easiest to use for certain. Thank you!

  • Hello! As in cms video Conversion settings in Configuration – FFMpeg-Path: specify the path to ffmpeg I have the path is c:\ffmpeg\bin\ffmpeg.exe! But it doesn’t work(

    • Hey Antony – your path should just include “C:\ffmpeg\bin\” (without the actual executable at the end). This tells windows to look in that directory for executables, you don’t have to tell it exactly which one you want.

      • VM

        Thank You Very Much….. Great Tutorial!!! Need some more information, how to integrate FFMPEG in Harmonic Carbon Coder?

  • Andap

    Thanks, this was a well written guide. Much more helpful than the others I came across, too.

  • Pingback: FFmpeg, la source du traitement vidéo et audio - Linked()

  • James

    Hmm keeps telling me ‘ffmpeg’ is not a recognized as an internal or external command, operable program or batch file

    • James

      nevermind, i downloaded the wrong one. its working now

  • Simple tutorial. Helped me a lot to take screenshot in recovery menu Android. FFMPEG was needed. Thanks a lot.

  • Jody

    Hi, I got ffmpeg to run. But ffmpeg cannot find my pictures and videos. Where should I place the files that I wish to use with ffmpeg? i put my files inside the bin folder and it didn’t work either.

    • Just open the command window inside the folder that contains the files: deselect any files, shift+right click in an empty space inside the folder, choose ‘Open Command Window Here’; or just type ‘cmd’ into the address bar.

  • bibas sangma

    Hey I mistakenly deleted the path name which was already written there… So nor any response after completed my installations of this. Now how to recover the path name

    • Oh dear – well a quick google shows there are a few ways to get your old path back, and if those fail you can always just copy paste it from another computer to solve the worst of your problems.

  • Great Tutorial – Thank you for making it so easy

  • Tony Roe

    Maybe great tutorial, and certainly on a subject I need to know about, but I can barely read this page (all other web pages are fine – maybe some weird HTML settings?).
    Cheers

    • That’s weird, it looks fine to me. Could you show a screenshot? and what OS+browser are you using?

  • carrie

    Thank you for the well written tutorial.
    Unfortunately, For some reason, I keep trying to open it and it’s still not working.
    I keep getting a command prompt that pops up and immediately disappears when trying to run it. It goes away so fast that I can’t read the error message it’s giving me :(

    • FFmpeg doesn’t have a user-interface, so double-clicking on the .exe will open it, realize you didn’t ask it to do anything, and close straight away. It’s a command-line program, meaning you need to run it from the command line and give it different arguments/parameters in order to tell it what to do. Step 4 of this very article will show you how :)

  • Sanju

    unfortunately, it didn’t work for me :( tried your tutorial and the wikihow one as well. every time i run C:\Users\my_name>ffmpeg -version it says that ‘ffmpeg’ is not recognized etc

  • kawiah

    I have the same problem. It says ‘ffmpeg’ is not recognized as an internal or external command, operable program or batch file.

    • Double check that you added it to your path correctly. Try restart your computer as well. If it still doesn’t work, paste the full contents of your path variable here :)

  • jehadsdi

    Thanks for Great Tutorial. but how I can play the video using ffmpeg?

  • Brokenleg

    It’s a well-written tutorial, easy to follow.
    But when I tried to use it, there was system error message came out.
    “The program can’t start because OpenCL.dll is missing from your computer. Try reinstalling it to fix this problem.”

  • maxwell brigenza

    so this is supposed to be one of the best Video tool and the installation is so shity why?

  • Omar9198

    Hello I have tried all step by step and it is not working. After unzipping ffmpeg……64static, a folder was created with that name. The folder contains a subfolder called ffmpeg, a file called ff-prompt and a file called “README”. If I try to run “ff-prompt”, the prompt window opens and states ” “binffmpeg.exe could not be found” If I open the subfolder called “ffmpeg” there are four subfolders “bin”, “doc”, “licenses” and “presets” If I open the subfolder “bin”, there are four files: “ffmpeg”, “ffplay”, and “ffprobe” If I execute “ffmpeg” I get a question if want to run this file, I press “OK” and a prompt window opens up for a millisecond, can’t see it’s content. It just disappears and nothing happens. Thanks a lot for your help

    • FFmpeg is a command line program, you don’t double click on the exe, you open a command window and run various commands. Read step 4 please :)

      • Omar9198

        I really appreciate your help and the tutorial. I am far from being any kind of geek and I am using ffmpeg to obtain music from Youtube via “Firefox”, “Youtube Enhancer”. Just as Feedback, there are two things that I found confusing on the tutorial. When I unzipped the program it was created under two ffmpeg files, therefore it is C:>ffmpegffmpegbin which I added to the path and it works well. I thought it was going to work straight from c:>ffmpeg -codecs and the tutorial shows c:>tmptmpffmpeg -codecs. Other than that I really really appreciate your help. God Bless you Man!!

  • Shawn Reynolds

    It keeps telling me that it is not recognized. I do not have a bin folder.

    • Vova

      You have to use the download link in this post.

  • ali

    Thank you. I followed these steps but when I try to use ffmpeg in Matlab, it does not work. Anyone knows how to work ffmpeg in Matlab? Thank you…

  • Pingback: Figure and Animation Visualization in Python – The Using of Matplotlib and Seaborn – DropCoins()

  • Dannkus

    I am in Windows 10 and the path command is different. Please help :'(

  • sig94

    I have a .MOV file that was taken on a cellphone – it’s upside down. Can I rotate it 180 degrees in ffmpeg?

  • Joey Black

    Works great! Simple easy instructions. Good Job ! The DON #moviestarweb

  • Aragorn Crozier

    How would I know if this has worked and has actually installed ffmpeg?

    • See step 4 ;) `ffmpeg -codecs` should work, if not, then it’s not installed properly.

      • Aragorn Crozier

        Sorry, didn’t realize that Step 4 was collapsed. It just looked like: “Step 4: Use it! That’s it! If you weren’t successful, just post a comment below and I’ll help you out :)” Just realized what I had to do.

        Thanks for this explanation because the other ones were daunting and not particularly clear or helpful. Thanks again.

  • Janukowicz

    I managed to add the bin folder to system variables but when I try to type ffmpeg -version or ffmpeg -codecs in command prompt, nothing happens. There is no error, no confirmation, no crash, literally nothing, only path of current users documents shows up

  • Kaas Chuig

    Don’t suppose you could explain this in XP?

    • Sorry I don’t use XP, but it should be very similar. Is there a particular part that you’re stuck on?

      • Kaas Chuig

        I was trying to get the keepvid joiner thing to work, but I managed to figure it out… hopefully. (at least the program works now)

  • GR

    7zip??? Forget it mate… stick to the standard built-in zip.

  • Morris_Cips

    Is it possible to implement ffmpeg into own browser?

    • There are some libraries available if you follow the first link on this page.

  • George Offord

    I have no idea about what you mean by “Add to Path”. How is that done on Windows 7???

    • Click on each heading to expand the instructions :)

      • George Offord

        Okay, thanks! I didn’t know that each step was expandable!! :)

  • resmita bhakti

    can’t run… help me please

    • Did you try turning it off and on again?

      • resmita bhakti

        Still not recognized in the system…

        • Are there any error messages? What isn’t working and what did you try?

  • Ujwal

    I don’t know what does it exactly mean, but after restarting my comp and trying “ffmpeg -codecs” command in the cmd, i get this error message – “The procedure entry point _wfopen_s could not be located in the dynamic link library msvcrt.dll” Any help?

    P.S.: I’m using Windows XP Professional.

  • Ujwal

    Any help is appreciated. :)

  • Pingback: makingOf *The Joys of FFmpeg* – Carl Strümpfer()

  • Jasmin

    What will I do if I do not have the PATH on the User Variable?

    • Tahnerd

      I believe if you do not have PATH under “System Variables” then you just have to create it yourself using the “New…” button.

  • Tahnerd

    Thanks for the help! The download on ffmpeg.org hadn’t worked for me, but this one did.

  • Sam Bastawros

    i have successfully installed it codecs are aok so how do i actually open the bugga lol

  • Philip Orlando

    thank you for the descriptive tutorial! it worked beautifully!

  • Syeda Sabrina

    I am getting the following after adding it to the path. What could go wrong?
    C:UsersSabrina>ffmpeg -codecs
    ‘ffmpeg’ is not recognized as an internal or external command,
    operable program or batch file.

    • Syeda Sabrina

      FYI I am using windows 10

    • Maybe try rebooting?

      • Syeda Sabrina

        haha yeah that worked! :)

  • Nathan

    I am using Windows 7. I have installed as per instructions and the test “ffmpeg -codecs” works fine.

    I have created a series of frames and now want to make a movie.

    When I run the following command:
    ffmpeg -framerate 5 -i wfnmovie_gwratio1p0_%03d.png -c:v h264 wfnmove_gwratio1p0.mp4

    It generates a very small movie file that is just green.

    When I run the alternative command:
    ffmpeg -framerate 5 -i wfnmovie_gwratio1p0_%03d.png -c:v prores wfnmove_gwratio1p0.mov

    I get a working movie.

    I would be interested in creating an mp4 file, because I understand they can be much smaller than the mov files. Any idea what I might be doing wrong?

    Attached is a screen grab of the output when I issue the first command above.

    • Try libx264 instead of h264

      Would also be a good idea to specify the quality either with “-q:v” or “-b:v” (quality or bitrate). See more here: https://trac.ffmpeg.org/wiki/Encode/H.264

      • Nathan

        I get the same issue with libx264. It doesn’t seem to be complaining that libx264 and h264 don’t exist. It just produces a nonsense output.

      • Nathan

        By the way, thanks for the quick reply! :)

        Any further ideas?

  • GJRickard

    I followed all the steps, and it still shows ”C:ffmpegbinffmpeg.exe’ is not recognized as an internal or external command,
    operable program or batch file.’ Any help?

    • Are you typing in the full path to ffmpeg.exe or just typing in ‘ffmpeg’?

      The whole idea with the PATH thing in step 3 is to allow you to simply type ‘ffmpeg’ instead of having to remember exactly what folders it’s in.

      • GJRickard

        I actually got it. There was no ffmpeg.exe in the bin folder.

        • How strange, did you figure out why?

  • mahmoud sidawy

    I’m using windows 10 and when i added the path, it didn’t work for me but, when i restarted it worked fine. Thanks!

  • meo

    I’m getting “binffmpeg.exe could not be found”

    • If you followed step 3 correctly, then you might just need to restart your PC for it to pick up the changes.

  • OreMaster

    I accidentally deleted the PATH in user variable, what do?

  • Guest

    I got “The system cannot find the path specified.” What do I do?

  • Pingback: How to dowload Youtube videos on Windows with youtube-dl and start using the command line – Andrei Clinciu()

  • Pingback: Environment Variables and ffmmpeg – Strack Digital()

  • Spencer

    I’m still getting
    ‘ffmpeg’ is not recognized as an internal or external command,
    operable program or batch file.
    even though it’s in the right spot

    • Spencer

      Nvm, I put it in the wrong place.

  • Far

    Hi, Thanks it worked!!!But still there is a problem:
    I tried to use -silencedetect by the version recommended here but it seems that this function is not included. I was trying to download a relevant version of ffmpeg but the installation procedure seems different.
    Can you help me how to use this function(silencedetect) of ffmpeg?

  • Old School

    I wanted to export my animation from Pencil, but it keeps saying please insert ffmpeg.exe into the plugins folder
    Even though i have installed it correctly. Any ideas how to overcome this?

  • Pingback: Tutoriel ffmpeg – .ec()

  • vlad

    can it convert Panasonic proprietary car video AV to AVI. I’ve tried to extract info (ffmpeg -i file.AV) and got a bunch of errors. Some of them:
    [h264 @ 00000000006eb980] missing picture in access unit with size 361
    [h264 @ 00000000006eb980] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

  • Caitie

    I put the bin in the right place but I still get the notification that it’s not recognized…

    • Caitie

      wait nvm I got it

    • Caitie

      I got the codecs to load on the cmd but now when I go into a bot to get this to work, I can’t open the bot at all now. What did I do wrong?

  • Stan Cho

    do you know how to install external libary like libass on to windows

  • Pingback: Simulazione con Python: un esempio del profilo di temperatura nel tempo (Parte 3) | Math is in the air()

  • Martin Pfeifer

    Thank you! This is a very good explanation.

  • wawan uwa

    Thanks..Finally i found this. I tried and worked!!!

  • wawan uwa

    can anyone show me how to combine video and image with this tool.

  • someone

    it’s still not recognised… I don’t do that kind of manipulation very often, so I don’t know what’s wrong exactly.

    • someone

      nvm it worked

  • Gabriel Doucet

    https://uploads.disquscdn.com/images/c6ec2e28f576435f38ede03c26e6b705ae534d94a640e1ebf486299a579ee7ba.jpg when i download and extract the files the run command isnt there all i have it this in the folder

  • wcimages

    Just downloaded ffmpeg for windows and am running win 10. When I try and launch the application it briefly flashes on the screen then disappears and will not open

    • It’s not an application as such, it’s a command line program. You use it from a command prompt (Hit Win+R, type cmd and then enter).

  • wcimages

    Thanks, didn’t realize that.

  • Wanwisa Chatpongchuleeporn

    I already installed it. But how do I use it to encode my video?

  • Thor Kongstad Madsen

    i added it to varibles in path in both system and user varibles.
    writing C:ffmpegbinffmpeg.exe -codecs in a lifted cmd gives me what i am looking for, but
    ffmpeg -codecs do not recognise it as an internal or external command,
    operable program or batch file.

    also comparable to the picture of the files on what i should have gotten i seem to be missing the batch file

    i run win 10

    • Try reboot

      • Thor Kongstad Madsen

        did that of cause.
        weird thing is, i need this for making a animation in python and in there it works. just can’t use it in cmd.

  • Pingback: Figure and Animation Visualization in Python – The Using of Matplotlib and Seaborn – DropCoins()

  • luc

    I didn’t get the .bat file after I unzipped it. I did every step except adding to a system path. I added C:ffmpegbin to the end of the variable value under the environment variables. Not sure where I’m going wrong.
    Help please? :)

    • What .bat file? There is no bat file.
      Adding the path to ffmpeg.exe (excluding ffmpeg.exe though, so “C:/ffmpeg/bin”) to your system PATH environment variable is vital, it absolutely won’t work without doing that (unless you want to manually type in the full path to ffmpeg every time you use it). In windows 10 it looks slightly different, I should probably update the screenshots but here you go for now: http://i.imgur.com/GmlUy00.png

  • Pingback: Bài 6: Cài đặt và sử dụng matplotlib – Spidec()

  • Thomas E. Reed

    Would it be possible to print this entire article as a PDF, so we can read it and go through the install steps without having to deal with web browsing? I tried to print it on my system with Adobe Acrobat, and it wound up with all your words turning into Polish, or whatever words Trump creates when he’s on the toilet at 3 AM. That would help greatly. Thanks! https://uploads.disquscdn.com/images/ffbcc14f82bfa00fd2d369e9f1151ca746d13adc96076bb16a51bcc797c7c4f9.png

    • Does the PDF look the same when you open it in chrome?

      • Thomas E. Reed

        You don’t open PDF’s in Chrome. You open them in Adobe Acrobat or Acrobat Reader. I suspect the problem is that a mutant font was used for the text on the web page, one that has no equivalent in a standard computer, and that text is all that the PDF printer could interpret. It might be possible to reverse-engineer the web page by copying all the text into a Notepad document, pasting it together with the photos in some kind of page program like CorelDraw and print it from that, but that’s a lot of work. It would be simpler if you, Mr. Zahl, could print it from your original, using your own PDF printer, and making sure the fonts are included with the PDF document so it can be read and printed out. That’s a simple setting on your PDF-producing software. Or use a nice standard font like Times New Roman in producing the web page, but of course that ship has sailed.
        (Ran into the same situation with a multi-page program book where the font could be included, but when printed, it turned out that the font was prohibited by the font creator from being used in a PDF document. Had to find a similar-looking font to substitute throughout the document at the last minute. A kluge, but it worked. And I will never use that font again.)

        • You can drag a PDF into chrome to display it there. The font hierarchy for this page is: “Open Sans”, “Helvetica Neue”, Helvetica, Arial, “Lucida Grande”, sans-serif – so, Mr Read, either this is some weird bug in an old version of windows, or old version of acrobat, or you have one of those fonts installed already in some incompatible format. Here’s a PDF I printed from chrome, it displays fine for me in both acrobat and chrome: http://adaptivesamples.com/files/How%20to%20Install%20FFmpeg%20on%20Windows%20-%20Adaptive%20Samples.pdf – if it’s still broken for you, right click on the text on this page > Inspect > scroll down the css list and change the font-family to whatever you are more comfortable with and print it then. Alternatively, read the FFMPEG documentation and write your own installation guide.

  • Thomas E. Reed

    And another thing. I have tried to install on my Windows XP machine and my Windows Vista machine, and in both places, when I open up a CMD window and try to type:
    ffmpeg -codecs

    I get the lovely error box below https://uploads.disquscdn.com/images/fa4b251068b33918c0879b999e3d540604b493321841eccda98e5392dc6def09.png . Have searched for a solution on the Web for this statement and there is no clear answer, except that apparently avdemux is also affected. Any suggestions?

    • I would imagine XP and Vista are no longer supported, even microsoft no longer supports XP.

      • Thomas E. Reed

        In that case, should I go back and find an earlier version of ffmpeg where it was still supported? Any idea which version in the archives that would be?I don’t need “the latest and greatest,” just one that works. And I’m never going to change from Vista on my quad core, although my trusty old XP machine may be replaced soon by one using Linux Mint.

  • Santiago Astrobbi Echavarri

    I’ve added the bin folder to the system path, but I’m still receiving the same message (unrecognized…..). What shall I do? Thanks in advance.

    • Try log out and back in, or reboot.