Make various movflags grouped together similar to how it is done for other options.
Unified · Split
| @@ -1630,8 +1630,10 @@ MOV/MP4/ISMV (Smooth Streaming) muxer. · 1629 unmodified lines | |||
| 1630 | The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 | 1630 | The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 |
| 1631 | file has all the metadata about all packets stored in one location | 1631 | file 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 for | 1632 | (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 | 1633 | better playback by adding @code{+faststart} to the @code{-movflags}, or |
| 1634 | using the @command{qt-faststart} tool). A fragmented | 1634 | using the @command{qt-faststart} tool). |
| 1635 | |||
| 1636 | A fragmented | ||
| 1635 | file consists of a number of fragments, where packets and metadata | 1637 | file consists of a number of fragments, where packets and metadata |
| 1636 | about these packets are stored together. Writing a fragmented | 1638 | about these packets are stored together. Writing a fragmented |
| 1637 | file has the advantage that the file is decodable even if the | 1639 | 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 | |||
| 1641 | every single packet in memory until the file is closed). The downside | 1643 | every single packet in memory until the file is closed). The downside |
| 1642 | is that it is less compatible with other applications. | 1644 | is that it is less compatible with other applications. |
| 1643 | 1645 | ||
| 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. | ||
| 1645 | 1653 | ||
| 1646 | Fragmentation is enabled by setting one of the AVOptions that define | 1654 | @subsection Options |
| 1647 | how to cut the file into fragments: | ||
| 1648 | 1655 | ||
| 1649 | @table @option | 1656 | @table @option |
| 1650 | @item -moov_size @var{bytes} | 1657 | @item frag_duration @var{duration} |
| 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} | ||
| 1656 | Create fragments that are @var{duration} microseconds long. | 1658 | Create fragments that are @var{duration} microseconds long. |
| 1657 | @item -frag_size @var{size} | 1659 | @item frag_size @var{size} |
| 1658 | Create fragments that contain up to @var{size} bytes of payload data. | 1660 | 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 | ||
| 1660 | Allow the caller to manually choose when to cut fragments, by | 1669 | Allow the caller to manually choose when to cut fragments, by |
| 1661 | calling @code{av_write_frame(ctx, NULL)} to write a fragment with | 1670 | calling @code{av_write_frame(ctx, NULL)} to write a fragment with |
| 1662 | the packets written so far. (This is only useful with other | 1671 | the packets written so far. (This is only useful with other |
| 1663 | applications integrating libavformat, not from @command{ffmpeg}.) | 1672 | applications integrating libavformat, not from @command{ffmpeg}.) |
| 1664 | @item -min_frag_duration @var{duration} | 1673 | @item empty_moov |
| 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 | ||
| 1678 | Write an initial moov atom directly at the start of the file, without | 1674 | Write an initial moov atom directly at the start of the file, without |
| 1679 | describing any samples in it. Generally, an mdat/moov pair is written | 1675 | describing any samples in it. Generally, an mdat/moov pair is written |
| 1680 | at the start of the file, as a normal MOV/MP4 file, containing only | 1676 | 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 | |||
| 1683 | a zero duration. | 1679 | a zero duration. |
| 1684 | 1680 | ||
| 1685 | This option is implicitly set when writing ismv (Smooth Streaming) files. | 1681 | This option is implicitly set when writing ismv (Smooth Streaming) files. |
| 1686 | @item -movflags separate_moof | 1682 | @item separate_moof |
| 1687 | Write a separate moof (movie fragment) atom for each track. Normally, | 1683 | Write a separate moof (movie fragment) atom for each track. Normally, |
| 1688 | packets for all tracks are written in a moof atom (which is slightly | 1684 | packets for all tracks are written in a moof atom (which is slightly |
| 1689 | more efficient), but with this option set, the muxer writes one moof/mdat | 1685 | more efficient), but with this option set, the muxer writes one moof/mdat |
| 1690 | pair for each track, making it easier to separate tracks. | 1686 | pair for each track, making it easier to separate tracks. |
| 1691 | 1687 | ||
| 1692 | This option is implicitly set when writing ismv (Smooth Streaming) files. | 1688 | This option is implicitly set when writing ismv (Smooth Streaming) files. |
| 1693 | @item -movflags skip_sidx | 1689 | @item skip_sidx |
| 1694 | Skip writing of sidx atom. When bitrate overhead due to sidx atom is high, | 1690 | Skip writing of sidx atom. When bitrate overhead due to sidx atom is high, |
| 1695 | this option could be used for cases where sidx atom is not mandatory. | 1691 | this option could be used for cases where sidx atom is not mandatory. |
| 1696 | When global_sidx flag is enabled, this option will be ignored. | 1692 | When global_sidx flag is enabled, this option will be ignored. |
| 1697 | @item -movflags faststart | 1693 | @item faststart |
| 1698 | Run a second pass moving the index (moov atom) to the beginning of the file. | 1694 | Run a second pass moving the index (moov atom) to the beginning of the file. |
| 1699 | This operation can take a while, and will not work in various situations such | 1695 | This operation can take a while, and will not work in various situations such |
| 1700 | as fragmented output, thus it is not enabled by default. | 1696 | as fragmented output, thus it is not enabled by default. |
| 1701 | @item -movflags rtphint | 1697 | @item rtphint |
| 1702 | Add RTP hinting tracks to the output file. | 1698 | Add RTP hinting tracks to the output file. |
| 1703 | @item -movflags disable_chpl | 1699 | @item disable_chpl |
| 1704 | Disable Nero chapter markers (chpl atom). Normally, both Nero chapters | 1700 | Disable Nero chapter markers (chpl atom). Normally, both Nero chapters |
| 1705 | and a QuickTime chapter track are written to the file. With this option | 1701 | and a QuickTime chapter track are written to the file. With this option |
| 1706 | set, only the QuickTime chapter track will be written. Nero chapters can | 1702 | set, only the QuickTime chapter track will be written. Nero chapters can |
| 1707 | cause failures when the file is reprocessed with certain tagging programs, like | 1703 | cause failures when the file is reprocessed with certain tagging programs, like |
| 1708 | mp3Tag 2.61a and iTunes 11.3, most likely other versions are affected as well. | 1704 | 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 |
| 1710 | Do not write any absolute base_data_offset in tfhd atoms. This avoids | 1706 | Do not write any absolute base_data_offset in tfhd atoms. This avoids |
| 1711 | tying fragments to absolute byte positions in the file/streams. | 1707 | tying fragments to absolute byte positions in the file/streams. |
| 1712 | @item -movflags default_base_moof | 1708 | @item default_base_moof |
| 1713 | Similarly to the omit_tfhd_offset, this flag avoids writing the | 1709 | Similarly to the omit_tfhd_offset, this flag avoids writing the |
| 1714 | absolute base_data_offset field in tfhd atoms, but does so by using | 1710 | absolute base_data_offset field in tfhd atoms, but does so by using |
| 1715 | the new default-base-is-moof flag instead. This flag is new from | 1711 | the new default-base-is-moof flag instead. This flag is new from |
| 1716 | 14496-12:2012. This may make the fragments easier to parse in certain | 1712 | 14496-12:2012. This may make the fragments easier to parse in certain |
| 1717 | circumstances (avoiding basing track fragment location calculations | 1713 | circumstances (avoiding basing track fragment location calculations |
| 1718 | on the implicit end of the previous track fragment). | 1714 | on the implicit end of the previous track fragment). |
| 1719 | @item -write_tmcd | 1715 | @item negative_cts_offsets |
| 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 | ||
| 1723 | Enables utilization of version 1 of the CTTS box, in which the CTS offsets can | 1716 | Enables utilization of version 1 of the CTTS box, in which the CTS offsets can |
| 1724 | be negative. This enables the initial sample to have DTS/CTS of zero, and | 1717 | be negative. This enables the initial sample to have DTS/CTS of zero, and |
| 1725 | reduces the need for edit lists for some cases such as video tracks with | 1718 | 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 | |||
| 1727 | guidelines. | 1720 | guidelines. |
| 1728 | 1721 | ||
| 1729 | This option is implicitly set when writing ismv (Smooth Streaming) files. | 1722 | 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). | ||
| 1730 | 1732 | ||
| 1731 | @item -write_btrt @var{bool} | 1733 | @item write_btrt @var{bool} |
| 1732 | Force or disable writing bitrate box inside stsd box of a track. | 1734 | Force or disable writing bitrate box inside stsd box of a track. |
| 1733 | The box contains decoding buffer size (in bytes), maximum bitrate and | 1735 | The box contains decoding buffer size (in bytes), maximum bitrate and |
| 1734 | average bitrate for the track. The box will be skipped if none of these values | 1736 | average bitrate for the track. The box will be skipped if none of these values |
| 1735 | can be computed. | 1737 | can be computed. |
| 1736 | Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode. | 1738 | Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode. |
| 1737 | 1739 | ||
| 1738 | @item -write_prft | 1740 | @item write_prft |
| 1739 | Write producer time reference box (PRFT) with a specified time source for the | 1741 | Write producer time reference box (PRFT) with a specified time source for the |
| 1740 | NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource | 1742 | NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource |
| 1741 | as wallclock time and @samp{pts} to specify timesource as input packets' PTS | 1743 | 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 | |||
| 1746 | encoding use case with decklink capture source where @option{video_pts} and | 1748 | encoding 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} |
| 1750 | Enable to skip writing the name inside a @code{hdlr} box. | 1752 | Enable to skip writing the name inside a @code{hdlr} box. |
| 1751 | Default is @code{false}. | 1753 | Default is @code{false}. |
| 1752 | 1754 | ||
| 1753 | @item -movie_timescale @var{scale} | 1755 | @item movie_timescale @var{scale} |
| 1754 | Set the timescale written in the movie header box (@code{mvhd}). | 1756 | Set the timescale written in the movie header box (@code{mvhd}). |
| 1755 | Range is 1 to INT_MAX. Default is 1000. | 1757 | Range is 1 to INT_MAX. Default is 1000. |
| 1756 | 1758 | ||
| 1757 | @item -video_track_timescale @var{scale} | 1759 | @item video_track_timescale @var{scale} |
| 1758 | Set the timescale used for video tracks. Range is 0 to INT_MAX. | 1760 | Set the timescale used for video tracks. Range is 0 to INT_MAX. |
| 1759 | If set to @code{0}, the timescale is automatically set based on | 1761 | If set to @code{0}, the timescale is automatically set based on |
| 1760 | the native stream time base. Default is 0. | 1762 | the native stream time base. Default is 0. |