Skip to main content
Muxers in FFmpeg are responsible for writing container formats by combining multiple streams (video, audio, subtitles) into output files. This reference lists all available muxers for creating output media.

Multimedia Muxers

Common Container Muxers

MuxerFormatExtensionsDescription
matroskaMatroska.mkvMatroska video container
matroska_audioMatroska Audio.mkaMatroska audio-only container
webmWebM.webmWebM container (VP8/VP9/AV1)
mp4MP4.mp4MPEG-4 Part 14 container
movQuickTime.movQuickTime container
ipodiPod MP4.m4v, .m4aiPod-compatible MP4
pspPSP MP4.mp4PlayStation Portable MP4
ismvISMV.ismvMicrosoft Smooth Streaming
f4vF4V.f4vFlash MP4 container
aviAVI.aviAudio Video Interleave
mpegtsMPEG-TS.ts, .m2tsMPEG Transport Stream
mpeg1systemMPEG-1 System.mpgMPEG-1 System Stream
mpeg2vobMPEG-2 VOB.vobDVD Video Object
mpeg1vcdMPEG-1 VCD.mpgVideo CD format
mpeg2svcdMPEG-2 SVCD.mpgSuper Video CD
mpeg2dvdMPEG-2 DVD.mpgDVD-compliant MPEG-2
asfASF.asfAdvanced Systems Format
asf_streamASF Stream.asfASF for streaming
flvFLV.flvFlash Video
oggOgg.ogg, .ogvOgg container
ogvOgg Video.ogvOgg video
ogaOgg Audio.ogaOgg audio
nutNUT.nutNUT container
gxfGXF.gxfGeneral eXchange Format

Professional Muxers

MuxerFormatExtensionsDescription
mxfMXF.mxfMaterial eXchange Format
mxf_d10MXF D-10.mxfSMPTE D-10 MXF
mxf_opatomMXF OP-Atom.mxfMXF Operational Pattern Atom

Video-Only Muxers

MuxerFormatExtensionsDescription
h264H.264.h264, .264Raw H.264/AVC elementary stream
hevcHEVC.hevc, .h265Raw HEVC/H.265 elementary stream
av1AV1.av1AV1 video elementary stream
obuAV1 OBU.obuAV1 Open Bitstream Units
mpeg1videoMPEG-1 Video.m1vMPEG-1 video stream
mpeg2videoMPEG-2 Video.m2vMPEG-2 video stream
m4vM4V.m4vRaw MPEG-4 video
diracDirac.drcDirac video stream
dnxhdDNxHD.dnxhdAvid DNxHD stream
cavsvideoAVS.cavsChinese AVS video
ivfIVF.ivfIndeo Video Format (VP8/VP9)
rawvideoRaw Video.yuv, .rgbUncompressed raw video
mjpegMotion JPEG.mjpegMotion JPEG stream
avs2AVS2.avs2AVS2 video stream
avs3AVS3.avs3AVS3 video stream
evcEVC.evcMPEG-5 EVC stream

Audio-Only Muxers

MuxerFormatExtensionsDescription
mp3MP3.mp3MPEG Audio Layer 3
mp2MP2.mp2MPEG Audio Layer 2
aacAAC.aacAdvanced Audio Coding (ADTS)
adtsADTS.aacAAC with ADTS headers
latmLATM.latmAAC LATM
flacFLAC.flacFree Lossless Audio Codec
wavWAV.wavWaveform Audio File Format
aiffAIFF.aif, .aiffAudio Interchange File Format
opusOpus.opusOpus in Ogg container
ttaTTA.ttaTrue Audio
ac3AC-3.ac3Dolby Digital
ac4AC-4.ac4AC-4 audio
eac3E-AC-3.eac3Dolby Digital Plus
dtsDTS.dtsDTS Coherent Acoustics
mlpMLP.mlpMeridian Lossless Packing
sbcSBC.sbcLow Complexity Subband Codec
amrAMR.amrAdaptive Multi-Rate
auAU.auSun/NeXT audio
cafCAF.cafCore Audio Format
gsmGSM.gsmGSM audio
ilbciLBC.lbcInternet Low Bitrate Codec
ircamIRCAM.sfBerkeley/IRCAM/CARL audio

PCM Muxers

MuxerFormatExtensionsDescription
pcm_s16lePCM.sw16-bit signed LE PCM
pcm_s16bePCM.sb16-bit signed BE PCM
pcm_s24lePCM.s24le24-bit signed LE PCM
pcm_s24bePCM.s24be24-bit signed BE PCM
pcm_s32lePCM.s32le32-bit signed LE PCM
pcm_s32bePCM.s32be32-bit signed BE PCM
pcm_f32lePCM.f32le32-bit float LE PCM
pcm_f32bePCM.f32be32-bit float BE PCM
pcm_f64lePCM.f64le64-bit float LE PCM
pcm_f64bePCM.f64be64-bit float BE PCM
pcm_alawA-law.alA-law compressed PCM
pcm_mulawμ-law.ulμ-law compressed PCM
pcm_vidcVIDC.vidcArchimedes VIDC PCM

