man > ffmpeg-formats(1)

📛 NAME

ffmpeg-formats - FFmpeg formats

🚀 Quick Reference

Use CaseCommandDescription
List available demuxersffmpeg -demuxersDisplays list of enabled demuxers
List available muxersffmpeg -muxersDisplays list of enabled muxers
Extract metadata to fileffmpeg -i INPUT -f ffmetadata FFMETADATAFILEDumps metadata into INI-like text file
Reinsert edited metadataffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUTApplies modified metadata from file
Compute CRC of inputffmpeg -i INPUT -f crc out.crcPrints Adler-32 CRC of all frames
Compute MD5 hashffmpeg -i INPUT -f md5 out.md5Prints MD5 hash of all frames
HLS segmentationffmpeg -i in.mkv -c:v h264 -flags +cgop -g 30 -hls_time 1 out.m3u8Creates HLS playlist and segments
DASH segmentationffmpeg -re -i <input> -map 0 -map 0 -c:a libfdk_aac -c:v libx264 ... -f dash /path/to/out.mpdCreates MPEG-DASH manifest and segments
Segment input by timeffmpeg -i in.mkv -codec copy -f segment -segment_time 10 out%03d.nutSplits into fixed-duration segments
Stream to multiple outputsffmpeg -i ... -f tee "archive.mkv|[f=mpegts]udp://..."Encodes once, writes to several destinations

📖 DESCRIPTION

This document describes the supported formats (muxers and demuxers) provided by the libavformat library.

⚙️ FORMAT OPTIONS

The libavformat library provides some generic global options, which can be set on all the muxers and demuxers. In addition each muxer or demuxer may support so-called private options, which are specific for that component.

Options may be set by specifying -option value in the FFmpeg tools, or by setting the value explicitly in the "AVFormatContext" options or using the libavutil/opt.h API for programmatic use.

The list of supported options follows:

🔍 Format stream specifiers

Format stream specifiers allow selection of one or more streams that match specific properties. Defined by avformat_match_stream_specifier() in libavformat/avformat.h and documented in the Stream specifiers section in the ffmpeg(1) manual.

🎬 DEMUXERS

Demuxers are configured elements in FFmpeg that can read multimedia streams from a particular type of file. All supported demuxers are enabled by default. Use --list-demuxers to list them. Use --disable-demuxers and --enable-demuxer=DEMUXER to configure.

The option -demuxers displays enabled demuxers; -formats shows combined list.

🔊 aa

Audible Format 2, 3, and 4 demuxer. Used to demux .aa files.

🖼️ apng

Animated Portable Network Graphics demuxer. All headers up to first fcTL chunk are extradata. Frames are chunks between fcTL or between last fcTL and IEND.

🎥 asf

Advanced Systems Format demuxer. Used for ASF files and MMS network streams.

🔗 concat

Virtual concatenation script demuxer. Reads a list of files and directives from a text file and demuxes them sequentially.

Syntax: Script is extended-ASCII, one directive per line. Empty lines and lines starting with '#' are ignored.

Options:

Examples:

# my first filename
file /mnt/share/file-1.wav
# my second filename including whitespace
file '/mnt/share/file 2.wav'
# my third filename including whitespace plus single quote
file '/mnt/share/file 3'\''.wav'
ffconcat version 1.0

file file-1.wav
duration 20.0

file subdir/file-2.wav

📡 dash

Dynamic Adaptive Streaming over HTTP demuxer. Presents all AVStreams from manifest. Each stream has "id" and "variant_bitrate" metadata keys.

📺 flv, live_flv

Adobe Flash Video Format demuxer. Use live_flv for live streams to survive timestamp discontinuities.

ffmpeg -f flv -i myfile.flv ...
ffmpeg -f live_flv -i rtmp://<any.server>/anything/key ....

🎞️ gif

Animated GIF demuxer.

Example with overlay:

ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv

📱 hls

Apple HTTP Live Streaming demuxer. Presents all AVStreams from variant streams. The "id" field is bitrate variant index. Metadata key "variant_bitrate" available.

🖼️ image2

Image file demuxer. Reads from a list of image files specified by a pattern. All images must have same size, pixel format, and format.

Examples:

ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv

🎮 libgme

Game Music Emu library demuxer. See https://bitbucket.org/mpyne/game-music-emu/overview.

🎵 libmodplug

ModPlug based module demuxer. See https://github.com/Konstanty/libmodplug. Exports 2-channel 16-bit 44.1 kHz audio. Optionally a "pal8" 16-color video stream.

🎶 libopenmpt

libopenmpt based module demuxer. See https://lib.openmpt.org/libopenmpt/.

📦 mov/mp4/3gp

Demuxer for Quicktime File Format & ISO/IEC Base Media File Format. Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v.

Audible AAX example:

ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4

📡 mpegts

MPEG-2 transport stream demuxer.

