avidemux
Edit and convert video files
SYNOPSIS
avidemux3 [options] [input_file]
avidemux3 --run <script.py>
PARAMETERS
--help
Displays available command-line options and usage information.
--version
Shows the Avidemux version information.
--load <file>
Loads the specified video file for processing. Often used in conjunction with a script.
--run <script.py>
Executes the Python script.py containing Avidemux commands for batch processing. This is the primary method for advanced CLI usage.
--save <file>
Saves the processed video to the specified output file. Typically controlled by the Python script.
--quit
Exits Avidemux after completing all specified tasks, without opening the GUI.
--output-format <format>
Sets the output container format (e.g., MP4, AVI). This option is often overridden or managed by the executed Python script.
DESCRIPTION
Avidemux is a free and open-source video editor designed for simple cutting, filtering, and encoding tasks. While primarily a graphical user interface (GUI) application, it offers robust command-line capabilities, making it ideal for automation, batch processing, and headless server operations.
It supports a wide variety of video, audio, and image formats, including AVI, MP4, DIVX, XVID, MPEG-4 AVC, H.264, and more. Common operations include cutting video segments, re-encoding video/audio with various codecs, applying filters (e.g., deinterlacing, resizing, denoising), and multiplexing/demultiplexing streams.
The command-line interface (CLI) is particularly powerful when used in conjunction with Avidemux's scripting engine, which allows users to define complex processing workflows using Python scripts. This enables repeatable tasks and integration into larger automated pipelines.
CAVEATS
Avidemux is primarily a GUI application. Its command-line interface is powerful but principally designed for scripting and batch processing rather than interactive, direct command-line editing. Complex editing tasks are often easier to prototype in the GUI and then export as a script. The command-line options can be less intuitive compared to dedicated CLI tools like FFmpeg, as much functionality is exposed through the Python scripting engine rather than direct command-line flags.
USING PYTHON SCRIPTS FOR AUTOMATION
The most powerful way to use Avidemux from the command line is by running a Python script. These scripts define a sequence of operations (loading, filtering, encoding, saving) and can be generated directly from the Avidemux GUI (File -> Save project as... or File -> Save script as...) after configuring your desired operations. This allows for precise control over codecs, filters, and output settings, making batch processing highly efficient.
Example of a simple Avidemux Python script (e.g., process_video.py):
adm = Avidemux()
adm.load("/path/to/input.mp4")
adm.addVideoFilter("yadif") # Add a deinterlace filter
adm.setContainer("MP4", "MP4") # Set output container to MP4
adm.save("/path/to/output.mp4")
To execute this script from the command line:avidemux3 --run process_video.py --quit
HISTORY
Avidemux was created by BenoƮt Fouet (known as 'mean') and first released in 2001. It was developed to provide a straightforward, open-source tool for basic video editing, particularly useful for tasks like cutting and encoding videos for specific purposes (e.g., DivX, Xvid). Over time, it has evolved to support a wider range of formats and features, while maintaining its focus on simplicity and efficiency for common video processing tasks. Its robust Python scripting capabilities were added to facilitate automation and batch processing, expanding its utility beyond just a GUI tool.