mpv/DOCS/man/encode.rst

124 lines
4.1 KiB
ReStructuredText
Raw Permalink Normal View History

ENCODING
========
You can encode files from one format/codec to another using this facility.
``--o=<filename>``
Enables encoding mode and specifies the output file name.
2013-07-08 16:02:14 +00:00
``--of=<format>``
Specifies the output format (overrides autodetection by the file name
extension of the file specified by ``-o``). See ``--of=help`` for a full
list of supported formats.
2013-07-08 16:02:14 +00:00
``--ofopts=<options>``
Specifies the output format options for libavformat.
2013-07-08 16:02:14 +00:00
See ``--ofopts=help`` for a full list of supported options.
This is a key/value list option. See `List Options`_ for details.
``--ofopts-add=<option>``
Appends the option given as an argument to the options list. (Passing
multiple options is currently still possible, but deprecated.)
``--ofopts=""``
Completely empties the options list.
2013-07-08 16:02:14 +00:00
``--oac=<codec>``
Specifies the output audio codec. See ``--oac=help`` for a full list of
supported codecs.
2013-07-08 16:02:14 +00:00
``--oaoffset=<value>``
Shifts audio data by the given time (in seconds) by adding/removing
samples at the start. Deprecated.
2013-07-08 16:02:14 +00:00
``--oacopts=<options>``
Specifies the output audio codec options for libavcodec.
2013-07-08 16:02:14 +00:00
See ``--oacopts=help`` for a full list of supported options.
.. admonition:: Example
2013-07-08 16:02:14 +00:00
"``--oac=libmp3lame --oacopts=b=128000``"
2014-09-01 02:25:57 +00:00
selects 128 kbps MP3 encoding.
This is a key/value list option. See `List Options`_ for details.
``--oacopts-add=<option>``
Appends the option given as an argument to the options list. (Passing
multiple options is currently still possible, but deprecated.)
``--oacopts=""``
Completely empties the options list.
2013-07-08 16:02:14 +00:00
``--oafirst``
2015-12-19 08:26:27 +00:00
Force the audio stream to become the first stream in the output.
By default, the order is unspecified. Deprecated.
2013-07-08 16:02:14 +00:00
``--ovc=<codec>``
Specifies the output video codec. See ``--ovc=help`` for a full list of
supported codecs.
2013-07-08 16:02:14 +00:00
``--ovoffset=<value>``
Shifts video data by the given time (in seconds) by shifting the pts
values. Deprecated.
``--ovcopts=<options>``
Specifies the output video codec options for libavcodec.
See --ovcopts=help for a full list of supported options.
2013-07-08 16:02:14 +00:00
.. admonition:: Examples
2015-06-23 19:49:46 +00:00
``"--ovc=mpeg4 --ovcopts=qscale=5"``
2013-07-08 16:02:14 +00:00
selects constant quantizer scale 5 for MPEG-4 encoding.
2013-07-08 16:02:14 +00:00
``"--ovc=libx264 --ovcopts=crf=23"``
selects VBR quality factor 23 for H.264 encoding.
This is a key/value list option. See `List Options`_ for details.
``--ovcopts-add=<option>``
Appends the option given as an argument to the options list. (Passing
multiple options is currently still possible, but deprecated.)
``--ovcopts=""``
Completely empties the options list.
2013-07-08 16:02:14 +00:00
``--ovfirst``
2015-12-19 08:26:27 +00:00
Force the video stream to become the first stream in the output.
By default, the order is unspecified. Deprecated.
2013-07-08 16:02:14 +00:00
``--orawts``
Copies input pts to the output video (not supported by some output
2013-07-08 16:02:14 +00:00
container formats, e.g. AVI). In this mode, discontinuities are not fixed
and all pts are passed through as-is. Never seek backwards or use multiple
input files in this mode!
``--no-ocopy-metadata``
Turns off copying of metadata from input files to output files when
encoding (which is enabled by default).
``--oset-metadata=<metadata-tag[,metadata-tag,...]>``
Specifies metadata to include in the output file.
Supported keys vary between output formats. For example, Matroska (MKV) and
FLAC allow almost arbitrary keys, while support in MP4 and MP3 is more
limited.
This is a key/value list option. See `List Options`_ for details.
.. admonition:: Example
"``--oset-metadata=title="Output title",comment="Another tag"``"
adds a title and a comment to the output file.
``--oremove-metadata=<metadata-tag[,metadata-tag,...]>``
Specifies metadata to exclude from the output file when copying from the
input file.
This is a string list option. See `List Options`_ for details.
.. admonition:: Example
"``--oremove-metadata=comment,genre``"
excludes copying of the the comment and genre tags to the output
file.