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
1630The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP41630The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4
1631file has all the metadata about all packets stored in one location1631file has all the metadata about all packets stored in one location
1632(written at the end of the file, it can be moved to the start for1632(written at the end of the file, it can be moved to the start for
1633better playback by adding @var{faststart} to the @var{movflags}, or1633better playback by adding @code{+faststart} to the @code{-movflags}, or
1634using the @command{qt-faststart} tool). A fragmented1634using the @command{qt-faststart} tool).
1635
1636A fragmented
1635file consists of a number of fragments, where packets and metadata1637file consists of a number of fragments, where packets and metadata
1636about these packets are stored together. Writing a fragmented1638about these packets are stored together. Writing a fragmented
1637file has the advantage that the file is decodable even if the1639file 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
1641every single packet in memory until the file is closed). The downside1643every single packet in memory until the file is closed). The downside
1642is that it is less compatible with other applications.1644is that it is less compatible with other applications.
1643 1645
1644@subsection Options1646Fragmentation is enabled by setting one of the options that define
1647how 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,
1650fragments are cut when one of the specified conditions is fulfilled. The
1651exception to this is @code{-min_frag_duration}, which has to be fulfilled for
1652any of the other conditions to apply.
1645 1653
1646Fragmentation is enabled by setting one of the AVOptions that define1654@subsection Options
1647how to cut the file into fragments:
1648 1655
1649@table @option1656@table @option
1650@item -moov_size @var{bytes}1657@item frag_duration @var{duration}
1651Reserves space for the moov atom at the beginning of the file instead of placing the
1652moov atom at the end. If the space reserved is insufficient, muxing will fail.
1653@item -movflags frag_keyframe
1654Start a new fragment at each video keyframe.
1655@item -frag_duration @var{duration}
1656Create fragments that are @var{duration} microseconds long.1658Create fragments that are @var{duration} microseconds long.
1657@item -frag_size @var{size}1659@item frag_size @var{size}
1658Create fragments that contain up to @var{size} bytes of payload data.1660Create fragments that contain up to @var{size} bytes of payload data.
1659@item -movflags frag_custom1661@item min_frag_duration @var{duration}
1662Don't create fragments that are shorter than @var{duration} microseconds long.
1663@item movflags @var{flags}
1664Set various muxing switches. The following flags can be used:
1665@table @samp
1666@item frag_keyframe
1667Start a new fragment at each video keyframe.
1668@item frag_custom
1660Allow the caller to manually choose when to cut fragments, by1669Allow the caller to manually choose when to cut fragments, by
1661calling @code{av_write_frame(ctx, NULL)} to write a fragment with1670calling @code{av_write_frame(ctx, NULL)} to write a fragment with
1662the packets written so far. (This is only useful with other1671the packets written so far. (This is only useful with other
1663applications integrating libavformat, not from @command{ffmpeg}.)1672applications integrating libavformat, not from @command{ffmpeg}.)
1664@item -min_frag_duration @var{duration}1673@item empty_moov
1665Don't create fragments that are shorter than @var{duration} microseconds long.
1666@end table
1667
1668If more than one condition is specified, fragments are cut when
1669one 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
1671conditions to apply.
1672
1673Additionally, the way the output file is written can be adjusted
1674through a few other options:
1675
1676@table @option
1677@item -movflags empty_moov
1678Write an initial moov atom directly at the start of the file, without1674Write an initial moov atom directly at the start of the file, without
1679describing any samples in it. Generally, an mdat/moov pair is written1675describing any samples in it. Generally, an mdat/moov pair is written
1680at the start of the file, as a normal MOV/MP4 file, containing only1676at 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
1683a zero duration.1679a zero duration.
1684 1680
1685This option is implicitly set when writing ismv (Smooth Streaming) files.1681This option is implicitly set when writing ismv (Smooth Streaming) files.
1686@item -movflags separate_moof1682@item separate_moof
1687Write a separate moof (movie fragment) atom for each track. Normally,1683Write a separate moof (movie fragment) atom for each track. Normally,
1688packets for all tracks are written in a moof atom (which is slightly1684packets for all tracks are written in a moof atom (which is slightly
1689more efficient), but with this option set, the muxer writes one moof/mdat1685more efficient), but with this option set, the muxer writes one moof/mdat
1690pair for each track, making it easier to separate tracks.1686pair for each track, making it easier to separate tracks.
1691 1687
1692This option is implicitly set when writing ismv (Smooth Streaming) files.1688This option is implicitly set when writing ismv (Smooth Streaming) files.
1693@item -movflags skip_sidx1689@item skip_sidx
1694Skip writing of sidx atom. When bitrate overhead due to sidx atom is high,1690Skip writing of sidx atom. When bitrate overhead due to sidx atom is high,
1695this option could be used for cases where sidx atom is not mandatory.1691this option could be used for cases where sidx atom is not mandatory.
1696When global_sidx flag is enabled, this option will be ignored.1692When global_sidx flag is enabled, this option will be ignored.
1697@item -movflags faststart1693@item faststart
1698Run a second pass moving the index (moov atom) to the beginning of the file.1694Run a second pass moving the index (moov atom) to the beginning of the file.
1699This operation can take a while, and will not work in various situations such1695This operation can take a while, and will not work in various situations such
1700as fragmented output, thus it is not enabled by default.1696as fragmented output, thus it is not enabled by default.
1701@item -movflags rtphint1697@item rtphint
1702Add RTP hinting tracks to the output file.1698Add RTP hinting tracks to the output file.
1703@item -movflags disable_chpl1699@item disable_chpl
1704Disable Nero chapter markers (chpl atom). Normally, both Nero chapters1700Disable Nero chapter markers (chpl atom). Normally, both Nero chapters
1705and a QuickTime chapter track are written to the file. With this option1701and a QuickTime chapter track are written to the file. With this option
1706set, only the QuickTime chapter track will be written. Nero chapters can1702set, only the QuickTime chapter track will be written. Nero chapters can
1707cause failures when the file is reprocessed with certain tagging programs, like1703cause failures when the file is reprocessed with certain tagging programs, like
1708mp3Tag 2.61a and iTunes 11.3, most likely other versions are affected as well.1704mp3Tag 2.61a and iTunes 11.3, most likely other versions are affected as well.
1709@item -movflags omit_tfhd_offset1705@item omit_tfhd_offset
1710Do not write any absolute base_data_offset in tfhd atoms. This avoids1706Do not write any absolute base_data_offset in tfhd atoms. This avoids
1711tying fragments to absolute byte positions in the file/streams.1707tying fragments to absolute byte positions in the file/streams.
1712@item -movflags default_base_moof1708@item default_base_moof
1713Similarly to the omit_tfhd_offset, this flag avoids writing the1709Similarly to the omit_tfhd_offset, this flag avoids writing the
1714absolute base_data_offset field in tfhd atoms, but does so by using1710absolute base_data_offset field in tfhd atoms, but does so by using
1715the new default-base-is-moof flag instead. This flag is new from1711the new default-base-is-moof flag instead. This flag is new from
171614496-12:2012. This may make the fragments easier to parse in certain171214496-12:2012. This may make the fragments easier to parse in certain
1717circumstances (avoiding basing track fragment location calculations1713circumstances (avoiding basing track fragment location calculations
1718on the implicit end of the previous track fragment).1714on the implicit end of the previous track fragment).
1719@item -write_tmcd1715@item negative_cts_offsets
1720Specify @code{on} to force writing a timecode track, @code{off} to disable it
1721and @code{auto} to write a timecode track only for mov and mp4 output (default).
1722@item -movflags negative_cts_offsets
1723Enables utilization of version 1 of the CTTS box, in which the CTS offsets can1716Enables utilization of version 1 of the CTTS box, in which the CTS offsets can
1724be negative. This enables the initial sample to have DTS/CTS of zero, and1717be negative. This enables the initial sample to have DTS/CTS of zero, and
1725reduces the need for edit lists for some cases such as video tracks with1718reduces 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
1727guidelines.1720guidelines.
1728 1721
1729This option is implicitly set when writing ismv (Smooth Streaming) files.1722This option is implicitly set when writing ismv (Smooth Streaming) files.
1723@end table
1724
1725@item moov_size @var{bytes}
1726Reserves space for the moov atom at the beginning of the file instead of placing the
1727moov atom at the end. If the space reserved is insufficient, muxing will fail.
1728
1729@item write_tmcd
1730Specify @code{on} to force writing a timecode track, @code{off} to disable it
1731and @code{auto} to write a timecode track only for mov and mp4 output (default).
1730 1732
1731@item -write_btrt @var{bool}1733@item write_btrt @var{bool}
1732Force or disable writing bitrate box inside stsd box of a track.1734Force or disable writing bitrate box inside stsd box of a track.
1733The box contains decoding buffer size (in bytes), maximum bitrate and1735The box contains decoding buffer size (in bytes), maximum bitrate and
1734average bitrate for the track. The box will be skipped if none of these values1736average bitrate for the track. The box will be skipped if none of these values
1735can be computed.1737can be computed.
1736Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode.1738Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode.
1737 1739
1738@item -write_prft1740@item write_prft
1739Write producer time reference box (PRFT) with a specified time source for the1741Write producer time reference box (PRFT) with a specified time source for the
1740NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource1742NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource
1741as wallclock time and @samp{pts} to specify timesource as input packets' PTS1743as 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
1746encoding use case with decklink capture source where @option{video_pts} and1748encoding use case with decklink capture source where @option{video_pts} and
1747@option{audio_pts} are set to @samp{abs_wallclock}.1749@option{audio_pts} are set to @samp{abs_wallclock}.
1748 1750
1749@item -empty_hdlr_name @var{bool}1751@item empty_hdlr_name @var{bool}
1750Enable to skip writing the name inside a @code{hdlr} box.1752Enable to skip writing the name inside a @code{hdlr} box.
1751Default is @code{false}.1753Default is @code{false}.
1752 1754
1753@item -movie_timescale @var{scale}1755@item movie_timescale @var{scale}
1754Set the timescale written in the movie header box (@code{mvhd}).1756Set the timescale written in the movie header box (@code{mvhd}).
1755Range is 1 to INT_MAX. Default is 1000.1757Range is 1 to INT_MAX. Default is 1000.
1756 1758
1757@item -video_track_timescale @var{scale}1759@item video_track_timescale @var{scale}
1758Set the timescale used for video tracks. Range is 0 to INT_MAX.1760Set the timescale used for video tracks. Range is 0 to INT_MAX.
1759If set to @code{0}, the timescale is automatically set based on1761If set to @code{0}, the timescale is automatically set based on
1760the native stream time base. Default is 0.1762the 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