FFmpeg is a free and open-source software project consisting of a suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the command-line FFmpeg tool itself, designed for processing of video and audio files. It is widely used for format transcoding, basic editing (trimming and concatenation), video scaling, video post-production effects, and standards compliance. Wikipedia
FFmpeg is a free and open-source software project consisting of a suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the command-line FFmpeg tool itself, designed for processing of video and audio files. It is widely used for format transcoding, basic editing (trimming and concatenation), video scaling, video post-production effects, and standards compliance.
This year, we’ve been able to delve into a fascinating tool which we’ve not had the opportunity to use before – FFmpeg, an open-source command line tool for capturing and managing video within Claris FileMaker.
A client approached us with their need to take recorded videos from a collection of cameras (which are controlled via API calls from the FileMaker solution), transcode the video files, then merge the videos into a grid for playback. We were up for the challenge and exploration.
Our research into how to tackle this project led us down the path of finding FFmpeg, which provides some interesting capabilities. We were able to use it to transcode the MKV files* from the cameras into MP4 (a more commonly accepted format), which meant writing some thorough interaction with the command line tool in a complex, fault-tolerant way.
In the final analysis it turned out that the project also required more sophisticated video streaming, so we combined functionality from web viewers and FFplay to stream both audio and video from the selected cameras. We’ll dive more into that process in part two of this blog series.
In part three, we’ll cover some specifics of handling the MP4 conversion and video manipulation. And in part four we’ll wrap up with the successes we found with this project plus some lessons learned that we will carry into future work.
These days, there are a number of video cameras that are network-accessible and use cloud storage. Our client wanted to use cameras that are not only network-accessible, but that could be controlled from FileMaker. They also wanted to save and download the recordings to a local device for further video enhancement.
Our first approach was to try using Handbrake to do what the solution needed. Similar to FFmpeg, Handbrake is UI-based open source software for video transcoding that can be called via command line.
After reading through the Handbrake documentation, we discovered that FFmpeg is the core element of Handbrake, so we removed the dependency and went straight to the foundation.
There are a few APIs that could get us close to the result the client wanted, but since part of their target audience includes customers in rural areas with sparse internet coverage, the solution can’t rely on public APIs. FFmpeg allows us to process the files locally, using CLI commands generated from within the FileMaker solution.
Currently, the project is in its final stages of development. Now that we have defined the functions and figured out the transcoding calculations, the FFmpeg functionality has been surprisingly reliable. We discovered that FFmpeg is quite heavy on the CPU, especially with higher resolution videos, so we’ve had to make some adjustments to allow users to turn on/off certain features in order to expedite processing times. We’ll talk more about that, and other scenarios we encountered, in a future post. All-in-all, FFmpeg has been an exciting tool to incorporate into a Claris FileMaker solution.
Keep an eye out for more specifics in the rest of this series:
Matroska video files originated in Russia in 2002, getting their name from the Russian word for nesting dolls, matryoshka.
How-To Geek’s article explains the files are not an audio or video compression format. They are actually multimedia container formats that can incorporate audio, video, and subtitles into a single file—even if those elements use different types of encoding. Designed to be future proof and not become outdated, several key features were included to make such longevity happen.
There are several common applications that create MKV files, such as Adobe Premiere Pro, Final Cut Pro, Sony Vegas, OBS Studio, MakeMKV, Bandicam, Format Factory, VLC, and Freemake.
ChatGPT chimes in to say, “It’s important to note that while MKV is a versatile container format that supports multiple audio, video, and subtitle codecs, it may not be as universally supported as more common formats like MP4. Before sharing or distributing MKV files, ensure that the target devices or platforms can handle this format properly. If compatibility is a concern, you might consider converting MKV files to more widely supported formats.”
Contact us to discuss ways we can assist with your development, or how we can create a solution for your specific situation. We love to use the full capabilities of the Claris FileMaker platform! Our team is also experienced with implementing a variety of integrations to achieve the results your business needs to see.
Joe Ranne is a Senior Application Developer at Portage Bay Solutions. Whether on a bicycle in a remote forest or 10 hours into a solution refactor, he always enjoys a good problem to solve.
Your email address will not be published. Required fields are marked *
Comment *
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Post Comment