📷 mpjpeg

MJPEG encapsulated in multi-part MIME demuxer.

🎬 rawvideo

Raw video demuxer. User must specify video parameters.

Example:

ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw

🧠 sbg

SBaGen script demuxer. Reads SBG script for binaural beats. See http://uazu.net/sbagen/.

📝 tedcaptions

JSON captions for TED talks. See http://www.ted.com/. Bookmarklet in tools/bookmarklets.html.

Example:

ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt

🔮 vapoursynth

Vapoursynth wrapper. Input format must be forced with -f vapoursynth.

🎞️ MUXERS

Muxers allow writing multimedia streams to a particular file type. All supported muxers are enabled by default. Use --list-muxers. Configure with --disable-muxers and --enable-muxer=MUXER.

🔊 aiff

Audio Interchange File Format muxer.

🎥 asf (also wma, wmv)

Advanced Systems Format muxer.

🎬 avi

Audio Video Interleaved muxer.

🔍 chromaprint

Chromaprint fingerprinter. See https://acoustid.org/chromaprint. Takes single signed 16-bit raw audio stream, max 2 channels.

🔢 crc

CRC testing format. Computes Adler-32 CRC of all input frames.

Output: CRC=0xCRC

Examples:

ffmpeg -i INPUT -f crc out.crc
ffmpeg -i INPUT -f crc -
ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc -

📺 flv

Adobe Flash Video Format muxer.

📡 dash

Dynamic Adaptive Streaming over HTTP (DASH) muxer. Creates MPD manifest and segment files according to ISO/IEC 23009-1:2014.

Example command:

ffmpeg -re -i <input> -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \
-b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline \
-profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
-b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 \
-window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \
-f dash /path/to/out.mpd

🔢 framecrc

Per-packet CRC testing format. Outputs line per packet: <stream_index>, <packet_dts>, <packet_pts>, <packet_duration>, <packet_size>, 0x<CRC>

Examples:

ffmpeg -i INPUT -f framecrc out.crc
ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc -

🔢 framehash

Per-packet hash testing format. Outputs line per packet: <stream_index>, <packet_dts>, <packet_pts>, <packet_duration>, <packet_size>, <hash>

Example:

ffmpeg -i INPUT -f framehash out.sha256

🔢 framemd5

Per-packet MD5 testing format. Defaults to MD5.

ffmpeg -i INPUT -f framemd5 out.md5

🎞️ gif

Animated GIF muxer.

Example:

ffmpeg -i INPUT -loop 10 -final_delay 500 out.gif

Note: To extract frames as separate GIF files, use image2 muxer:

ffmpeg -i INPUT -c:v gif -f image2 "out%d.gif"

🔢 hash

Hash testing format. Outputs single line: algo=hash

Examples:

ffmpeg -i INPUT -f hash out.sha256
ffmpeg -i INPUT -f hash -hash md5 -

📱 hls

Apple HTTP Live Streaming muxer. Segments MPEG-TS according to HLS specification.

Basic example:

ffmpeg -i in.mkv -c:v h264 -flags +cgop -g 30 -hls_time 1 out.m3u8

🖼️ ico

ICO file muxer. Microsoft icon file format. Limitations: size ≤256 pixels, only BMP or PNG images. BMP must use BITMAPINFOHEADER and specific pixel formats.

🖼️ image2

Image file muxer. Writes video frames to image files using pattern.

Examples:

ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg'
ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg'
ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg
ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg"
ffmpeg -f v4l2 -r 1 -i /dev/video0 -copyts -f image2 -frame_pts true %d.jpg
ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts method=PUT http://example.com/desktop.jpg

📦 matroska

Matroska container muxer (also webm).

Metadata:

Options:

Example 3D WebM:

ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm

🔢 md5

MD5 testing format. Variant of hash muxer defaulting to MD5.

ffmpeg -i INPUT -f md5 out.md5
ffmpeg -i INPUT -f md5 -

📦 mov, mp4, ismv

MOV/MP4/ISMV (Smooth Streaming) muxer. Supports fragmentation.

Smooth Streaming example:

ffmpeg -re <<normal input/transcoding options>> -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)

🎵 mp3

Raw MP3 stream muxer with optional ID3v2 header, Xing/LAME frame, and ID3v1 footer.

Examples:

ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3
ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
ffmpeg -i input.wav -write_xing 0 -id3v2_version 0 out.mp3

📡 mpegts

MPEG transport stream muxer. Implements ISO 13818-1 and ETSI EN 300 468.

Example:

ffmpeg -i file.mpg -c copy \
-mpegts_original_network_id 0x1122 \
-mpegts_transport_stream_id 0x3344 \
-mpegts_service_id 0x5566 \
-mpegts_pmt_start_pid 0x1500 \
-mpegts_start_pid 0x150 \
-metadata service_provider="Some provider" \
-metadata service_name="Some Channel" \
out.ts

