Skip to main content
Demuxers in FFmpeg are responsible for reading container formats and extracting individual streams (video, audio, subtitles). This reference lists all available demuxers for processing input media.

Multimedia Demuxers

Common Container Demuxers

DemuxerFormatExtensionsDescription
matroskaMatroska.mkv, .mka, .mk3d, .webmMatroska and WebM container
movQuickTime/MP4.mov, .mp4, .m4a, .m4vQuickTime and MPEG-4 formats
aviAVI.aviAudio Video Interleave
mpegtsMPEG-TS.ts, .m2ts, .mtsMPEG Transport Stream
mpegpsMPEG-PS.mpg, .mpeg, .vob, .psMPEG Program Stream
asfASF/WMV.asf, .wmv, .wmaAdvanced Systems Format
flvFLV.flvFlash Video
oggOgg.ogg, .ogv, .oga, .ogxOgg container
nutNUT.nutNUT container
mxfMXF.mxfMaterial eXchange Format
gxfGXF.gxfGeneral eXchange Format

Video-Specific Demuxers

DemuxerFormatExtensionsDescription
h264H.264.h264, .264, .avcRaw H.264/AVC elementary stream
hevcHEVC.hevc, .h265, .265Raw HEVC/H.265 elementary stream
av1AV1.av1AV1 video elementary stream
mpegvideoMPEG Video.m1v, .m2vMPEG-1/2 video stream
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.mjpeg, .mjpgMotion JPEG stream

Audio-Specific Demuxers

DemuxerFormatExtensionsDescription
mp3MP3.mp3MPEG Audio Layer 3
aacAAC.aacAdvanced Audio Coding (ADTS)
flacFLAC.flacFree Lossless Audio Codec
wavWAV.wavWaveform Audio File Format
aiffAIFF.aif, .aiffAudio Interchange File Format
oggOgg.ogg, .ogaOgg Vorbis/Opus/FLAC
apeAPE.apeMonkey’s Audio
ttaTTA.ttaTrue Audio
ac3AC-3.ac3Dolby Digital
eac3E-AC-3.eac3Dolby Digital Plus
dtsDTS.dts, .dtshdDTS Coherent Acoustics
mlpMLP.mlpMeridian Lossless Packing
truehdTrueHD.thd, .truehdDolby TrueHD
amrAMR.amrAdaptive Multi-Rate
opusOpus.opusOpus in Ogg

Streaming Demuxers

DemuxerProtocolDescription
hlsHLSHTTP Live Streaming (Apple)
dashDASHDynamic Adaptive Streaming over HTTP
rtspRTSPReal-Time Streaming Protocol
rtpRTPReal-time Transport Protocol
rtmpRTMPReal-Time Messaging Protocol
srtSRTSecure Reliable Transport
httpHTTPHTTP streaming
udpUDPUDP streaming
tcpTCPTCP streaming

Subtitle Demuxers

DemuxerFormatExtensionsDescription
srtSubRip.srtSubRip text subtitles
assASS/SSA.ass, .ssaAdvanced SubStation Alpha
webvttWebVTT.vttWeb Video Text Tracks
microdvdMicroDVD.subMicroDVD subtitle format
jacosubJACOsub.jssJACOsub format
samiSAMI.smiSynchronized Accessible Media
realtextRealText.rtRealMedia text subtitles
subviewerSubViewer.subSubViewer format
sccSCC.sccScenarist Closed Caption
mccMCC.mccMacCaption format

Image Sequence Demuxers

DemuxerFormatDescription
image2Image SequenceGeneric image sequence reader
apngAPNGAnimated PNG
gifGIFGraphics Interchange Format
image2pipeImage PipeImage sequence from pipe
jpegxl_animJPEG XLAnimated JPEG XL

Professional Format Demuxers

DemuxerFormatExtensionsDescription
mxfMXF.mxfMaterial eXchange Format
gxfGXF.gxfGeneral eXchange Format
lxfLXF.lxfLeitch/Harris eXchange Format
imfIMF.mxfInteroperable Master Format
mxgMXG.mxgMXG video format

Game Format Demuxers

DemuxerFormatExtensionsDescription
binkBink.bik, .bk2RAD Game Tools Bink video
smackerSmacker.smkRAD Game Tools Smacker
roqRoQ.roqid Software RoQ format
ipmovieInterplay.mveInterplay MVE video
c93C93.c93Interplay C93
fourxm4XM.4xm4X Technologies format
wc3movieWC3.mveWing Commander III
vmdVMD.vmdSierra VMD
bethsoftvidBethesda VID.vidBethesda VID format
hnmHNM.hnmCryo HNM video

