


Note that I don’t sanity-check the inputs to be valid such that 99:99:99 will happily be converted but not give you the results you desire. ffmpeg will require that we specify a start timestamp and a duration (in seconds) so I use the following function to do the conversion. Positions within a movie are specified with timestamps of the format HH:MM:SS (hours, minutes, and seconds). When to cut? "Accurate" cutting of exact frames Go get a cup of coffee this’ll take a bit as ffmpeg has lots of parts.

On my Mac the way to get ffmpeg is to install the Homebrew package manager and then brew install ffmpeg. It runs on every major platform and a goodly number of minor ones. The output will be a file called 00_00_00 to 00_01_00.mp4.įfmpeg is an open-source tool able to manipulate pretty much every video format in existence. The output will be a file called 00_00_00 to 00_01_00.mp4.Ĭut a one-minute segment from a longer video. commandĬut a one-minute segment from a longer video (named m.mp4). bash_profile and start a new terminal window. Copy the three code blocks below into your home directory’s. If you don’t want to know what’s going on but just want to be able to use my wrapper scripts, all you need is this section. I’ve wrapped ffmpeg in a bit of code to make it painlessly easy to remember and use. This is how I use a very popular video manipulation tool – ffmpeg – to respond to her requests quickly and easily. Rather than use some time-consuming point-and-click video app I wanted to have a quick command-line way of making her happy in short order. Chats like the one at right are not uncommon. Why am I telling you this? Because I get a lot of requests to slice and dice her Facebook Live videos into one-minute chunks for posting on Instagram. My girlfriend, the crazy cat lady, is a great fan of social media.