📦 mxf, mxf_d10, mxf_opatom

MXF muxer.

❌ null

Null muxer. No output file, useful for testing/benchmarking.

ffmpeg -benchmark -i INPUT -f null out.null
ffmpeg -benchmark -i INPUT -f null -

🥜 nut

Example:

ffmpeg -i INPUT -f_strict experimental -syncpoints none - | processor

🎵 ogg

Ogg container muxer.

📄 segment, stream_segment, ssegment

Basic stream segmenter. Outputs separate files of nearly fixed duration.

Examples:

ffmpeg -i in.mkv -codec hevc -flags +cgop -g 60 -map 0 -f segment -segment_list out.list out%03d.nut
ffmpeg -i in.mkv -f segment -segment_time 10 -segment_format_options movflags=+faststart out%03d.mp4
ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 out%03d.nut
ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 -segment_time_delta 0.05 out%03d.nut
ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut
ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a aac -f ssegment -segment_list out.list out%03d.ts
ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 out%03d.mkv

📡 smoothstreaming

Smooth Streaming muxer. Generates Manifest and chunks for web server.

🔢 streamhash

Per stream hash testing format. Outputs line per stream: streamindex,streamtype,algo=hash

Example:

ffmpeg -i INPUT -f streamhash out.sha256
ffmpeg -i INPUT -f streamhash -hash md5 -

📦 fifo

Fifo pseudo-muxer. Separates encoding and muxing using a queue in a separate thread.

Example:

ffmpeg -re -i ... -c:v libx264 -c:a aac -f fifo -fifo_format flv -map 0:v -map 0:a \
-drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 rtmp://example.com/live/stream_name

📦 tee

Tee muxer. Writes same data to several outputs. Encodes only once.

Examples:

ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
  "archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
  "[>
ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac
  -f tee "[bsfs/v=dump_extra=freq=keyframe]out.ts|[movflags=+faststart]out.mp4|[select=a]out.aac"

📡 webm_dash_manifest

WebM DASH Manifest muxer. Generates DASH manifest XML for WebM streams.

Example:

ffmpeg -f webm_dash_manifest -i video1.webm \
-f webm_dash_manifest -i video2.webm \
-f webm_dash_manifest -i audio1.webm \
-f webm_dash_manifest -i audio2.webm \
-map 0 -map 1 -map 2 -map 3 \
-c copy \
-f webm_dash_manifest \
-adaptation_sets "id=0,streams=0,1 id=1,streams=2,3" \
manifest.xml

📡 webm_chunk

WebM Live Chunk Muxer. Writes separate WebM headers and chunks for DASH.

Example:

ffmpeg -f v4l2 -i /dev/video0 \
-f alsa -i hw:0 \
-map 0:0 \
-c:v libvpx-vp9 \
-s 640x360 -keyint_min 30 -g 30 \
-f webm_chunk \
-header webm_live_video_360.hdr \
-chunk_start_index 1 \
webm_live_video_360_%d.chk \
-map 1:0 \
-c:a libvorbis \
-b:a 128k \
-f webm_chunk \
-header webm_live_audio_128.hdr \
-chunk_start_index 1 \
-audio_chunk_duration 1000 \
webm_live_audio_128_%d.chk

🏷️ METADATA

FFmpeg can dump metadata from media files into a simple UTF-8-encoded INI-like text file using the metadata muxer/demuxer.

File format:

  1. Header: ;FFMETADATA followed by version number (now 1).
  2. Metadata tags: key=value
  3. After header: global metadata
  4. Sections with per-stream/per-chapter metadata.
  5. Section starts with uppercase name in brackets ([, ]).
  6. Chapter section may have TIMEBASE=num/den and START=num, END=num.
  7. Empty lines and lines starting with ; or # are ignored.
  8. Special characters must be escaped with backslash.
  9. Whitespace is part of the tag.

Example:

;FFMETADATA1
title=bike\\shed
;this is a comment
artist=FFmpeg troll team

[CHAPTER]
TIMEBASE=1/1000
START=0
#chapter ends at 0:01:00
END=60000
title=chapter \#1
[STREAM]
title=multi\
line

Extract metadata:

ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE

Reinsert edited metadata:

ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT

📚 SEE ALSO

ffmpeg(1), ffplay(1), ffprobe(1), libavformat(3)

👥 AUTHORS

The FFmpeg developers. For details, see the Git history at git://source.ffmpeg.org/ffmpeg or http://source.ffmpeg.org. Maintainers are listed in the MAINTAINERS file.

ffmpeg-formats(1)
📛 NAME 🚀 Quick Reference 📖 DESCRIPTION ⚙️ FORMAT OPTIONS 🎬 DEMUXERS 🎞️ MUXERS 🏷️ METADATA 📚 SEE ALSO 👥 AUTHORS

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-04 14:17 @216.73.216.128
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^