The metadata1.txt file is formatted as below: FFMETADATA1
Although the ffprobe command was also used, it’s fairly simple to understand and should be self-explanatory by examining the code and the help files. The main FFmpeg commands for extracting the metadata and concatenating the audio files are explained below. The batch script also provides options to separately print out audio file metadata, basic data, or stream and container (format) data to screen or to a file in json format (human readable form), with options to change the format in the script.
It was tested with opus, mp3, and aac files on a PC running Windows XP. The provided batch script should work for most audio formats of the same type provided they were encoded using the same codec (although they can be different containers).
Here are links to the basic help file: ffmpeg_help and the full help file: ffmpeg_help_full. To view the commands available in the help files, click the ff-prompt.bat file in the root directory to open a command window or open your own in the bin folder and type in one of the following commands: ffmpeg -h - print basic optionsįfmpeg -h full - print all options (including all format and codec specific options, very long FFmpeg Help FilesįFmpeg provides three levels of help files: basic, long, and full.
Only ffmpeg.exe and ffmprobe.exe are used in this guide. Note that there are a number of commands that are common between the three tools.
Simply download the latest 32 or 64-bit static build from the builds page here and extract it to a folder (builds are compressed in 7z format). The FFmpeg version used for this guide is a Windows complied version availiable from CODEX FFMPEG. While the above example is simple, FFmpeg commands can also be more complex. To demonstrate how easy it can be, provides this example command for converting input.mp4 to output.avi on its homepage: $ ffmpeg -i input.mp4 output.avi Although FFmpeg includes over 100 codecs and a mind-boggling number of possible combined command-line options, it’s not that difficult to use. FFmpeg is compatible with a large number of SW applications and it’s used in many popular SW products such as VLC Media Player, YouTube, and Handbrake. It has since become one of the best-known and most widely used products of its type. First developed under Linux, compiled versions are available for most operating systems and platforms. This guide is related to a previous post for concatenating audio files also with a batch file, but with using a different set of command-line tools for joining them.įFmpeg is an open-source and cross-platform command-line set of SW programs for recording, converting and streaming audio and video. A tested example batch file is provided to help illustrate.
This guide demonstrates how to automate concatenating two or more audio files of the same format using FFmpeg while preserving the metadata in the merged file.