Using FFmpeg as an Animation Conversion Command Line Tool

Editing maps and doing data analysis, that’s my thing! But when it comes to video editing, I’m a bit out of my league. In addition to that, I have no expensive software that will make things look cool and fun. Or at least I thought I didn’t.

FFmpeg is “a complete, cross-platform solution to record, convert and stream audio and video.” You can download it here. This tool is limitless when it comes to production.

So, working with the time series images that I created from the precipitation data and working with FFmpeg, I was able to create an animation!

You’ll be working in command line window so you need to know where that lives. For me and my Windows 10 computer, it lives here … “C:\Windows\WinSxS\amd64_microsoft-windows-explorer-shortcuts_31bf3856ad364e35_10.0.10586.0_none_443d824ebb4341e2\01 – Command Prompt.lnk” but it may be easier just hitting the windows start button and typing command prompt.

ffmpeg -framerate 24 -i Rplot_%04d.png output.mp4

My images were named Rplot_0001.png. If your image was named img_001.jpeg you would refer to your image as img%03d.jpeg. That took me a few minutes to figure out but after I hit enter, I had a time series precipitation video. I wasn’t very specific in my frame rate but you can be. I received a lot of help from this FFmpeg wiki.

imagestovideo

Leave a Reply