summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2014-04-24 17:56:26 +0200
committerMartin Herkt <lachs0r@srsfckn.biz>2014-05-04 02:46:11 +0200
commit2b7bc2dfc9265861bf0d05caf8c1f99ab09a4f1f (patch)
treef1000855d5576a23a545510283a696598124cd17
parent8d7d6caeaf7901cd63596d17efbde3133699fcdf (diff)
downloadmpv-2b7bc2dfc9265861bf0d05caf8c1f99ab09a4f1f.tar.bz2
mpv-2b7bc2dfc9265861bf0d05caf8c1f99ab09a4f1f.tar.xz
options: rename audio-related options/properties
Renamed options: --audiofile → --audio-file --audiofile-cache → --audio-file-cache --channels → --audio-channels --format → --audio-format --srate → --audio-samplerate Renamed properties: samplerate → audio-samplerate channels → audio-channels
-rw-r--r--DOCS/man/en/af.rst5
-rw-r--r--DOCS/man/en/changes.rst6
-rw-r--r--DOCS/man/en/input.rst4
-rw-r--r--DOCS/man/en/options.rst97
-rw-r--r--etc/encoding-profiles.conf12
-rw-r--r--options/options.c10
-rw-r--r--player/command.c4
7 files changed, 72 insertions, 66 deletions
diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst
index b33178ec59..6aa5ca393a 100644
--- a/DOCS/man/en/af.rst
+++ b/DOCS/man/en/af.rst
@@ -250,8 +250,9 @@ Available filters are:
``<out-channels>``
- See also ``--format``, ``--srate``, and ``--channels`` for related options.
- Keep in mind that ``--channels`` does not actually force the number of
+ See also ``--audio-format``, ``--audio-samplerate``, and
+ ``--audio-channels`` for related options. Keep in mind that
+ ``--audio-channels`` does not actually force the number of
channels in most cases, while this filter can do this.
*NOTE*: this filter used to be named ``force``. Also, unlike the old
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index a264eac964..32f13e32a6 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -150,15 +150,18 @@ Command Line Switches
``-ao alsa:device=hw=0.3`` ``--ao=alsa:device=[hw:0,3]``
``-ass-bottom-margin`` ``--vf=sub=bottom:top``
``-ass`` ``--sub-ass``
+ ``-audiofile-cache`` ``--audio-file-cache``
+ ``-audiofile`` ``--audio-file``
``-benchmark`` ``--untimed`` (no stats)
``-capture`` ``--stream-capture=<filename>``
- ``-channels`` ``--channels`` (changed semantics)
+ ``-channels`` ``--audio-channels`` (changed semantics)
``-cursor-autohide-delay`` ``--cursor-autohide``
``-delay`` ``--audio-delay``
``-dumpstream`` ``--stream-dump=<filename>``
``-endpos`` ``--length``
``-font`` ``--osd-font``
``-forcedsubsonly`` ``--sub-forced-only``
+ ``-format`` ``--audio-format``
``-hardframedrop`` ``--framedrop=hard``
``-lavdopts ...`` ``--vd-lavc-...``
``-lavfdopts`` ``--demuxer-lavf-...``
@@ -179,6 +182,7 @@ Command Line Switches
``-rawaudio ...`` ``--demuxer-rawaudio-...``
``-rawvideo ...`` ``--demuxer-rawvideo-...``
``-spugauss`` ``--sub-gauss``
+ ``-srate`` ``--audio-samplerate``
``-ss`` ``--start``
``-stop-xscreensaver`` ``--stop-screensaver``
``-sub-fuzziness`` ``--sub-auto-match``
diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst
index cb2361f27e..d776082191 100644
--- a/DOCS/man/en/input.rst
+++ b/DOCS/man/en/input.rst
@@ -822,10 +822,10 @@ Property list
``audio-bitrate``
Audio bitrate. This is probably a very bad guess in most cases.
-``samplerate``
+``audio-samplerate``
Audio samplerate.
-``channels``
+``audio-channels``
Number of audio channels. The OSD value of this property is actually the
channel layout, while the raw value returns the number of channels only.
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 079bfe13b4..cb1ce8cd54 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -242,9 +242,39 @@ OPTIONS
a subtitle script with another video file. The ``--ass-style-override``
option doesn't affect how this option is interpreted.
+``--audio-channels=<number|layout>``
+ Request a channel layout for audio output (default: stereo). This will ask
+ the AO to open a device with the given channel layout. It's up to the AO
+ to accept this layout, or to pick a fallback or to error out if the
+ requested layout is not supported.
+
+ The ``--audio-channels`` option either takes a channel number or an explicit
+ channel layout. Channel numbers refer to default layouts, e.g. 2 channels
+ refer to stereo, 6 refers to 5.1.
+
+ See ``--audio-channels=help`` output for defined default layouts. This also
+ lists speaker names, which can be used to express arbitrary channel
+ layouts (e.g. ``fl-fr-lfe`` is 2.1).
+
+ You can use ``--audio-channels=empty`` to disable this. In this case, the AO
+ use the channel layout as the audio filter chain indicates.
+
+ This will also request the channel layout from the decoder. If the decoder
+ does not support the layout, it will fall back to its native channel layout.
+ (You can use ``--ad-lavc-downmix=no`` to make the decoder always output
+ its native layout.) Note that only some decoders support remixing audio.
+ Some that do include AC-3, AAC or DTS audio.
+
+ If the channel layout of the media file (i.e. the decoder) and the AO's
+ channel layout don't match, mpv will attempt to insert a conversion filter.
+
+``--audio-delay=<sec>``
+ Audio delay in seconds (positive or negative float value). Positive values
+ delay the audio, and negative values delay the video.
+
``--audio-demuxer=<[+]name>``
- Use this audio demuxer type when using ``--audiofile``. Use a '+' before the
- name to force it; this will skip some checks. Give the demuxer name as
+ Use this audio demuxer type when using ``--audio-file``. Use a '+' before
+ the name to force it; this will skip some checks. Give the demuxer name as
printed by ``--audio-demuxer=help``.
``--audio-display=<no|attachment>``
@@ -257,14 +287,25 @@ OPTIONS
This option has no influence on files with normal video tracks.
-``--audiofile=<filename>``
+``--audio-file=<filename>``
Play audio from an external file (WAV, MP3 or Ogg Vorbis) while viewing a
movie.
-``--audiofile-cache=<kBytes>``
- Enables caching for the stream used by ``--audiofile``, using the
+``--audio-file-cache=<kBytes>``
+ Enables caching for the stream used by ``--audio-file``, using the
specified amount of memory.
+``--audio-format=<format>``
+ Select the sample format used for output from the audio filter layer to
+ the sound card. The values that ``<format>`` can adopt are listed below in
+ the description of the ``format`` audio filter.
+
+``--audio-samplerate=<Hz>``
+ Select the output sample rate to be used (of course sound cards have
+ limits on this). If the sample frequency selected is different from that
+ of the current media, the lavrresample audio filter will be inserted into
+ the audio filter layer to compensate for the difference.
+
``--autofit=<[W[xH]]>``
Set the initial window size to a maximum size specified by ``WxH``, without
changing the window's aspect ratio. The size is measured in pixels, or if
@@ -439,32 +480,6 @@ OPTIONS
``--cdrom-device=<path>``
Specify the CD-ROM device (default: ``/dev/cdrom``).
-``--channels=<number|layout>``
- Request a channel layout for audio output (default: stereo). This will ask
- the AO to open a device with the given channel layout. It's up to the AO
- to accept this layout, or to pick a fallback or to error out if the
- requested layout is not supported.
-
- The ``--channels`` option either takes a channel number or an explicit
- channel layout. Channel numbers refer to default layouts, e.g. 2 channels
- refer to stereo, 6 refers to 5.1.
-
- See ``--channels=help`` output for defined default layouts. This also
- lists speaker names, which can be used to express arbitrary channel
- layouts (e.g. ``fl-fr-lfe`` is 2.1).
-
- You can use ``--channels=empty`` to disable this. In this case, the AO
- use the channel layout as the audio filter chain indicates.
-
- This will also request the channel layout from the decoder. If the decoder
- does not support the layout, it will fall back to its native channel layout.
- (You can use ``--ad-lavc-downmix=no`` to make the decoder always output
- its native layout.) Note that only some decoders support remixing audio.
- Some that do include AC-3, AAC or DTS audio.
-
- If the channel layout of the media file (i.e. the decoder) and the AO's
- channel layout don't match, mpv will attempt to insert a conversion filter.
-
``--chapter=<start[-end]>``
Specify which chapter to start playing at. Optionally specify which
chapter to end playing at. Also see ``--start``.
@@ -590,10 +605,6 @@ OPTIONS
fullscreen mode, the cursor is shown or hidden according to
``--cursor-autohide``.
-``--audio-delay=<sec>``
- Audio delay in seconds (positive or negative float value). Positive values
- delay the audio, and negative values delay the video.
-
``--deinterlace=<yes|no|auto>``
Enable or disable interlacing (default: auto, which usually means no).
Interlaced video shows ugly comb-like artifacts, which are visible on
@@ -847,11 +858,6 @@ OPTIONS
This option only works if the underlying media supports seeking
(i.e. not with stdin, pipe, etc).
-``--format=<format>``
- Select the sample format used for output from the audio filter layer to
- the sound card. The values that ``<format>`` can adopt are listed below in
- the description of the ``format`` audio filter.
-
``--fps=<float>``
Override video framerate. Useful if the original value is wrong or missing.
@@ -969,8 +975,9 @@ OPTIONS
that if the first file for example has a low sample rate, then the
following files may get resampled to the same low sample rate, resulting
in reduced sound quality. If you play files with different parameters,
- consider using options such as ``--srate`` and ``--format`` to
- explicitly select what the shared output format will be.
+ consider using options such as ``--audio-samplerate`` and
+ ``--audio-format`` to explicitly select what the shared output format
+ will be.
``--geometry=<[W[xH]][+-x+-y]>``, ``--geometry=<x:y>``
Adjust the initial window position or size. ``W`` and ``H`` set the window
@@ -2126,12 +2133,6 @@ OPTIONS
``--speed=<0.01-100>``
Slow down or speed up playback by the factor given as parameter.
-``--srate=<Hz>``
- Select the output sample rate to be used (of course sound cards have
- limits on this). If the sample frequency selected is different from that
- of the current media, the lavrresample audio filter will be
- inserted into the audio filter layer to compensate for the difference.
-
``--start=<relative time>``
Seek to given time position.
diff --git a/etc/encoding-profiles.conf b/etc/encoding-profiles.conf
index dfa1dc4871..132110bbbc 100644
--- a/etc/encoding-profiles.conf
+++ b/etc/encoding-profiles.conf
@@ -134,7 +134,7 @@ ofopts-add = packetsize=2048,muxrate=10080000
ofps = 25
oharddup = yes
ovfirst = yes # dvdauthor needs this
-srate = 48000
+audio-samplerate = 48000
ovcopts-add = g=15,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008
[enc-to-dvdntsc]
@@ -146,7 +146,7 @@ ofopts-add = packetsize=2048,muxrate=10080000
ofps = 24000/1001
oharddup = yes
ovfirst = yes # dvdauthor needs this
-srate = 48000
+audio-samplerate = 48000
ovcopts-add = g=18,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008
[enc-to-bb-9000]
@@ -169,8 +169,8 @@ profile-desc = "3GP for Nokia 6300"
profile = enc-f-3gp
ofps = 25
vf-add = scale=w=176:h=144
-srate = 16000
-channels = 1
+audio-samplerate = 16000
+audio-channels = 1
oacopts-add = b=32k
[enc-to-psp]
@@ -178,8 +178,8 @@ profile-desc = "MP4 for PlayStation Portable"
profile = enc-f-mp4
ofps = 30000/1001
vf-add = scale=w=480:h=272,dsize=480:270
-srate = 48000
-channels = 2
+audio-samplerate = 48000
+audio-channels = 2
ovcopts-add = b=512k,profile=baseline
[enc-to-iphone-noscale]
diff --git a/options/options.c b/options/options.c
index 080e0f4b90..12cdda3e98 100644
--- a/options/options.c
+++ b/options/options.c
@@ -319,8 +319,8 @@ const m_option_t mp_opts[] = {
#endif
// demuxer.c - select audio/sub file/demuxer
- OPT_STRING("audiofile", audio_stream, 0),
- OPT_INTRANGE("audiofile-cache", audio_stream_cache, 0, 50, 65536),
+ OPT_STRING("audio-file", audio_stream, 0),
+ OPT_INTRANGE("audio-file-cache", audio_stream_cache, 0, 50, 65536),
OPT_STRING("demuxer", demuxer_name, 0),
OPT_STRING("audio-demuxer", audio_demuxer_name, 0),
OPT_STRING("sub-demuxer", sub_demuxer_name, 0),
@@ -343,9 +343,9 @@ const m_option_t mp_opts[] = {
// force video/audio rate:
OPT_DOUBLE("fps", force_fps, CONF_MIN | M_OPT_FIXED),
- OPT_INTRANGE("srate", force_srate, 0, 1000, 8*48000),
- OPT_CHMAP("channels", audio_output_channels, CONF_MIN, .min = 0),
- OPT_AUDIOFORMAT("format", audio_output_format, 0),
+ OPT_INTRANGE("audio-samplerate", force_srate, 0, 1000, 8*48000),
+ OPT_CHMAP("audio-channels", audio_output_channels, CONF_MIN, .min = 0),
+ OPT_AUDIOFORMAT("audio-format", audio_output_format, 0),
OPT_DOUBLE("speed", playback_speed, M_OPT_RANGE | M_OPT_FIXED,
.min = 0.01, .max = 100.0),
diff --git a/player/command.c b/player/command.c
index ffe7a98261..ca07ded694 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2356,9 +2356,9 @@ static const m_option_t mp_properties[] = {
0, 0, 0, NULL },
{ "audio-bitrate", mp_property_audio_bitrate, CONF_TYPE_INT,
0, 0, 0, NULL },
- { "samplerate", mp_property_samplerate, CONF_TYPE_INT,
+ { "audio-samplerate", mp_property_samplerate, CONF_TYPE_INT,
0, 0, 0, NULL },
- { "channels", mp_property_channels, CONF_TYPE_INT,
+ { "audio-channels", mp_property_channels, CONF_TYPE_INT,
0, 0, 0, NULL },
M_OPTION_PROPERTY_CUSTOM("aid", mp_property_audio),
{ "balance", mp_property_balance, CONF_TYPE_FLOAT,