Special Purpose Demuxers

Metadata & Analysis

DemuxerPurposeDescription
ffmetadataMetadataFFmpeg metadata format
concatConcatenationConcatenation script demuxer
dataRaw DataArbitrary data demuxer

Audio Processing

DemuxerFormatDescription
pcm_s16lePCM16-bit signed little-endian PCM
pcm_s24lePCM24-bit signed little-endian PCM
pcm_f32lePCM32-bit float little-endian PCM
pcm_alawA-lawA-law compressed PCM
pcm_mulawμ-lawμ-law compressed PCM

Legacy & Specialized

DemuxerFormatExtensionsDescription
3dostr3DO.str3DO STR format
aaAudible AA.aaAudible AA audiobook
aaxAudible AAX.aaxAudible Enhanced audiobook
acmACM.acmInterplay ACM audio
actACT.actACT Voice format
adfADF.adfArtworx Data Format
adpADP.adpPS2 ADP audio
adsADS.adsSony ADS audio
aeaAEA.aeaMD Studio audio
afcAFC.afcNintendo AFC audio
aixAIX.aixCRI AIX audio
anmANM.anmDeluxe Paint Animation
apcAPC.apcCRYO APC audio
aqtitleAQTitle.aqtAQTitle subtitles

Usage Examples

Listing Available Demuxers

# List all demuxers
ffmpeg -demuxers

# Get detailed help for a specific demuxer
ffmpeg -h demuxer=matroska
ffmpeg -h demuxer=mp4

Forcing Specific Demuxers

# Force format detection
ffmpeg -f matroska -i input.file output.mp4

# Read raw video with specific parameters
ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -r 30 -i input.yuv output.mp4

# Read image sequence
ffmpeg -f image2 -i frame%04d.png output.mp4

# Read from stdin with specific format
cat input.mp4 | ffmpeg -f mp4 -i pipe:0 output.mkv

Demuxer-Specific Options

# Matroska with specific options
ffmpeg -f_strict experimental -i input.mkv output.mp4

# HLS with custom options
ffmpeg -allowed_extensions ALL -i playlist.m3u8 output.mp4

# RTSP with TCP transport
ffmpeg -rtsp_transport tcp -i rtsp://example.com/stream output.mp4

# Image sequence with frame rate
ffmpeg -framerate 24 -i frame%04d.png output.mp4

Probing Format Information

# Show container and stream information
ffprobe -show_format -show_streams input.mkv

# Show only format information
ffprobe -show_format input.mp4

# Show format in JSON
ffprobe -print_format json -show_format input.avi

Stream Selection

# Map specific streams
ffmpeg -i input.mkv -map 0:v:0 -map 0:a:1 output.mp4

# Extract audio stream
ffmpeg -i input.mkv -vn -c:a copy audio.aac

# Extract video stream
ffmpeg -i input.mkv -an -c:v copy video.h264

# Extract subtitles
ffmpeg -i input.mkv -map 0:s:0 -c:s copy subtitles.srt

Common Demuxer Options

General Options

# Seek to timestamp
ffmpeg -ss 00:01:30 -i input.mp4 output.mp4

# Limit input duration
ffmpeg -t 60 -i input.mp4 output.mp4

# Set input frame rate
ffmpeg -r 30 -i input.avi output.mp4

# Analyze duration
ffmpeg -analyzeduration 10M -probesize 10M -i input.ts output.mp4

Network Streaming Options

# Set timeout for network streams
ffmpeg -timeout 5000000 -i http://example.com/stream.m3u8 output.mp4

# Custom user agent
ffmpeg -user_agent "MyPlayer/1.0" -i http://example.com/video.mp4 output.mkv

# Set buffer size
ffmpeg -buffer_size 1024k -i udp://239.0.0.1:1234 output.ts

Troubleshooting

Detection Issues

# Force format when auto-detection fails
ffmpeg -f matroska -i corrupted.file output.mp4

# Increase analysis time
ffmpeg -analyzeduration 100M -probesize 100M -i input.ts output.mp4

# Ignore errors and continue
ffmpeg -err_detect ignore_err -i broken.avi output.mp4

Performance Optimization

# Fast seeking (less accurate)
ffmpeg -ss 00:05:00 -i input.mp4 -t 60 -c copy output.mp4

# Accurate seeking (slower)
ffmpeg -i input.mp4 -ss 00:05:00 -t 60 -c copy output.mp4

# Disable scanning
ffmpeg -fflags +genpts -i input.ts output.mp4

See Also

Build docs developers (and LLMs) love