# man > ffmpeg-formats(1)

---
type: CommandReference
command: ffmpeg-formats
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `ffmpeg -f crc -i INPUT out.crc` — Compute Adler-32 CRC of all frames
- `ffmpeg -f hls -hls_time 10 out.m3u8 -i INPUT` — Segment input into HLS playlist
- `ffmpeg -f concat -i list.txt -c copy OUTPUT` — Concatenate files using a script
- `ffmpeg -f image2 -pattern_type glob -i "*.png" out.mkv` — Create video from image sequence
- `ffmpeg -f dash -seg_duration 4 -adaptation_sets "id=0,streams=v id=1,streams=a" out.mpd` — Generate DASH segments
- `ffmpeg -f segment -segment_time 10 out%03d.ts -i INPUT` — Split into fixed-duration segments
- `ffmpeg -f tee -map 0 "[f=mp4]out.mp4|[f=mpegts]udp://..."` — Simultaneous output to multiple destinations
- `ffmpeg -i INPUT -f ffmetadata meta.txt` — Extract metadata to INI-like file

## Name

ffmpeg-formats — FFmpeg formats (muxers and demuxers)

## Synopsis

`ffmpeg [options] -f <format> -i <input> [output_options] <output>`

## Options

### Generic Format Options (input/output)

- `-avioflags <flags>` — Set buffering (direct reduces buffering)
- `-probesize <bytes>` — Set probing size (default 5,000,000)
- `-max_probe_packets <n>` — Max packets for codec probing (default 2500)
- `-packetsize <bytes>` — Set packet size (output)
- `-fflags <flags>` — Set format flags. Common values:
  - `discardcorrupt` — discard corrupted packets (input)
  - `fastseek` — fast inaccurate seeks (input)
  - `genpts` — generate missing PTS (input)
  - `nobuffer` — reduce initial buffering latency (input)
  - `autobsf` — auto-apply bitstream filters (output, default)
  - `bitexact` — write reproducible output (output)
  - `flush_packets` — write packets immediately (output)
  - `shortest` — stop muxing at shortest stream (output)
- `-seek2any <0|1>` — Allow seeking to non-keyframes (input)
- `-analyzeduration <us>` — Microseconds to analyze input (default 5,000,000)
- `-cryptokey <hex>` — Set decryption key (input)
- `-fpsprobesize <n>` — Frames to probe fps (input)
- `-max_interleave_delta <us>` — Max buffering for interleaving (output, default 10s)
- `-avoid_negative_ts <auto|disabled|make_non_negative|make_zero>` — Shift timestamps (output)
- `-skip_initial_bytes <n>` — Skip bytes before reading header (input)
- `-correct_ts_overflow <0|1>` — Correct single timestamp overflows (input, default 1)
- `-output_ts_offset <duration>` — Add offset to output timestamps (output)
- `-format_whitelist <list>` — Comma-separated allowed demuxers (input)
- `-max_streams <n>` — Reject files with too many streams (input)
- `-strict <very|strict|normal|unofficial|experimental>` — Standard conformance (input/output)

### Key Demuxer Options

- **image2**: `-framerate <fps>`, `-loop <0|1>`, `-pattern_type <sequence|glob|glob_sequence>`, `-start_number <n>`, `-pixel_format <fmt>`, `-video_size <wxh>`
- **hls**: `-live_start_index <n>`, `-allowed_extensions <exts>`, `-max_reload <n>`, `-http_persistent <0|1>`, `-http_multiple <0|1>`, `-http_seekable <0|1|-1>`
- **concat**: `-safe <0|1>`, `-auto_convert <0|1>`, `-segment_time_metadata <0|1>`
- **mov/mp4**: `-enable_drefs <0|1>`, `-use_absolute_path <0|1>`, `-ignore_editlist <0|1>`, `-ignore_chapters <0|1>`, `-decryption_key <hex>`
- **mpegts**: `-resync_size <bytes>`, `-skip_unknown_pmt <0|1>`, `-fix_teletext_pts <0|1>`, `-scan_all_pmts <-1|0|1>`
- **rawvideo**: `-framerate <fps>`, `-pixel_format <fmt>`, `-video_size <wxh>`

### Key Muxer Options

- **hls**: `-hls_time <sec>`, `-hls_list_size <n>`, `-hls_segment_filename <pattern>`, `-hls_flags <flags>`, `-hls_key_info_file <file>`, `-var_stream_map <map>`, `-master_pl_name <name>`, `-method <PUT|POST>`
- **dash**: `-seg_duration <sec>`, `-frag_duration <sec>`, `-window_size <n>`, `-use_template <0|1>`, `-use_timeline <0|1>`, `-adaptation_sets <spec>`, `-single_file <0|1>`
- **segment**: `-segment_time <sec>`, `-segment_list <name>`, `-segment_list_type <flat|csv|ffconcat|m3u8>`, `-segment_times <list>`, `-segment_frames <list>`, `-strftime <0|1>`, `-reset_timestamps <0|1>`
- **tee**: `-use_fifo <0|1>`, `-fifo_options <opts>`, slave options: `f=<format>`, `bsfs/<spec>=<filter>`, `select=<streams>`, `onfail=<abort|ignore>`
- **mov/mp4**: `-moov_size <bytes>`, `-movflags <flags>` (e.g., `+frag_keyframe`, `+empty_moov`, `+faststart`, `+skip_sidx`), `-write_prft <wallclock|pts>`
- **mp3**: `-write_xing <0|1>`, `-id3v2_version <0|3|4>`, `-write_id3v1 <0|1>`
- **mpegts**: `-mpegts_transport_stream_id <id>`, `-mpegts_service_id <id>`, `-mpegts_pmt_start_pid <pid>`, `-muxrate <rate>`, `-pes_payload_size <bytes>`, `-mpegts_flags <flags>`
- **fifo**: `-queue_size <n>`, `-drop_pkts_on_overflow <0|1>`, `-attempt_recovery <0|1>`, `-recovery_wait_time <sec>`
- **gif**: `-loop <n>`, `-final_delay <centiseconds>`

## Examples

- Compute CRC of all frames:
  ```shell
  ffmpeg -i INPUT -f crc out.crc
  
- Create HLS segments with 10-second duration:
  ```shell
  ffmpeg -i in.mkv -c:v h264 -flags +cgop -g 30 -hls_time 10 out.m3u8
  
- Concatenate files using a script:
  ```shell
  ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mkv
  
- Create video from image sequence:
  ```shell
  ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv
  
- Generate DASH segments with adaptation sets:
  ```shell
  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 -f dash -adaptation_sets "id=0,streams=v id=1,streams=a" /path/to/out.mpd
  
- Split into 10-second segments:
  ```shell
  ffmpeg -i in.mkv -f segment -segment_time 10 out%03d.ts
  
- Simultaneous output to file and UDP stream:
  ```shell
  ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a "archive.mkv|[f=mpegts]udp://10.0.1.255:1234/"
  
- Extract metadata to ffmetadata file:
  ```shell
  ffmpeg -i INPUT -f ffmetadata meta.txt
  
## See Also

[ffmpeg(1)](https://www.chedong.com/phpMan.php/man/ffmpeg/1/markdown), [ffplay(1)](https://www.chedong.com/phpMan.php/man/ffplay/1/markdown), [ffprobe(1)](https://www.chedong.com/phpMan.php/man/ffprobe/1/markdown), [libavformat(3)](https://www.chedong.com/phpMan.php/man/libavformat/3/markdown)