2012-09-14 15:51:26 +00:00
|
|
|
ENCODING
|
|
|
|
========
|
|
|
|
|
|
|
|
You can encode files from one format/codec to another using this facility.
|
|
|
|
|
2014-04-19 20:05:17 +00:00
|
|
|
``--o=<filename>``
|
2012-09-14 15:51:26 +00:00
|
|
|
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``). This can be a comma separated
|
|
|
|
list of possible formats to try. See ``--of=help`` for a full list of
|
|
|
|
supported formats.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ofopts=<options>``
|
2012-09-14 15:51:26 +00:00
|
|
|
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.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
|
|
|
Options are managed in lists. There are a few commands to manage the
|
|
|
|
options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ofopts-add=<options1[,options2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Appends the options given as arguments to the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ofopts-pre=<options1[,options2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Prepends the options given as arguments to the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ofopts-del=<index1[,index2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Deletes the options at the given indexes. Index numbers start at 0,
|
|
|
|
negative numbers address the end of the list (-1 is the last).
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ofopts-clr``
|
2012-09-14 15:51:26 +00:00
|
|
|
Completely empties the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ofps=<float value>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Specifies the output format time base (default: 24000). Low values like 25
|
|
|
|
limit video fps by dropping frames.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oautofps``
|
2012-09-14 15:51:26 +00:00
|
|
|
Sets the output format time base to the guessed frame rate of the input
|
2014-09-01 02:25:57 +00:00
|
|
|
video (simulates MEncoder behavior, useful for AVI; may cause frame drops).
|
2013-07-08 16:02:14 +00:00
|
|
|
Note that not all codecs and not all formats support VFR encoding, and some
|
|
|
|
which do have bugs when a target bitrate is specified - use ``--ofps`` or
|
|
|
|
``--oautofps`` to force CFR encoding in these cases.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--omaxfps=<float value>``
|
2013-06-09 13:37:28 +00:00
|
|
|
Specifies the minimum distance of adjacent frames (default: 0, which means
|
|
|
|
unset). Content of lower frame rate is not readjusted to this frame rate;
|
|
|
|
content of higher frame rate is decimated to this frame rate.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oharddup``
|
|
|
|
If set, the frame rate given by ``--ofps`` is attained not by skipping time
|
2012-09-14 15:51:26 +00:00
|
|
|
codes, but by duplicating frames (constant frame rate mode).
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oneverdrop``
|
2012-09-14 15:51:26 +00:00
|
|
|
If set, frames are never dropped. Instead, time codes of video are
|
2013-07-08 16:02:14 +00:00
|
|
|
readjusted to always increase. This may cause AV desync, though; to work
|
|
|
|
around this, use a high-fps time base using ``--ofps`` and absolutely
|
|
|
|
avoid ``--oautofps``.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oac=<codec>``
|
2012-09-29 13:04:40 +00:00
|
|
|
Specifies the output audio codec. This can be a comma separated list of
|
2013-07-08 16:02:14 +00:00
|
|
|
possible codecs to try. See ``--oac=help`` for a full list of supported
|
|
|
|
codecs.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oaoffset=<value>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Shifts audio data by the given time (in seconds) by adding/removing
|
|
|
|
samples at the start.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oacopts=<options>``
|
2012-09-14 15:51:26 +00:00
|
|
|
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
|
2012-09-14 15:51:26 +00:00
|
|
|
|
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.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
|
|
|
Options are managed in lists. There are a few commands to manage the
|
|
|
|
options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oacopts-add=<options1[,options2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Appends the options given as arguments to the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oacopts-pre=<options1[,options2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Prepends the options given as arguments to the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oacopts-del=<index1[,index2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Deletes the options at the given indexes. Index numbers start at 0,
|
|
|
|
negative numbers address the end of the list (-1 is the last).
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oacopts-clr``
|
2012-09-14 15:51:26 +00:00
|
|
|
Completely empties the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--oafirst``
|
2012-09-29 13:04:40 +00:00
|
|
|
Force the audio stream to become the first stream in the output. By default
|
|
|
|
the order is unspecified.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovc=<codec>``
|
2012-09-29 13:04:40 +00:00
|
|
|
Specifies the output video codec. This can be a comma separated list of
|
2013-07-08 16:02:14 +00:00
|
|
|
possible codecs to try. See ``--ovc=help`` for a full list of supported
|
|
|
|
codecs.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovoffset=<value>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Shifts video data by the given time (in seconds) by shifting the pts
|
|
|
|
values.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovcopts <options>``
|
2012-09-14 15:51:26 +00:00
|
|
|
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.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``"--ovc=libx264 --ovcopts=crf=23"``
|
|
|
|
selects VBR quality factor 23 for H.264 encoding.
|
2012-09-14 15:51:26 +00:00
|
|
|
|
|
|
|
Options are managed in lists. There are a few commands to manage the
|
|
|
|
options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovcopts-add=<options1[,options2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Appends the options given as arguments to the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovcopts-pre=<options1[,options2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Prepends the options given as arguments to the options list.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovcopts-del=<index1[,index2,...]>``
|
2012-09-14 15:51:26 +00:00
|
|
|
Deletes the options at the given indexes. Index numbers start at 0,
|
|
|
|
negative numbers address the end of the list (-1 is the last).
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovcopts-clr``
|
2012-09-14 15:51:26 +00:00
|
|
|
Completely empties the options list.
|
2012-09-29 13:04:40 +00:00
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ovfirst``
|
2012-09-29 13:04:40 +00:00
|
|
|
Force the video stream to become the first stream in the output. By default
|
|
|
|
the order is unspecified.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--ocopyts``
|
2012-09-29 13:04:40 +00:00
|
|
|
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). Discontinuities are still fixed.
|
2012-09-29 13:04:40 +00:00
|
|
|
By default, audio pts are set to playback time and video pts are
|
|
|
|
synchronized to match audio pts, as some output formats do not support
|
|
|
|
anything else.
|
|
|
|
|
2013-07-08 16:02:14 +00:00
|
|
|
``--orawts``
|
2012-09-29 13:04:40 +00:00
|
|
|
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
|
2012-09-29 13:04:40 +00:00
|
|
|
and all pts are passed through as-is. Never seek backwards or use multiple
|
|
|
|
input files in this mode!
|
2014-04-14 18:29:23 +00:00
|
|
|
|
|
|
|
``--no-ometadata``
|
|
|
|
Turns off copying of metadata from input files to output files when
|
|
|
|
encoding (which is enabled by default).
|