Streaming Muxers

MuxerFormatDescription
hlsHLSHTTP Live Streaming (Apple)
dashDASHDynamic Adaptive Streaming over HTTP
rtpRTPReal-time Transport Protocol
rtp_mpegtsRTP MPEG-TSMPEG-TS over RTP
rtspRTSPReal-Time Streaming Protocol
sapSAPSession Announcement Protocol
smoothstreamingSmooth StreamingMicrosoft Smooth Streaming
segmentSegmentSegment muxer
stream_segmentStream SegmentStreaming segment muxer
hdsHDSHTTP Dynamic Streaming (Adobe)

Image Sequence Muxers

MuxerFormatExtensionsDescription
image2Image SequencevariousGeneric image sequence writer
image2pipeImage PipevariousImage sequence to pipe
apngAPNG.pngAnimated PNG
gifGIF.gifGraphics Interchange Format

Subtitle Muxers

MuxerFormatExtensionsDescription
srtSubRip.srtSubRip text subtitles
assASS/SSA.assAdvanced SubStation Alpha
webvttWebVTT.vttWeb Video Text Tracks
jacosubJACOsub.jssJACOsub format
microdvdMicroDVD.subMicroDVD format
sccSCC.sccScenarist Closed Caption
mccMCC.mccMacCaption format
lrcLRC.lrcLRC lyrics format

Special Purpose Muxers

Metadata & Testing

MuxerPurposeOutputDescription
nullNullnoneDiscard output (testing)
crcCRC.crcCRC checksum
framecrcFrame CRC.crcPer-frame CRC checksums
md5MD5.md5MD5 hash
framemd5Frame MD5.md5Per-frame MD5 hashes
hashHash.hashGeneric hash output
framehashFrame Hash.hashPer-frame hash output
ffmetadataMetadata.txtFFmpeg metadata format
dataRaw Data.dataArbitrary data muxer
fifoFIFOvariousFIFO queue muxer

Specialized Muxers

MuxerFormatExtensionsDescription
a64Commodore 64.a64Commodore 64 video
adxADX.adxCRI ADX audio
apmAPM.apmUbisoft APM audio
aptxaptX.aptxaptX Bluetooth audio
aptx_hdaptX HD.aptxaptX HD Bluetooth audio
argo_asfArgo ASF.asfArgonaut ASF
argo_cvgArgo CVG.cvgArgonaut CVG
astAST.astAST audio
avifAVIF.avifAV1 Image File Format
avm2AVM2.swfFlash 9 AVM2
bitBitmap.bitG.729 BIT file
codec2Codec2.c2Codec2 audio
codec2rawCodec2 Raw.c2Raw Codec2
dfpwmDFPWM.dfpwmDFPWM1a audio
dvDV.dvDigital Video
filmstripFilmstrip.flmAdobe Filmstrip
fitsFITS.fitsFlexible Image Transport
g722G.722.g722ITU G.722 audio
g723_1G.723.1.g723_1ITU G.723.1 audio
g726G.726.g726ITU G.726 audio
g726leG.726 LE.g726G.726 little-endian
icoICO.icoWindows Icon
iamfIAMF.iamfImmersive Audio Model
kvagKVAG.kvagSimon & Schuster KVAG
lc3LC3.lc3LC3 Bluetooth audio
roqRoQ.roqid Software RoQ
rsoRSO.rsoLego Mindstorms RSO
soxSoX.soxSoX native audio
spdifS/PDIF.spdifIEC 61937 encapsulation
swfSWF.swfFlash (SWF)
teeTeevariousMultiple output wrapper
uncodedframecrcUncoded CRC.crcUncoded frame CRC

Usage Examples

Basic Muxing

# Convert container format
ffmpeg -i input.avi -c copy output.mkv

# Specify output format explicitly
ffmpeg -i input.avi -f mp4 output.mp4

# Multiple audio streams
ffmpeg -i video.mp4 -i audio1.aac -i audio2.aac -c copy -map 0:v -map 1:a -map 2:a output.mkv

Format-Specific Options

# MP4 with fast start (web optimization)
ffmpeg -i input.mkv -c copy -movflags +faststart output.mp4

# MP4 with fragmentation
ffmpeg -i input.mkv -c copy -movflags +frag_keyframe+empty_moov output.mp4

