Ffmpeg

From Pulsed Media Wiki
Revision as of 12:30, 21 April 2025 by Gallogeta (talk | contribs) (Created page with "== FFmpeg == '''FFmpeg''' is a free and open-source software suite for handling multimedia data. It is widely used for recording, converting, streaming, and processing audio...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FFmpeg

FFmpeg is a free and open-source software suite for handling multimedia data. It is widely used for recording, converting, streaming, and processing audio and video content. FFmpeg supports a vast range of codecs, formats, and filters, making it one of the most powerful and versatile tools in multimedia production and post-processing.

The project was started in 2000 by Fabrice Bellard and is actively maintained by a global community of developers. FFmpeg is available on most major platforms, including Linux, Windows, and macOS.

Features

  • **Format conversion** – Convert between nearly all audio and video formats (e.g., MP4, MKV, AVI, MOV, MP3, FLAC, etc.).
  • **Codec support** – Built-in support for popular video/audio codecs like H.264, H.265 (HEVC), VP9, AV1, AAC, MP3, Opus, and more.
  • **Streaming** – Transmit live audio and video over protocols like RTMP, RTP, HTTP, HLS, and DASH.
  • **Transcoding** – Compress or re-encode media to reduce file size or match device requirements.
  • **Filtering** – Apply visual filters, effects, cropping, scaling, subtitles, watermarks, and more.
  • **Recording** – Capture video from webcams, screens, or network streams.
  • **Metadata editing** – View and modify media file metadata.
  • **Batch processing** – Automate media processing tasks via scripts or cron jobs.

Command-Line Syntax

FFmpeg operates via the command line. A basic conversion command:

<syntaxhighlight lang="bash"> ffmpeg -i input.mp4 output.avi </syntaxhighlight>

This command converts an MP4 video to AVI format using default codecs.

Extract audio from a video:

<syntaxhighlight lang="bash"> ffmpeg -i input.mp4 -vn -acodec copy audio.aac </syntaxhighlight>

Resize a video:

<syntaxhighlight lang="bash"> ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4 </syntaxhighlight>

Convert video to H.265 with CRF quality control:

<syntaxhighlight lang="bash"> ffmpeg -i input.mp4 -c:v libx265 -crf 28 output.mp4 </syntaxhighlight>

Use Cases

  • Encoding media for streaming platforms
  • Compressing large video files
  • Converting between file types
  • Editing or trimming media content
  • Embedding subtitles or watermarks
  • Processing surveillance or dashcam footage
  • Automating media workflows in seedboxes and servers

Integration

FFmpeg is often integrated into other software and platforms, including:

Licensing

FFmpeg is primarily licensed under the LGPLv2.1 or GPLv2, depending on compilation options and external libraries included.

See Also