From f2b026f941eb3d88b823245668783d90c979d874 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 19 Apr 2018 19:34:52 +0200 Subject: [PATCH] encoding: deprecate a bunch of obscure options --audio-delay does not work correctly yet, but hopefully this can be fixed later. --- DOCS/interface-changes.rst | 1 + DOCS/man/encode.rst | 8 ++++---- common/encode_lavc.c | 12 ++++++++---- etc/encoding-profiles.conf | 2 -- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index a39043dc9b..456b4ef473 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -93,6 +93,7 @@ Interface changes playback only in the player initialization phase. It could change again in the future. (This kind of waiting was always a feature to prevent that playback is started while scripts are only half-loaded.) + - deprecate --ovoffset, --oaoffset, --ovfirst, --oafirst --- mpv 0.28.0 --- - rename --hwdec=mediacodec option to mediacodec-copy, to reflect conventions followed by other hardware video decoding APIs diff --git a/DOCS/man/encode.rst b/DOCS/man/encode.rst index 2c5bc14ddc..0edf7e7215 100644 --- a/DOCS/man/encode.rst +++ b/DOCS/man/encode.rst @@ -65,7 +65,7 @@ You can encode files from one format/codec to another using this facility. ``--oaoffset=`` Shifts audio data by the given time (in seconds) by adding/removing - samples at the start. + samples at the start. Deprecated. ``--oacopts=`` Specifies the output audio codec options for libavcodec. @@ -94,7 +94,7 @@ You can encode files from one format/codec to another using this facility. ``--oafirst`` Force the audio stream to become the first stream in the output. - By default, the order is unspecified. + By default, the order is unspecified. Deprecated. ``--ovc=`` Specifies the output video codec. This can be a comma separated list of @@ -103,7 +103,7 @@ You can encode files from one format/codec to another using this facility. ``--ovoffset=`` Shifts video data by the given time (in seconds) by shifting the pts - values. + values. Deprecated. ``--ovcopts `` Specifies the output video codec options for libavcodec. @@ -135,7 +135,7 @@ You can encode files from one format/codec to another using this facility. ``--ovfirst`` Force the video stream to become the first stream in the output. - By default, the order is unspecified. + By default, the order is unspecified. Deprecated. ``--ocopyts`` Copies input pts to the output video (not supported by some output diff --git a/common/encode_lavc.c b/common/encode_lavc.c index 72e99a5c30..bb7b6464e4 100644 --- a/common/encode_lavc.c +++ b/common/encode_lavc.c @@ -47,14 +47,18 @@ const struct m_sub_options encode_config = { OPT_STRING("oac", acodec, M_OPT_FIXED), OPT_STRINGLIST("oacopts", aopts, M_OPT_FIXED), OPT_FLAG("oharddup", harddup, M_OPT_FIXED), - OPT_FLOATRANGE("ovoffset", voffset, M_OPT_FIXED, -1000000.0, 1000000.0), - OPT_FLOATRANGE("oaoffset", aoffset, M_OPT_FIXED, -1000000.0, 1000000.0), + OPT_FLOATRANGE("ovoffset", voffset, M_OPT_FIXED, -1000000.0, 1000000.0, + .deprecation_message = "--audio-delay (once unbroken)"), + OPT_FLOATRANGE("oaoffset", aoffset, M_OPT_FIXED, -1000000.0, 1000000.0, + .deprecation_message = "--audio-delay (once unbroken)"), OPT_FLAG("ocopyts", copyts, M_OPT_FIXED), OPT_FLAG("orawts", rawts, M_OPT_FIXED), OPT_FLAG("oautofps", autofps, M_OPT_FIXED), OPT_FLAG("oneverdrop", neverdrop, M_OPT_FIXED), - OPT_FLAG("ovfirst", video_first, M_OPT_FIXED), - OPT_FLAG("oafirst", audio_first, M_OPT_FIXED), + OPT_FLAG("ovfirst", video_first, M_OPT_FIXED, + .deprecation_message = "no replacement"), + OPT_FLAG("oafirst", audio_first, M_OPT_FIXED, + .deprecation_message = "no replacement"), OPT_FLAG("ocopy-metadata", copy_metadata, M_OPT_FIXED), OPT_KEYVALUELIST("oset-metadata", set_metadata, M_OPT_FIXED), OPT_STRINGLIST("oremove-metadata", remove_metadata, M_OPT_FIXED), diff --git a/etc/encoding-profiles.conf b/etc/encoding-profiles.conf index c115573ff0..c6f716a8bb 100644 --- a/etc/encoding-profiles.conf +++ b/etc/encoding-profiles.conf @@ -149,7 +149,6 @@ ofopts-append = packetsize=2048 ofopts-append = muxrate=10080000 ofps = 25 oharddup = yes -ovfirst = yes # dvdauthor needs this audio-samplerate = 48000 ovcopts = g=15,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008 @@ -162,7 +161,6 @@ ofopts-append = packetsize=2048 ofopts-append = muxrate=10080000 ofps = 24000/1001 oharddup = yes -ovfirst = yes # dvdauthor needs this audio-samplerate = 48000 ovcopts = g=18,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008