History

doc/muxers: reorder and cleanup mov muxer options

Make various movflags grouped together similar to how it is done for other options.

Marton Balint committed 3 years ago

Commit 412274c1 parent ace94591 file · +45 −43Browse files

Unified · Split

doc/muxers.texi+45−43
@@ -1630,8 +1630,10 @@ MOV/MP4/ISMV (Smooth Streaming) muxer. · 1629 unmodified lines
16301630 The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4
16311631 file has all the metadata about all packets stored in one location
16321632 (written at the end of the file, it can be moved to the start for
1633−better playback by adding @var{faststart} to the @var{movflags}, or
1634−using the @command{qt-faststart} tool). A fragmented
1633+better playback by adding @code{+faststart} to the @code{-movflags}, or
1634+using the @command{qt-faststart} tool).
1635+
1636+A fragmented
16351637 file consists of a number of fragments, where packets and metadata
16361638 about these packets are stored together. Writing a fragmented
16371639 file has the advantage that the file is decodable even if the
@@ -1641,40 +1643,34 @@ very long files (since writing normal MOV/MP4 files stores info about · 3 unmodified lines
16411643 every single packet in memory until the file is closed). The downside
16421644 is that it is less compatible with other applications.
16431645
1644−@subsection Options
1646+Fragmentation is enabled by setting one of the options that define
1647+how to cut the file into fragments: @code{-frag_duration}, @code{-frag_size},
1648+@code{-min_frag_duration}, @code{-movflags +frag_keyframe} and
1649+@code{-movflags +frag_custom}. If more than one condition is specified,
1650+fragments are cut when one of the specified conditions is fulfilled. The
1651+exception to this is @code{-min_frag_duration}, which has to be fulfilled for
1652+any of the other conditions to apply.
16451653
1646−Fragmentation is enabled by setting one of the AVOptions that define
1647−how to cut the file into fragments:
1654+@subsection Options
16481655
16491656 @table @option
1650−@item -moov_size @var{bytes}
1651−Reserves space for the moov atom at the beginning of the file instead of placing the
1652−moov atom at the end. If the space reserved is insufficient, muxing will fail.
1653−@item -movflags frag_keyframe
1654−Start a new fragment at each video keyframe.
1655−@item -frag_duration @var{duration}
1657+@item frag_duration @var{duration}
16561658 Create fragments that are @var{duration} microseconds long.
1657−@item -frag_size @var{size}
1659+@item frag_size @var{size}
16581660 Create fragments that contain up to @var{size} bytes of payload data.
1659−@item -movflags frag_custom
1661+@item min_frag_duration @var{duration}
1662+Don't create fragments that are shorter than @var{duration} microseconds long.
1663+@item movflags @var{flags}
1664+Set various muxing switches. The following flags can be used:
1665+@table @samp
1666+@item frag_keyframe
1667+Start a new fragment at each video keyframe.
1668+@item frag_custom
16601669 Allow the caller to manually choose when to cut fragments, by
16611670 calling @code{av_write_frame(ctx, NULL)} to write a fragment with
16621671 the packets written so far. (This is only useful with other
16631672 applications integrating libavformat, not from @command{ffmpeg}.)
1664−@item -min_frag_duration @var{duration}
1665−Don't create fragments that are shorter than @var{duration} microseconds long.
1666−@end table
1667−
1668−If more than one condition is specified, fragments are cut when
1669−one of the specified conditions is fulfilled. The exception to this is
1670−@code{-min_frag_duration}, which has to be fulfilled for any of the other
1671−conditions to apply.
1672−
1673−Additionally, the way the output file is written can be adjusted
1674−through a few other options:
1675−
1676−@table @option
1677−@item -movflags empty_moov
1673+@item empty_moov
16781674 Write an initial moov atom directly at the start of the file, without
16791675 describing any samples in it. Generally, an mdat/moov pair is written
16801676 at the start of the file, as a normal MOV/MP4 file, containing only
@@ -1683,43 +1679,40 @@ mdat atom, and the moov atom only describes the tracks but has · 2 unmodified lines
16831679 a zero duration.
16841680
16851681 This option is implicitly set when writing ismv (Smooth Streaming) files.
1686−@item -movflags separate_moof
1682+@item separate_moof
16871683 Write a separate moof (movie fragment) atom for each track. Normally,
16881684 packets for all tracks are written in a moof atom (which is slightly
16891685 more efficient), but with this option set, the muxer writes one moof/mdat
16901686 pair for each track, making it easier to separate tracks.
16911687
16921688 This option is implicitly set when writing ismv (Smooth Streaming) files.
1693−@item -movflags skip_sidx
1689+@item skip_sidx
16941690 Skip writing of sidx atom. When bitrate overhead due to sidx atom is high,
16951691 this option could be used for cases where sidx atom is not mandatory.
16961692 When global_sidx flag is enabled, this option will be ignored.
1697−@item -movflags faststart
1693+@item faststart
16981694 Run a second pass moving the index (moov atom) to the beginning of the file.
16991695 This operation can take a while, and will not work in various situations such
17001696 as fragmented output, thus it is not enabled by default.
1701−@item -movflags rtphint
1697+@item rtphint
17021698 Add RTP hinting tracks to the output file.
1703−@item -movflags disable_chpl
1699+@item disable_chpl
17041700 Disable Nero chapter markers (chpl atom). Normally, both Nero chapters
17051701 and a QuickTime chapter track are written to the file. With this option
17061702 set, only the QuickTime chapter track will be written. Nero chapters can
17071703 cause failures when the file is reprocessed with certain tagging programs, like
17081704 mp3Tag 2.61a and iTunes 11.3, most likely other versions are affected as well.
1709−@item -movflags omit_tfhd_offset
1705+@item omit_tfhd_offset
17101706 Do not write any absolute base_data_offset in tfhd atoms. This avoids
17111707 tying fragments to absolute byte positions in the file/streams.
1712−@item -movflags default_base_moof
1708+@item default_base_moof
17131709 Similarly to the omit_tfhd_offset, this flag avoids writing the
17141710 absolute base_data_offset field in tfhd atoms, but does so by using
17151711 the new default-base-is-moof flag instead. This flag is new from
17161712 14496-12:2012. This may make the fragments easier to parse in certain
17171713 circumstances (avoiding basing track fragment location calculations
17181714 on the implicit end of the previous track fragment).
1719−@item -write_tmcd
1720−Specify @code{on} to force writing a timecode track, @code{off} to disable it
1721−and @code{auto} to write a timecode track only for mov and mp4 output (default).
1722−@item -movflags negative_cts_offsets
1715+@item negative_cts_offsets
17231716 Enables utilization of version 1 of the CTTS box, in which the CTS offsets can
17241717 be negative. This enables the initial sample to have DTS/CTS of zero, and
17251718 reduces the need for edit lists for some cases such as video tracks with
@@ -1727,15 +1720,24 @@ B-frames. Additionally, eases conformance with the DASH-IF interoperability · 1 unmodified line
17271720 guidelines.
17281721
17291722 This option is implicitly set when writing ismv (Smooth Streaming) files.
1723+@end table
1724+
1725+@item moov_size @var{bytes}
1726+Reserves space for the moov atom at the beginning of the file instead of placing the
1727+moov atom at the end. If the space reserved is insufficient, muxing will fail.
1728+
1729+@item write_tmcd
1730+Specify @code{on} to force writing a timecode track, @code{off} to disable it
1731+and @code{auto} to write a timecode track only for mov and mp4 output (default).
17301732
1731−@item -write_btrt @var{bool}
1733+@item write_btrt @var{bool}
17321734 Force or disable writing bitrate box inside stsd box of a track.
17331735 The box contains decoding buffer size (in bytes), maximum bitrate and
17341736 average bitrate for the track. The box will be skipped if none of these values
17351737 can be computed.
17361738 Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode.
17371739
1738−@item -write_prft
1740+@item write_prft
17391741 Write producer time reference box (PRFT) with a specified time source for the
17401742 NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource
17411743 as wallclock time and @samp{pts} to specify timesource as input packets' PTS
@@ -1746,15 +1748,15 @@ where PTS values are set as as wallclock time at the source. For example, an · 4 unmodified lines
17461748 encoding use case with decklink capture source where @option{video_pts} and
17471749 @option{audio_pts} are set to @samp{abs_wallclock}.
17481750
1749−@item -empty_hdlr_name @var{bool}
1751+@item empty_hdlr_name @var{bool}
17501752 Enable to skip writing the name inside a @code{hdlr} box.
17511753 Default is @code{false}.
17521754
1753−@item -movie_timescale @var{scale}
1755+@item movie_timescale @var{scale}
17541756 Set the timescale written in the movie header box (@code{mvhd}).
17551757 Range is 1 to INT_MAX. Default is 1000.
17561758
1757−@item -video_track_timescale @var{scale}
1759+@item video_track_timescale @var{scale}
17581760 Set the timescale used for video tracks. Range is 0 to INT_MAX.
17591761 If set to @code{0}, the timescale is automatically set based on
17601762 the native stream time base. Default is 0.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t