forked from ossrs/ffmpeg-webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmuxers.texi
3928 lines (3046 loc) · 133 KB
/
muxers.texi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@chapter Muxers
@c man begin MUXERS
Muxers are configured elements in FFmpeg which allow writing
multimedia streams to a particular type of file.
When you configure your FFmpeg build, all the supported muxers
are enabled by default. You can list all available muxers using the
configure option @code{--list-muxers}.
You can disable all the muxers with the configure option
@code{--disable-muxers} and selectively enable / disable single muxers
with the options @code{--enable-muxer=@var{MUXER}} /
@code{--disable-muxer=@var{MUXER}}.
The option @code{-muxers} of the ff* tools will display the list of
enabled muxers. Use @code{-formats} to view a combined list of
enabled demuxers and muxers.
A description of some of the currently available muxers follows.
@anchor{raw muxers}
@section Raw muxers
This section covers raw muxers. They accept a single stream matching
the designated codec. They do not store timestamps or metadata. The
recognized extension is the same as the muxer name unless indicated
otherwise.
It comprises the following muxers. The media type and the eventual
extensions used to automatically selects the muxer from the output
extensions are also shown.
@table @samp
@item ac3 @emph{audio}
Dolby Digital, also known as AC-3.
@item adx @emph{audio}
CRI Middleware ADX audio.
This muxer will write out the total sample count near the start of the
first packet when the output is seekable and the count can be stored
in 32 bits.
@item aptx @emph{audio}
aptX (Audio Processing Technology for Bluetooth)
@item aptx_hd @emph{audio} (aptxdh)
aptX HD (Audio Processing Technology for Bluetooth) audio
@item avs2 @emph{video} (avs, avs2)
AVS2-P2 (Audio Video Standard - Second generation - Part 2) /
IEEE 1857.4 video
@item avs3 @emph{video} (avs3)
AVS3-P2 (Audio Video Standard - Third generation - Part 2) /
IEEE 1857.10 video
@item cavsvideo @emph{video} (cavs)
Chinese AVS (Audio Video Standard - First generation)
@item codec2raw @emph{audio}
Codec 2 audio.
No extension is registered so format name has to be supplied e.g. with
the ffmpeg CLI tool @code{-f codec2raw}.
@item data @emph{any}
Generic data muxer.
This muxer accepts a single stream with any codec of any type. The
input stream has to be selected using the @code{-map} option with the
@command{ffmpeg} CLI tool.
No extension is registered so format name has to be supplied e.g. with
the @command{ffmpeg} CLI tool @code{-f data}.
@item dfpwm @emph{audio} (dfpwm)
Raw DFPWM1a (Dynamic Filter Pulse With Modulation) audio muxer.
@item dirac @emph{video} (drc, vc2)
BBC Dirac video.
The Dirac Pro codec is a subset and is standardized as SMPTE VC-2.
@item dnxhd @emph{video} (dnxhd, dnxhr)
Avid DNxHD video.
It is standardized as SMPTE VC-3. Accepts DNxHR streams.
@item dts @emph{audio}
DTS Coherent Acoustics (DCA) audio
@item eac3 @emph{audio}
Dolby Digital Plus, also known as Enhanced AC-3
@item evc @emph{video} (evc)
MPEG-5 Essential Video Coding (EVC) / EVC / MPEG-5 Part 1 EVC video
@item g722 @emph{audio}
ITU-T G.722 audio
@item g723_1 @emph{audio} (tco, rco)
ITU-T G.723.1 audio
@item g726 @emph{audio}
ITU-T G.726 big-endian ("left-justified") audio.
No extension is registered so format name has to be supplied e.g. with
the @command{ffmpeg} CLI tool @code{-f g726}.
@item g726le @emph{audio}
ITU-T G.726 little-endian ("right-justified") audio.
No extension is registered so format name has to be supplied e.g. with
the @command{ffmpeg} CLI tool @code{-f g726le}.
@item gsm @emph{audio}
Global System for Mobile Communications audio
@item h261 @emph{video}
ITU-T H.261 video
@item h263 @emph{video}
ITU-T H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 video
@item h264 @emph{video} (h264, 264)
ITU-T H.264 / MPEG-4 Part 10 AVC video. Bitstream shall be converted
to Annex B syntax if it's in length-prefixed mode.
@item hevc @emph{video} (hevc, h265, 265)
ITU-T H.265 / MPEG-H Part 2 HEVC video. Bitstream shall be converted
to Annex B syntax if it's in length-prefixed mode.
@item m4v @emph{video}
MPEG-4 Part 2 video
@item mjpeg @emph{video} (mjpg, mjpeg)
Motion JPEG video
@item mlp @emph{audio}
Meridian Lossless Packing, also known as Packed PCM
@item mp2 @emph{audio} (mp2, m2a, mpa)
MPEG-1 Audio Layer II audio
@item mpeg1video @emph{video} (mpg, mpeg, m1v)
MPEG-1 Part 2 video.
@item mpeg2video @emph{video} (m2v)
ITU-T H.262 / MPEG-2 Part 2 video
@item obu @emph{video}
AV1 low overhead Open Bitstream Units muxer.
Temporal delimiter OBUs will be inserted in all temporal units of the
stream.
@item rawvideo @emph{video} (yuv, rgb)
Raw uncompressed video.
@item sbc @emph{audio} (sbc, msbc)
Bluetooth SIG low-complexity subband codec audio
@item truehd @emph{audio} (thd)
Dolby TrueHD audio
@item vc1 @emph{video}
SMPTE 421M / VC-1 video
@end table
@subsection Examples
@itemize
@item
Store raw video frames with the @samp{rawvideo} muxer using @command{ffmpeg}:
@example
ffmpeg -f lavfi -i testsrc -t 10 -s hd1080p testsrc.yuv
@end example
Since the rawvideo muxer do not store the information related to size
and format, this information must be provided when demuxing the file:
@example
ffplay -video_size 1920x1080 -pixel_format rgb24 -f rawvideo testsrc.rgb
@end example
@end itemize
@section Raw PCM muxers
This section covers raw PCM (Pulse-Code Modulation) audio muxers.
They accept a single stream matching the designated codec. They do not
store timestamps or metadata. The recognized extension is the same as
the muxer name.
It comprises the following muxers. The optional additional extension
used to automatically select the muxer from the output extension is
also shown in parentheses.
@table @samp
@item alaw (al)
PCM A-law
@item f32be
PCM 32-bit floating-point big-endian
@item f32le
PCM 32-bit floating-point little-endian
@item f64be
PCM 64-bit floating-point big-endian
@item f64le
PCM 64-bit floating-point little-endian
@item mulaw (ul)
PCM mu-law
@item s16be
PCM signed 16-bit big-endian
@item s16le
PCM signed 16-bit little-endian
@item s24be
PCM signed 24-bit big-endian
@item s24le
PCM signed 24-bit little-endian
@item s32be
PCM signed 32-bit big-endian
@item s32le
PCM signed 32-bit little-endian
@item s8 (sb)
PCM signed 8-bit
@item u16be
PCM unsigned 16-bit big-endian
@item u16le
PCM unsigned 16-bit little-endian
@item u24be
PCM unsigned 24-bit big-endian
@item u24le
PCM unsigned 24-bit little-endian
@item u32be
PCM unsigned 32-bit big-endian
@item u32le
PCM unsigned 32-bit little-endian
@item u8 (ub)
PCM unsigned 8-bit
@item vidc
PCM Archimedes VIDC
@end table
@section MPEG-1/MPEG-2 program stream muxers
This section covers formats belonging to the MPEG-1 and MPEG-2 Systems
family.
The MPEG-1 Systems format (also known as ISO/IEEC 11172-1 or MPEG-1
program stream) has been adopted for the format of media track stored
in VCD (Video Compact Disc).
The MPEG-2 Systems standard (also known as ISO/IEEC 13818-1) covers
two containers formats, one known as transport stream and one known as
program stream; only the latter is covered here.
The MPEG-2 program stream format (also known as VOB due to the
corresponding file extension) is an extension of MPEG-1 program
stream: in addition to support different codecs for the audio and
video streams, it also stores subtitles and navigation metadata.
MPEG-2 program stream has been adopted for storing media streams in
SVCD and DVD storage devices.
This section comprises the following muxers.
@table @samp
@item mpeg (mpg,mpeg)
MPEG-1 Systems / MPEG-1 program stream muxer.
@item vcd
MPEG-1 Systems / MPEG-1 program stream (VCD) muxer.
This muxer can be used to generate tracks in the format accepted by
the VCD (Video Compact Disc) storage devices.
It is the same as the @samp{mpeg} muxer with a few differences.
@item vob
MPEG-2 program stream (VOB) muxer.
@item dvd
MPEG-2 program stream (DVD VOB) muxer.
This muxer can be used to generate tracks in the format accepted by
the DVD (Digital Versatile Disc) storage devices.
This is the same as the @samp{vob} muxer with a few differences.
@item svcd (vob)
MPEG-2 program stream (SVCD VOB) muxer.
This muxer can be used to generate tracks in the format accepted by
the SVCD (Super Video Compact Disc) storage devices.
This is the same as the @samp{vob} muxer with a few differences.
@end table
@subsection Options
@table @option
@item muxrate @var{rate}
Set user-defined mux rate expressed as a number of bits/s. If not
specied the automatically computed mux rate is employed. Default value
is @code{0}.
@item preload @var{delay}
Set initial demux-decode delay in microseconds. Default value is
@code{500000}.
@end table
@section MOV/MPEG-4/ISOMBFF muxers
This section covers formats belonging to the QuickTime / MOV family,
including the MPEG-4 Part 14 format and ISO base media file format
(ISOBMFF). These formats share a common structure based on the ISO
base media file format (ISOBMFF).
The MOV format was originally developed for use with Apple QuickTime.
It was later used as the basis for the MPEG-4 Part 1 (later Part 14)
format, also known as ISO/IEC 14496-1. That format was then
generalized into ISOBMFF, also named MPEG-4 Part 12 format, ISO/IEC
14496-12, or ISO/IEC 15444-12.
It comprises the following muxers.
@table @samp
@item 3gp
Third Generation Partnership Project (3GPP) format for 3G UMTS
multimedia services
@item 3g2
Third Generation Partnership Project 2 (3GP2 or 3GPP2) format for 3G
CDMA2000 multimedia services, similar to @samp{3gp} with extensions
and limitations
@item f4v
Adobe Flash Video format
@item ipod
MPEG-4 audio file format, as MOV/MP4 but limited to contain only audio
streams, typically played with the Apple ipod device
@item ismv
Microsoft IIS (Internet Information Services) Smooth Streaming
Audio/Video (ISMV or ISMA) format. This is based on MPEG-4 Part 14
format with a few incompatible variants, used to stream media files
for the Microsoft IIS server.
@item mov
QuickTime player format identified by the @code{.mov} extension
@item mp4
MP4 or MPEG-4 Part 14 format
@item psp
PlayStation Portable MP4/MPEG-4 Part 14 format variant. This is based
on MPEG-4 Part 14 format with a few incompatible variants, used to
play files on PlayStation devices.
@end table
@subsection Fragmentation
The @samp{mov}, @samp{mp4}, and @samp{ismv} muxers support
fragmentation. Normally, a MOV/MP4 file has all the metadata about all
packets stored in one location.
This data is usually written at the end of the file, but it can be
moved to the start for better playback by adding @code{+faststart} to
the @code{-movflags}, or using the @command{qt-faststart} tool).
A fragmented file consists of a number of fragments, where packets and
metadata about these packets are stored together. Writing a fragmented
file has the advantage that the file is decodable even if the writing
is interrupted (while a normal MOV/MP4 is undecodable if it is not
properly finished), and it requires less memory when writing very long
files (since writing normal MOV/MP4 files stores info about every
single packet in memory until the file is closed). The downside is
that it is less compatible with other applications.
Fragmentation is enabled by setting one of the options that define
how to cut the file into fragments:
@table @option
@item frag_duration
@item frag_size
@item min_frag_duration
@item movflags +frag_keyframe
@item movflags +frag_custom
@end table
If more than one condition is specified, fragments are cut when one of
the specified conditions is fulfilled. The exception to this is the
option @option{min_frag_duration}, which has to be fulfilled for any
of the other conditions to apply.
@subsection Options
@table @option
@item brand @var{brand_string}
Override major brand.
@item empty_hdlr_name @var{bool}
Enable to skip writing the name inside a @code{hdlr} box.
Default is @code{false}.
@item encryption_key @var{key}
set the media encryption key in hexadecimal format
@item encryption_kid @var{kid}
set the media encryption key identifier in hexadecimal format
@item encryption_scheme @var{scheme}
configure the encryption scheme, allowed values are @samp{none}, and
@samp{cenc-aes-ctr}
@item frag_duration @var{duration}
Create fragments that are @var{duration} microseconds long.
@item frag_interleave @var{number}
Interleave samples within fragments (max number of consecutive
samples, lower is tighter interleaving, but with more overhead. It is
set to @code{0} by default.
@item frag_size @var{size}
create fragments that contain up to @var{size} bytes of payload data
@item iods_audio_profile @var{profile}
specify iods number for the audio profile atom (from -1 to 255),
default is @code{-1}
@item iods_video_profile @var{profile}
specify iods number for the video profile atom (from -1 to 255),
default is @code{-1}
@item ism_lookahead @var{num_entries}
specify number of lookahead entries for ISM files (from 0 to 255),
default is @code{0}
@item min_frag_duration @var{duration}
do not create fragments that are shorter than @var{duration} microseconds long
@item moov_size @var{bytes}
Reserves space for the moov atom at the beginning of the file instead of placing the
moov atom at the end. If the space reserved is insufficient, muxing will fail.
@item mov_gamma @var{gamma}
specify gamma value for gama atom (as a decimal number from 0 to 10),
default is @code{0.0}, must be set together with @code{+ movflags}
@item movflags @var{flags}
Set various muxing switches. The following flags can be used:
@table @samp
@item cmaf
write CMAF (Common Media Application Format) compatible fragmented
MP4 output
@item dash
write DASH (Dynamic Adaptive Streaming over HTTP) compatible fragmented
MP4 output
@item default_base_moof
Similarly to the @samp{omit_tfhd_offset} flag, this flag avoids
writing the absolute base_data_offset field in tfhd atoms, but does so
by using the new default-base-is-moof flag instead. This flag is new
from 14496-12:2012. This may make the fragments easier to parse in
certain circumstances (avoiding basing track fragment location
calculations on the implicit end of the previous track fragment).
@item delay_moov
delay writing the initial moov until the first fragment is cut, or
until the first fragment flush
@item disable_chpl
Disable Nero chapter markers (chpl atom). Normally, both Nero chapters
and a QuickTime chapter track are written to the file. With this
option set, only the QuickTime chapter track will be written. Nero
chapters can cause failures when the file is reprocessed with certain
tagging programs, like mp3Tag 2.61a and iTunes 11.3, most likely other
versions are affected as well.
@item faststart
Run a second pass moving the index (moov atom) to the beginning of the
file. This operation can take a while, and will not work in various
situations such as fragmented output, thus it is not enabled by
default.
@item frag_custom
Allow the caller to manually choose when to cut fragments, by calling
@code{av_write_frame(ctx, NULL)} to write a fragment with the packets
written so far. (This is only useful with other applications
integrating libavformat, not from @command{ffmpeg}.)
@item frag_discont
signal that the next fragment is discontinuous from earlier ones
@item frag_every_frame
fragment at every frame
@item frag_keyframe
start a new fragment at each video keyframe
@item global_sidx
write a global sidx index at the start of the file
@item isml
create a live smooth streaming feed (for pushing to a publishing point)
@item negative_cts_offsets
Enables utilization of version 1 of the CTTS box, in which the CTS offsets can
be negative. This enables the initial sample to have DTS/CTS of zero, and
reduces the need for edit lists for some cases such as video tracks with
B-frames. Additionally, eases conformance with the DASH-IF interoperability
guidelines.
This option is implicitly set when writing @samp{ismv} (Smooth
Streaming) files.
@item omit_tfhd_offset
Do not write any absolute base_data_offset in tfhd atoms. This avoids
tying fragments to absolute byte positions in the file/streams.
@item prefer_icc
If writing colr atom prioritise usage of ICC profile if it exists in
stream packet side data.
@item rtphint
add RTP hinting tracks to the output file
@item separate_moof
Write a separate moof (movie fragment) atom for each track. Normally,
packets for all tracks are written in a moof atom (which is slightly
more efficient), but with this option set, the muxer writes one
moof/mdat pair for each track, making it easier to separate tracks.
@item skip_sidx
Skip writing of sidx atom. When bitrate overhead due to sidx atom is
high, this option could be used for cases where sidx atom is not
mandatory. When the @samp{global_sidx} flag is enabled, this option
is ignored.
@item skip_trailer
skip writing the mfra/tfra/mfro trailer for fragmented files
@item use_metadata_tags
use mdta atom for metadata
@item write_colr
write colr atom even if the color info is unspecified. This flag is
experimental, may be renamed or changed, do not use from scripts.
@item write_gama
write deprecated gama atom
@item hybrid_fragmented
For recoverability - write the output file as a fragmented file.
This allows the intermediate file to be read while being written
(in particular, if the writing process is aborted uncleanly). When
writing is finished, the file is converted to a regular, non-fragmented
file, which is more compatible and allows easier and quicker seeking.
If writing is aborted, the intermediate file can manually be
remuxed to get a regular, non-fragmented file of what had been
written into the unfinished file.
@end table
@item movie_timescale @var{scale}
Set the timescale written in the movie header box (@code{mvhd}).
Range is 1 to INT_MAX. Default is @code{1000}.
@item rtpflags @var{flags}
Add RTP hinting tracks to the output file.
The following flags can be used:
@table @samp
@item h264_mode0
use mode 0 for H.264 in RTP
@item latm
use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC
@item rfc2190
use RFC 2190 packetization instead of RFC 4629 for H.263
@item send_bye
send RTCP BYE packets when finishing
@item skip_rtcp
do not send RTCP sender reports
@end table
@item skip_iods @var{bool}
skip writing iods atom (default value is @code{true})
@item use_editlist @var{bool}
use edit list (default value is @code{auto})
@item use_stream_ids_as_track_ids @var{bool}
use stream ids as track ids (default value is @code{false})
@item video_track_timescale @var{scale}
Set the timescale used for video tracks. Range is @code{0} to INT_MAX. If
set to @code{0}, the timescale is automatically set based on the
native stream time base. Default is @code{0}.
@item write_btrt @var{bool}
Force or disable writing bitrate box inside stsd box of a track. The
box contains decoding buffer size (in bytes), maximum bitrate and
average bitrate for the track. The box will be skipped if none of
these values can be computed. Default is @code{-1} or @code{auto},
which will write the box only in MP4 mode.
@item write_prft @var{option}
Write producer time reference box (PRFT) with a specified time source for the
NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource
as wallclock time and @samp{pts} to specify timesource as input packets' PTS
values.
@item write_tmcd @var{bool}
Specify @code{on} to force writing a timecode track, @code{off} to disable it
and @code{auto} to write a timecode track only for mov and mp4 output (default).
Setting value to @samp{pts} is applicable only for a live encoding use case,
where PTS values are set as as wallclock time at the source. For example, an
encoding use case with decklink capture source where @option{video_pts} and
@option{audio_pts} are set to @samp{abs_wallclock}.
@end table
@subsection Examples
@itemize
@item
Push Smooth Streaming content in real time to a publishing point on
IIS with the @samp{ismv} muxer using @command{ffmpeg}:
@example
ffmpeg -re @var{<normal input/transcoding options>} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
@end example
@end itemize
@anchor{a64}
@section a64
A64 Commodore 64 video muxer.
This muxer accepts a single @code{a64_multi} or @code{a64_multi5}
codec video stream.
@section ac4
Raw AC-4 audio muxer.
This muxer accepts a single @code{ac4} audio stream.
@subsection Options
@table @option
@item write_crc @var{bool}
when enabled, write a CRC checksum for each packet to the output,
default is @code{false}
@end table
@anchor{adts}
@section adts
Audio Data Transport Stream muxer.
It accepts a single AAC stream.
@subsection Options
@table @option
@item write_id3v2 @var{bool}
Enable to write ID3v2.4 tags at the start of the stream. Default is
disabled.
@item write_apetag @var{bool}
Enable to write APE tags at the end of the stream. Default is
disabled.
@item write_mpeg2 @var{bool}
Enable to set MPEG version bit in the ADTS frame header to 1 which
indicates MPEG-2. Default is 0, which indicates MPEG-4.
@end table
@anchor{aea}
@section aea
MD STUDIO audio muxer.
This muxer accepts a single ATRAC1 audio stream with either one or two channels
and a sample rate of 44100Hz.
As AEA supports storing the track title, this muxer will also write
the title from stream's metadata to the container.
@anchor{aiff}
@section aiff
Audio Interchange File Format muxer.
@subsection Options
@table @option
@item write_id3v2 @var{bool}
Enable ID3v2 tags writing when set to 1. Default is 0 (disabled).
@item id3v2_version @var{bool}
Select ID3v2 version to write. Currently only version 3 and 4 (aka.
ID3v2.3 and ID3v2.4) are supported. The default is version 4.
@end table
@anchor{alp}
@section alp
High Voltage Software's Lego Racers game audio muxer.
It accepts a single ADPCM_IMA_ALP stream with no more than 2 channels
and a sample rate not greater than 44100 Hz.
Extensions: @code{tun}, @code{pcm}
@subsection Options
@table @option
@item type @var{type}
Set file type.
@var{type} accepts the following values:
@table @samp
@item tun
Set file type as music. Must have a sample rate of 22050 Hz.
@item pcm
Set file type as sfx.
@item auto
Set file type as per output file extension. @code{.pcm} results in
type @code{pcm} else type @code{tun} is set. @var{(default)}
@end table
@end table
@section amr
3GPP AMR (Adaptive Multi-Rate) audio muxer.
It accepts a single audio stream containing an AMR NB stream.
@section amv
AMV (Actions Media Video) format muxer.
@section apm
Ubisoft Rayman 2 APM audio muxer.
It accepts a single ADPCM IMA APM audio stream.
@section apng
Animated Portable Network Graphics muxer.
It accepts a single APNG video stream.
@subsection Options
@table @option
@item final_delay @var{delay}
Force a delay expressed in seconds after the last frame of each
repetition. Default value is @code{0.0}.
@item plays @var{repetitions}
specify how many times to play the content, @code{0} causes an infinte
loop, with @code{1} there is no loop
@end table
@subsection Examples
@itemize
@item
Use @command{ffmpeg} to generate an APNG output with 2 repetitions,
and with a delay of half a second after the first repetition:
@example
ffmpeg -i INPUT -final_delay 0.5 -plays 2 out.apng
@end example
@end itemize
@section argo_asf
Argonaut Games ASF audio muxer.
It accepts a single ADPCM audio stream.
@subsection Options
@table @option
@item version_major @var{version}
override file major version, specified as an integer, default value is
@code{2}
@item version_minor @var{version}
override file minor version, specified as an integer, default value is
@code{1}
@item name @var{name}
Embed file name into file, if not specified use the output file
name. The name is truncated to 8 characters.
@end table
@section argo_cvg
Argonaut Games CVG audio muxer.
It accepts a single one-channel ADPCM 22050Hz audio stream.
The @option{loop} and @option{reverb} options set the corresponding
flags in the header which can be later retrieved to process the audio
stream accordingly.
@subsection Options
@table @option
@item skip_rate_check @var{bool}
skip sample rate check (default is @code{false})
@item loop @var{bool}
set loop flag (default is @code{false})
@item reverb @var{boolean}
set reverb flag (default is @code{true})
@end table
@anchor{asf}
@section asf, asf_stream
Advanced / Active Systems (or Streaming) Format audio muxer.
The @samp{asf_stream} variant should be selected for streaming.
Note that Windows Media Audio (wma) and Windows Media Video (wmv) use this
muxer too.
@subsection Options
@table @option
@item packet_size @var{size}
Set the muxer packet size as a number of bytes. By tuning this setting
you may reduce data fragmentation or muxer overhead depending on your
source. Default value is @code{3200}, minimum is @code{100}, maximum
is @code{64Ki}.
@end table
@section ass
ASS/SSA (SubStation Alpha) subtitles muxer.
It accepts a single ASS subtitles stream.
@subsection Options
@table @option
@item ignore_readorder @var{bool}
Write dialogue events immediately, even if they are out-of-order,
default is @code{false}, otherwise they are cached until the expected
time event is found.
@end table
@section ast
AST (Audio Stream) muxer.
This format is used to play audio on some Nintendo Wii games.
It accepts a single audio stream.
The @option{loopstart} and @option{loopend} options can be used to
define a section of the file to loop for players honoring such
options.
@subsection Options
@table @option
@item loopstart @var{start}
Specify loop start position expressesd in milliseconds, from @code{-1}
to @code{INT_MAX}, in case @code{-1} is set then no loop is specified
(default -1) and the @option{loopend} value is ignored.
@item loopend @var{end}
Specify loop end position expressed in milliseconds, from @code{0} to
@code{INT_MAX}, default is @code{0}, in case @code{0} is set it
assumes the total stream duration.
@end table
@section au
SUN AU audio muxer.
It accepts a single audio stream.
@anchor{avi}
@section avi
Audio Video Interleaved muxer.
AVI is a proprietary format developed by Microsoft, and later formally specified
through the Open DML specification.
Because of differences in players implementations, it might be required to set
some options to make sure that the generated output can be correctly played by
the target player.
@subsection Options
@table @option
@item flipped_raw_rgb @var{bool}
If set to @code{true}, store positive height for raw RGB bitmaps, which
indicates bitmap is stored bottom-up. Note that this option does not flip the
bitmap which has to be done manually beforehand, e.g. by using the @samp{vflip}
filter. Default is @code{false} and indicates bitmap is stored top down.
@item reserve_index_space @var{size}
Reserve the specified amount of bytes for the OpenDML master index of each
stream within the file header. By default additional master indexes are
embedded within the data packets if there is no space left in the first master
index and are linked together as a chain of indexes. This index structure can
cause problems for some use cases, e.g. third-party software strictly relying
on the OpenDML index specification or when file seeking is slow. Reserving
enough index space in the file header avoids these problems.
The required index space depends on the output file size and should be about 16
bytes per gigabyte. When this option is omitted or set to zero the necessary
index space is guessed.
Default value is @code{0}.
@item write_channel_mask @var{bool}
Write the channel layout mask into the audio stream header.
This option is enabled by default. Disabling the channel mask can be useful in
specific scenarios, e.g. when merging multiple audio streams into one for
compatibility with software that only supports a single audio stream in AVI
(see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}).
@end table
@section avif
AV1 (Alliance for Open Media Video codec 1) image format muxer.
This muxers stores images encoded using the AV1 codec.
It accepts one or two video streams. In case two video streams are
provided, the second one shall contain a single plane storing the
alpha mask.
In case more than one image is provided, the generated output is
considered an animated AVIF and the number of loops can be specified
with the @option{loop} option.
This is based on the specification by Alliance for Open Media at url
@url{https://aomediacodec.github.io/av1-avif}.
@subsection Options
@table @option
@item loop @var{count}
number of times to loop an animated AVIF, @code{0} specify an infinite
loop, default is @code{0}
@item movie_timescale @var{timescale}
Set the timescale written in the movie header box (@code{mvhd}).
Range is 1 to INT_MAX. Default is @code{1000}.
@end table
@section avm2
ShockWave Flash (SWF) / ActionScript Virtual Machine 2 (AVM2) format muxer.
It accepts one audio stream, one video stream, or both.
@section bit
G.729 (.bit) file format muxer.
It accepts a single G.729 audio stream.
@section caf
Apple CAF (Core Audio Format) muxer.
It accepts a single audio stream.
@section codec2
Codec2 audio audio muxer.
It accepts a single codec2 audio stream.
@anchor{chromaprint}
@section chromaprint
Chromaprint fingerprinter muxers.
To enable compilation of this filter you need to configure FFmpeg with
@code{--enable-chromaprint}.
This muxer feeds audio data to the Chromaprint library, which
generates a fingerprint for the provided audio data. See:
@url{https://acoustid.org/chromaprint}
It takes a single signed native-endian 16-bit raw audio stream of at
most 2 channels.
@subsection Options
@table @option
@item algorithm @var{version}
Select version of algorithm to fingerprint with. Range is @code{0} to
@code{4}. Version @code{3} enables silence detection. Default is @code{1}.
@item fp_format @var{format}