# Matroska with specific codec tags
ffmpeg -i input.mp4 -c copy -codec_tag:v hvc1 output.mkv

# AVI with specific fourcc
ffmpeg -i input.mp4 -c copy -vtag xvid output.avi

Streaming Output

# HLS streaming
ffmpeg -i input.mp4 -c copy -f hls -hls_time 10 -hls_list_size 0 playlist.m3u8

# DASH streaming
ffmpeg -i input.mp4 -c copy -f dash -seg_duration 10 manifest.mpd

# RTP streaming
ffmpeg -i input.mp4 -c copy -f rtp rtp://239.0.0.1:5004

# Multiple outputs with tee muxer
ffmpeg -i input.mp4 -c copy -f tee "[f=mp4]output.mp4|[f=mkv]output.mkv"

Image Sequence Output

# Extract frames to PNG
ffmpeg -i input.mp4 -f image2 frame%04d.png

# Extract frames at specific rate
ffmpeg -i input.mp4 -vf fps=1 -f image2 frame%04d.jpg

# Create animated PNG
ffmpeg -i input.mp4 -f apng output.png

# Create GIF
ffmpeg -i input.mp4 -f gif output.gif

Quality & Testing

# Generate CRC for verification
ffmpeg -i input.mp4 -f framecrc output.crc

# Generate MD5 hash
ffmpeg -i input.mp4 -f md5 output.md5

# Null output (for testing encoding speed)
ffmpeg -i input.mp4 -c:v libx264 -f null -

Advanced Muxing Options

# Set container metadata
ffmpeg -i input.mp4 -c copy -metadata title="My Video" -metadata artist="Creator" output.mkv

# Add chapters
ffmpeg -i input.mp4 -i chapters.txt -c copy -map_chapters 1 output.mkv

# Custom stream metadata
ffmpeg -i input.mp4 -c copy -metadata:s:a:0 language=eng -metadata:s:a:1 language=spa output.mkv

# Set disposition
ffmpeg -i input.mkv -c copy -disposition:a:0 default output.mkv

HLS Muxer Options

# Basic HLS
ffmpeg -i input.mp4 -c copy -f hls output.m3u8

# Custom segment duration
ffmpeg -i input.mp4 -c copy -f hls -hls_time 6 output.m3u8

# Keep all segments
ffmpeg -i input.mp4 -c copy -f hls -hls_list_size 0 output.m3u8

# Custom segment naming
ffmpeg -i input.mp4 -c copy -f hls -hls_segment_filename 'segment_%03d.ts' output.m3u8

# Generate separate playlists
ffmpeg -i input.mp4 -c copy -f hls -master_pl_name master.m3u8 output.m3u8

DASH Muxer Options

# Basic DASH
ffmpeg -i input.mp4 -c copy -f dash output.mpd

# Custom segment duration
ffmpeg -i input.mp4 -c copy -f dash -seg_duration 5 output.mpd

# Custom initialization segment
ffmpeg -i input.mp4 -c copy -f dash -init_seg_name init-\$RepresentationID\$.m4s output.mpd

# Enable single file mode
ffmpeg -i input.mp4 -c copy -f dash -single_file 1 output.mpd

Segment Muxer Options

# Segment video by time
ffmpeg -i input.mp4 -c copy -f segment -segment_time 60 output%03d.mp4

# Segment at keyframes
ffmpeg -i input.mp4 -c copy -f segment -segment_time 60 -force_key_frames "expr:gte(t,n_forced*60)" output%03d.mp4

# Segment with list
ffmpeg -i input.mp4 -c copy -f segment -segment_list segments.txt output%03d.mp4

# Custom segment format
ffmpeg -i input.mp4 -c copy -f segment -segment_format mpegts output%03d.ts

MP4 Muxer Options

# Fast start for web
ffmpeg -i input.mkv -c copy -movflags +faststart output.mp4

# Fragment for streaming
ffmpeg -i input.mkv -c copy -movflags +frag_keyframe+empty_moov output.mp4

# Separate MOOF (for DASH/HLS)
ffmpeg -i input.mkv -c copy -movflags +frag_keyframe+separate_moof+default_base_moof output.mp4

# Write ISML manifest
ffmpeg -i input.mkv -c copy -movflags +isml+frag_keyframe output.mp4

Troubleshooting

# Force format when extension doesn't match
ffmpeg -i input.avi -c copy -f matroska output.file

# Fix container without re-encoding
ffmpeg -i broken.mp4 -c copy -f mp4 fixed.mp4

# Interleave properly for streaming
ffmpeg -i input.mkv -c copy -max_interleave_delta 0 output.mp4

# Set explicit codec tags
ffmpeg -i input.mp4 -c copy -tag:v hvc1 output.mp4

See Also

Build docs developers (and LLMs) love