Difference between revisions of "Ffmpeg"
(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...") |
|||
Line 20: | Line 20: | ||
FFmpeg operates via the command line. A basic conversion command: | FFmpeg operates via the command line. A basic conversion command: | ||
− | + | ||
− | ffmpeg -i input.mp4 output.avi | + | ffmpeg -i input.mp4 output.avi |
− | + | ||
This command converts an MP4 video to AVI format using default codecs. | This command converts an MP4 video to AVI format using default codecs. | ||
Line 28: | Line 28: | ||
Extract audio from a video: | Extract audio from a video: | ||
− | + | ||
− | ffmpeg -i input.mp4 -vn -acodec copy audio.aac | + | ffmpeg -i input.mp4 -vn -acodec copy audio.aac |
− | + | ||
Resize a video: | Resize a video: | ||
− | + | ||
− | ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4 | + | ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4 |
− | + | ||
Convert video to H.265 with CRF quality control: | Convert video to H.265 with CRF quality control: | ||
− | + | ||
− | ffmpeg -i input.mp4 -c:v libx265 -crf 28 output.mp4 | + | ffmpeg -i input.mp4 -c:v libx265 -crf 28 output.mp4 |
− | + | ||
=== Use Cases === | === Use Cases === | ||
Line 71: | Line 71: | ||
* [[Multimedia]] | * [[Multimedia]] | ||
− | |||
− | |||
− | |||
− | |||
* [[Command-line interface]] | * [[Command-line interface]] | ||
* [[Jellyfin]] | * [[Jellyfin]] | ||
* [[Plex]] | * [[Plex]] |
Latest revision as of 14:00, 19 May 2025
Contents
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:
ffmpeg -i input.mp4 output.avi
This command converts an MP4 video to AVI format using default codecs.
Extract audio from a video:
ffmpeg -i input.mp4 -vn -acodec copy audio.aac
Resize a video:
ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4
Convert video to H.265 with CRF quality control:
ffmpeg -i input.mp4 -c:v libx265 -crf 28 output.mp4
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:
- OBS Studio (for live streaming)
- VLC media player (internal decoding/encoding)
- HandBrake (video conversion GUI)
- Media servers like Jellyfin, Plex, and Emby
- Server automation and seedboxes (e.g., for transcoding, preview generation)
Licensing
FFmpeg is primarily licensed under the LGPLv2.1 or GPLv2, depending on compilation options and external libraries included.