2010-01-30 23:24:23 +00:00
|
|
|
/*
|
2015-04-13 07:36:54 +00:00
|
|
|
* This file is part of mpv.
|
2010-01-30 23:24:23 +00:00
|
|
|
*
|
2015-04-13 07:36:54 +00:00
|
|
|
* mpv is free software; you can redistribute it and/or modify
|
2010-01-30 23:24:23 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2015-04-13 07:36:54 +00:00
|
|
|
* mpv is distributed in the hope that it will be useful,
|
2010-01-30 23:24:23 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
2015-04-13 07:36:54 +00:00
|
|
|
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
2010-01-30 23:24:23 +00:00
|
|
|
*/
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_CFG_MPLAYER_H
|
|
|
|
#define MPLAYER_CFG_MPLAYER_H
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2001-03-18 23:32:31 +00:00
|
|
|
/*
|
|
|
|
* config for cfgparser
|
|
|
|
*/
|
|
|
|
|
2008-03-31 03:19:29 +00:00
|
|
|
#include <stddef.h>
|
2011-03-10 21:08:21 +00:00
|
|
|
#include <sys/types.h>
|
2013-07-07 21:54:11 +00:00
|
|
|
#include <limits.h>
|
2008-03-31 03:19:29 +00:00
|
|
|
|
2011-03-10 21:08:21 +00:00
|
|
|
#include "config.h"
|
2014-06-11 22:34:20 +00:00
|
|
|
|
2015-01-20 14:18:51 +00:00
|
|
|
#ifdef _WIN32
|
2014-06-11 22:34:20 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "options.h"
|
2013-12-17 01:02:25 +00:00
|
|
|
#include "m_config.h"
|
|
|
|
#include "m_option.h"
|
2013-12-22 13:33:15 +00:00
|
|
|
#include "common/common.h"
|
2014-04-13 16:51:43 +00:00
|
|
|
#include "stream/stream.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "video/csputils.h"
|
2015-07-07 12:25:37 +00:00
|
|
|
#include "video/hwdec.h"
|
2013-11-24 11:58:06 +00:00
|
|
|
#include "sub/osd.h"
|
2013-06-07 20:57:00 +00:00
|
|
|
#include "audio/mixer.h"
|
|
|
|
#include "audio/filter/af.h"
|
|
|
|
#include "audio/decode/dec_audio.h"
|
2013-12-17 00:08:53 +00:00
|
|
|
#include "player/core.h"
|
2013-12-26 18:22:40 +00:00
|
|
|
#include "player/command.h"
|
2014-06-30 10:49:01 +00:00
|
|
|
#include "stream/stream.h"
|
2001-11-09 23:46:06 +00:00
|
|
|
|
2013-06-07 20:57:00 +00:00
|
|
|
extern const char mp_help_text[];
|
|
|
|
|
2013-12-26 18:22:40 +00:00
|
|
|
static void print_version(struct mp_log *log)
|
2013-06-07 20:57:00 +00:00
|
|
|
{
|
2013-12-21 18:45:42 +00:00
|
|
|
mp_print_version(log, true);
|
2013-12-26 18:22:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void print_help(struct mp_log *log)
|
|
|
|
{
|
|
|
|
mp_info(log, "%s", mp_help_text);
|
2013-06-07 20:57:00 +00:00
|
|
|
}
|
2013-05-15 13:14:24 +00:00
|
|
|
|
2014-06-09 21:54:45 +00:00
|
|
|
extern const struct m_sub_options tv_params_conf;
|
2014-06-10 18:12:19 +00:00
|
|
|
extern const struct m_sub_options stream_pvr_conf;
|
2014-06-10 18:46:15 +00:00
|
|
|
extern const struct m_sub_options stream_cdda_conf;
|
2014-06-10 19:44:50 +00:00
|
|
|
extern const struct m_sub_options stream_dvb_conf;
|
2014-07-29 23:15:42 +00:00
|
|
|
extern const struct m_sub_options stream_lavf_conf;
|
2014-06-10 20:41:14 +00:00
|
|
|
extern const struct m_sub_options sws_conf;
|
2014-06-10 21:06:42 +00:00
|
|
|
extern const struct m_sub_options demux_rawaudio_conf;
|
|
|
|
extern const struct m_sub_options demux_rawvideo_conf;
|
2014-06-10 23:46:20 +00:00
|
|
|
extern const struct m_sub_options demux_lavf_conf;
|
2015-04-23 17:21:17 +00:00
|
|
|
extern const struct m_sub_options demux_mkv_conf;
|
2014-06-10 23:35:39 +00:00
|
|
|
extern const struct m_sub_options vd_lavc_conf;
|
2014-06-10 23:39:51 +00:00
|
|
|
extern const struct m_sub_options ad_lavc_conf;
|
2014-06-10 23:54:03 +00:00
|
|
|
extern const struct m_sub_options input_config;
|
2014-06-11 00:04:02 +00:00
|
|
|
extern const struct m_sub_options encode_config;
|
2014-06-11 22:34:20 +00:00
|
|
|
extern const struct m_sub_options image_writer_conf;
|
2011-03-10 21:08:21 +00:00
|
|
|
|
options: use m_config for options instead of m_struct
For some reason, both m_config and m_struct are somewhat similar, except
that m_config is much more powerful. m_config is used for VOs and some
other things, so to unify them. We plan to kick out m_struct and use
m_config for everything. (Unfortunately, m_config is also a bit more
bloated, so this commit isn't all that great, but it will allow to
reduce the option parser mess somewhat.)
This commit also switches all video filters to use the option macros.
One reason is that m_struct and m_config, even though they both use
m_option, store the offsets of the option fields differently (sigh...),
meaning the options defined for either are incompatible. It's easier to
switch everything in one go.
This commit will allow using the -vf option parser for other things,
like VOs and AOs.
2013-07-21 17:33:08 +00:00
|
|
|
extern const struct m_obj_list vf_obj_list;
|
2013-07-22 12:43:58 +00:00
|
|
|
extern const struct m_obj_list af_obj_list;
|
2013-07-21 19:17:48 +00:00
|
|
|
extern const struct m_obj_list vo_obj_list;
|
2013-07-21 19:33:17 +00:00
|
|
|
extern const struct m_obj_list ao_obj_list;
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2015-07-07 12:25:37 +00:00
|
|
|
const struct m_opt_choice_alternatives mp_hwdec_names[] = {
|
|
|
|
{"no", HWDEC_NONE},
|
|
|
|
{"auto", HWDEC_AUTO},
|
|
|
|
{"vdpau", HWDEC_VDPAU},
|
|
|
|
{"vda", HWDEC_VDA},
|
2015-07-11 15:21:39 +00:00
|
|
|
{"videotoolbox",HWDEC_VIDEOTOOLBOX},
|
2015-07-07 12:25:37 +00:00
|
|
|
{"vaapi", HWDEC_VAAPI},
|
|
|
|
{"vaapi-copy", HWDEC_VAAPI_COPY},
|
|
|
|
{"dxva2-copy", HWDEC_DXVA2_COPY},
|
|
|
|
{"rpi", HWDEC_RPI},
|
|
|
|
{0}
|
|
|
|
};
|
|
|
|
|
2013-03-01 10:27:59 +00:00
|
|
|
#define OPT_BASE_STRUCT struct MPOpts
|
|
|
|
|
2013-06-07 20:57:00 +00:00
|
|
|
const m_option_t mp_opts[] = {
|
2013-12-21 22:11:12 +00:00
|
|
|
// handled in command line pre-parser (parse_commandline.c)
|
2014-06-13 00:16:47 +00:00
|
|
|
{"v", CONF_TYPE_STORE, CONF_GLOBAL | CONF_NOCFG, .offset = -1},
|
2014-08-13 21:24:46 +00:00
|
|
|
{"playlist", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_MIN | M_OPT_FIXED | M_OPT_FILE,
|
2014-06-13 00:16:47 +00:00
|
|
|
.min = 1, .offset = -1},
|
|
|
|
{"{", CONF_TYPE_STORE, CONF_NOCFG | M_OPT_FIXED, .offset = -1},
|
|
|
|
{"}", CONF_TYPE_STORE, CONF_NOCFG | M_OPT_FIXED, .offset = -1},
|
2013-07-27 19:26:00 +00:00
|
|
|
|
|
|
|
// handled in m_config.c
|
2014-08-13 21:24:46 +00:00
|
|
|
{ "include", CONF_TYPE_STRING, M_OPT_FIXED | M_OPT_FILE, .offset = -1},
|
2014-06-13 00:16:47 +00:00
|
|
|
{ "profile", CONF_TYPE_STRING_LIST, M_OPT_FIXED, .offset = -1},
|
|
|
|
{ "show-profile", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_FIXED, .offset = -1},
|
|
|
|
{ "list-options", CONF_TYPE_STORE, CONF_NOCFG | M_OPT_FIXED, .offset = -1},
|
2013-07-27 19:26:00 +00:00
|
|
|
|
2015-02-16 19:04:05 +00:00
|
|
|
OPT_FLAG("shuffle", shuffle, 0),
|
2013-08-18 22:50:39 +00:00
|
|
|
|
2011-03-10 21:08:21 +00:00
|
|
|
// ------------------------- common options --------------------
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("quiet", quiet, CONF_GLOBAL),
|
2013-12-21 22:11:12 +00:00
|
|
|
OPT_FLAG_STORE("really-quiet", verbose, CONF_GLOBAL | CONF_PRE_PARSE, -10),
|
2014-02-06 15:49:50 +00:00
|
|
|
OPT_FLAG("terminal", use_terminal, CONF_GLOBAL | CONF_PRE_PARSE),
|
2015-02-06 15:48:52 +00:00
|
|
|
OPT_GENERAL(char**, "msg-level", msg_levels, CONF_GLOBAL|CONF_PRE_PARSE,
|
2013-12-18 18:04:30 +00:00
|
|
|
.type = &m_option_type_msglevels),
|
2014-04-17 19:47:00 +00:00
|
|
|
OPT_STRING("dump-stats", dump_stats, CONF_GLOBAL | CONF_PRE_PARSE),
|
2014-04-24 16:16:47 +00:00
|
|
|
OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE),
|
2015-03-07 19:41:32 +00:00
|
|
|
OPT_STRING("log-file", log_file, CONF_GLOBAL | CONF_PRE_PARSE | M_OPT_FILE),
|
2014-04-24 16:16:47 +00:00
|
|
|
OPT_FLAG("msg-module", msg_module, CONF_GLOBAL),
|
|
|
|
OPT_FLAG("msg-time", msg_time, CONF_GLOBAL),
|
2015-01-20 14:18:51 +00:00
|
|
|
#ifdef _WIN32
|
2014-06-11 22:34:20 +00:00
|
|
|
OPT_CHOICE("priority", w32_priority, 0,
|
|
|
|
({"no", 0},
|
2014-06-22 05:57:27 +00:00
|
|
|
{"realtime", REALTIME_PRIORITY_CLASS},
|
|
|
|
{"high", HIGH_PRIORITY_CLASS},
|
2014-06-11 22:34:20 +00:00
|
|
|
{"abovenormal", ABOVE_NORMAL_PRIORITY_CLASS},
|
|
|
|
{"normal", NORMAL_PRIORITY_CLASS},
|
|
|
|
{"belownormal", BELOW_NORMAL_PRIORITY_CLASS},
|
|
|
|
{"idle", IDLE_PRIORITY_CLASS})),
|
2011-03-10 21:08:21 +00:00
|
|
|
#endif
|
2013-02-08 22:52:06 +00:00
|
|
|
OPT_FLAG("config", load_config, CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE),
|
2014-02-25 20:04:04 +00:00
|
|
|
OPT_STRING("config-dir", force_configdir,
|
|
|
|
CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE),
|
2014-02-25 22:59:27 +00:00
|
|
|
OPT_STRINGLIST("reset-on-next-file", reset_options, M_OPT_GLOBAL),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
#if HAVE_LUA
|
2014-12-14 23:31:30 +00:00
|
|
|
OPT_STRINGLIST("script", script_files, CONF_GLOBAL | M_OPT_FILE),
|
|
|
|
OPT_KEYVALUELIST("script-opts", script_opts, M_OPT_GLOBAL),
|
2013-09-25 22:56:41 +00:00
|
|
|
OPT_FLAG("osc", lua_load_osc, CONF_GLOBAL),
|
2014-11-19 17:51:53 +00:00
|
|
|
OPT_FLAG("ytdl", lua_load_ytdl, CONF_GLOBAL),
|
2014-11-19 22:33:28 +00:00
|
|
|
OPT_STRING("ytdl-format", lua_ytdl_format, CONF_GLOBAL),
|
2015-02-22 20:32:42 +00:00
|
|
|
OPT_KEYVALUELIST("ytdl-raw-options", lua_ytdl_raw_options, CONF_GLOBAL),
|
2014-02-28 21:25:48 +00:00
|
|
|
OPT_FLAG("load-scripts", auto_load_scripts, CONF_GLOBAL),
|
Add initial Lua scripting support
This is preliminary. There are still tons of issues, and any aspect
of scripting may change in the future. I decided to merge this
(preliminary) work now because it makes it easier to develop it, not
because it's done. lua.rst is clear enough about it (plus some
sarcasm).
This requires linking to Lua. Lua has no official pkg-config file, but
there are distribution specific .pc files, all with different names.
Adding a non-pkg-config based configure test was considered, but we'd
rather not.
One major complication is that libquvi links against Lua too, and if
the Lua version is different from mpv's, you will get a crash as soon
as libquvi uses Lua. (libquvi by design always runs when a file is
opened.) I would consider this the problem of distros and whoever
builds mpv, but to make things easier for users, we add a terrible
runtime test to the configure script, which probes whether libquvi
will crash. This is disabled when cross-compiling, but in that case
we hope the user knows what he is doing.
2013-09-25 22:41:14 +00:00
|
|
|
#endif
|
|
|
|
|
2011-03-10 21:08:21 +00:00
|
|
|
// ------------------------- stream options --------------------
|
|
|
|
|
2014-05-19 21:27:09 +00:00
|
|
|
OPT_CHOICE_OR_INT("cache", stream_cache.size, 0, 32, 0x7fffffff,
|
2013-05-25 13:03:30 +00:00
|
|
|
({"no", 0},
|
2015-03-12 22:51:41 +00:00
|
|
|
{"auto", -1},
|
|
|
|
{"yes", -2})),
|
2014-05-19 21:27:09 +00:00
|
|
|
OPT_CHOICE_OR_INT("cache-default", stream_cache.def_size, 0, 32, 0x7fffffff,
|
|
|
|
({"no", 0})),
|
|
|
|
OPT_INTRANGE("cache-initial", stream_cache.initial, 0, 0, 0x7fffffff),
|
|
|
|
OPT_INTRANGE("cache-seek-min", stream_cache.seek_min, 0, 0, 0x7fffffff),
|
2015-07-22 21:38:45 +00:00
|
|
|
OPT_INTRANGE("cache-backbuffer", stream_cache.back_buffer, 0, 0, 0x7fffffff),
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("cache-file", stream_cache.file, M_OPT_FILE),
|
2014-06-22 00:50:52 +00:00
|
|
|
OPT_INTRANGE("cache-file-size", stream_cache.file_max, 0, 0, 0x7fffffff),
|
2013-11-28 18:28:38 +00:00
|
|
|
|
2014-07-14 23:49:02 +00:00
|
|
|
#if HAVE_DVDREAD || HAVE_DVDNAV
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("dvd-device", dvd_device, M_OPT_FILE),
|
2014-07-14 23:49:02 +00:00
|
|
|
OPT_INT("dvd-speed", dvd_speed, 0),
|
|
|
|
OPT_INTRANGE("dvd-angle", dvd_angle, 0, 1, 99),
|
|
|
|
#endif /* HAVE_DVDREAD */
|
2011-03-10 21:08:21 +00:00
|
|
|
OPT_INTPAIR("chapter", chapterrange, 0),
|
2013-08-21 16:41:59 +00:00
|
|
|
OPT_CHOICE_OR_INT("edition", edition_id, 0, 0, 8190,
|
|
|
|
({"auto", -1})),
|
2014-07-14 23:49:02 +00:00
|
|
|
#if HAVE_LIBBLURAY
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("bluray-device", bluray_device, M_OPT_FILE),
|
2014-07-14 23:49:02 +00:00
|
|
|
OPT_INTRANGE("bluray-angle", bluray_angle, 0, 0, 999),
|
|
|
|
#endif /* HAVE_LIBBLURAY */
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2013-12-22 12:11:22 +00:00
|
|
|
OPT_STRINGLIST("http-header-fields", network_http_header_fields, 0),
|
|
|
|
OPT_STRING("user-agent", network_useragent, 0),
|
|
|
|
OPT_STRING("referrer", network_referrer, 0),
|
|
|
|
OPT_FLAG("cookies", network_cookies_enabled, 0),
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("cookies-file", network_cookies_file, M_OPT_FILE),
|
2013-09-22 00:40:29 +00:00
|
|
|
OPT_CHOICE("rtsp-transport", network_rtsp_transport, 0,
|
|
|
|
({"lavf", 0},
|
|
|
|
{"udp", 1},
|
|
|
|
{"tcp", 2},
|
|
|
|
{"http", 3})),
|
2013-12-22 12:11:22 +00:00
|
|
|
OPT_FLAG("tls-verify", network_tls_verify, 0),
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("tls-ca-file", network_tls_ca_file, M_OPT_FILE),
|
2015-02-06 16:01:35 +00:00
|
|
|
OPT_DOUBLE("network-timeout", network_timeout, M_OPT_MIN, .min = 0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
|
|
|
// ------------------------- demuxer options --------------------
|
|
|
|
|
2014-02-25 22:59:27 +00:00
|
|
|
OPT_CHOICE_OR_INT("frames", play_frames, M_OPT_FIXED, 0, INT_MAX,
|
2013-03-08 01:08:02 +00:00
|
|
|
({"all", -1})),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2012-11-15 17:49:17 +00:00
|
|
|
OPT_REL_TIME("start", play_start, 0),
|
|
|
|
OPT_REL_TIME("end", play_end, 0),
|
|
|
|
OPT_REL_TIME("length", play_length, 0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2014-11-17 23:09:42 +00:00
|
|
|
OPT_TIME("ab-loop-a", ab_loop[0], 0, .min = MP_NOPTS_VALUE),
|
|
|
|
OPT_TIME("ab-loop-b", ab_loop[1], 0, .min = MP_NOPTS_VALUE),
|
|
|
|
|
2014-02-25 22:59:27 +00:00
|
|
|
OPT_FLAG("pause", pause, M_OPT_FIXED),
|
2015-02-27 17:31:24 +00:00
|
|
|
OPT_CHOICE("keep-open", keep_open, 0,
|
2014-12-12 22:45:16 +00:00
|
|
|
({"no", 0},
|
2015-02-27 17:31:24 +00:00
|
|
|
{"yes", 1},
|
2014-12-12 22:45:16 +00:00
|
|
|
{"always", 2})),
|
2012-02-08 23:36:53 +00:00
|
|
|
|
2014-06-13 00:05:37 +00:00
|
|
|
OPT_CHOICE("index", index_mode, 0, ({"default", 1}, {"recreate", 0})),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
|
|
|
// select audio/video/subtitle stream
|
2015-05-22 19:00:24 +00:00
|
|
|
OPT_TRACKCHOICE("aid", stream_id[0][STREAM_AUDIO]),
|
|
|
|
OPT_TRACKCHOICE("vid", stream_id[0][STREAM_VIDEO]),
|
|
|
|
OPT_TRACKCHOICE("sid", stream_id[0][STREAM_SUB]),
|
|
|
|
OPT_TRACKCHOICE("secondary-sid", stream_id[1][STREAM_SUB]),
|
|
|
|
OPT_TRACKCHOICE("ff-aid", stream_id_ff[STREAM_AUDIO]),
|
|
|
|
OPT_TRACKCHOICE("ff-vid", stream_id_ff[STREAM_VIDEO]),
|
|
|
|
OPT_TRACKCHOICE("ff-sid", stream_id_ff[STREAM_SUB]),
|
|
|
|
OPT_FLAG_STORE("no-sub", stream_id[0][STREAM_SUB], 0, -2),
|
|
|
|
OPT_FLAG_STORE("no-video", stream_id[0][STREAM_VIDEO], 0, -2),
|
|
|
|
OPT_FLAG_STORE("no-audio", stream_id[0][STREAM_AUDIO], 0, -2),
|
|
|
|
OPT_STRINGLIST("alang", stream_lang[STREAM_AUDIO], 0),
|
|
|
|
OPT_STRINGLIST("slang", stream_lang[STREAM_SUB], 0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2012-12-10 17:52:06 +00:00
|
|
|
OPT_CHOICE("audio-display", audio_display, 0,
|
|
|
|
({"no", 0}, {"attachment", 1})),
|
|
|
|
|
2015-07-13 11:34:58 +00:00
|
|
|
OPT_CHOICE_OR_INT("hls-bitrate", hls_bitrate, 0, 0, INT_MAX,
|
|
|
|
({"no", -1}, {"min", 0}, {"max", INT_MAX})),
|
2014-09-01 21:47:27 +00:00
|
|
|
|
2014-12-29 21:51:18 +00:00
|
|
|
OPT_STRINGLIST("display-tags*", display_tags, 0),
|
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
#if HAVE_CDDA
|
2014-06-10 18:46:15 +00:00
|
|
|
OPT_SUBSTRUCT("cdda", stream_cdda_opts, stream_cdda_conf, 0),
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("cdrom-device", cdrom_device, M_OPT_FILE),
|
2011-03-10 21:08:21 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// demuxer.c - select audio/sub file/demuxer
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING_APPEND_LIST("audio-file", audio_files, M_OPT_FILE),
|
2011-03-10 21:08:21 +00:00
|
|
|
OPT_STRING("demuxer", demuxer_name, 0),
|
|
|
|
OPT_STRING("audio-demuxer", audio_demuxer_name, 0),
|
|
|
|
OPT_STRING("sub-demuxer", sub_demuxer_name, 0),
|
2014-07-16 20:40:21 +00:00
|
|
|
OPT_FLAG("demuxer-thread", demuxer_thread, 0),
|
2014-08-16 15:07:36 +00:00
|
|
|
OPT_DOUBLE("demuxer-readahead-secs", demuxer_min_secs, M_OPT_MIN, .min = 0),
|
2015-08-05 21:41:29 +00:00
|
|
|
OPT_INTRANGE("demuxer-max-packets", demuxer_max_packs, 0, 0, INT_MAX),
|
|
|
|
OPT_INTRANGE("demuxer-max-bytes", demuxer_max_bytes, 0, 0, INT_MAX),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2015-07-08 20:04:35 +00:00
|
|
|
OPT_FLAG("force-seekable", force_seekable, 0),
|
|
|
|
|
player: redo how stream caching and pausing on low cache works
Add the --cache-secs option, which literally overrides the value of
--demuxer-readahead-secs if the stream cache is active. The default
value is very high (10 seconds), which means it can act as network
cache.
Remove the old behavior of trying to pause once the byte cache runs
low. Instead, do something similar wit the demuxer cache. The nice
thing is that we can guess how many seconds of video it has cached,
and we can make better decisions. But for now, apply a relatively
naive heuristic: if the cache is below 0.5 secs, pause, and wait
until at least 2 secs are available.
Note that due to timestamp reordering, the estimated cached duration
of video might be inaccurate, depending on the file format. If the
file format has DTS, it's easy, otherwise the duration will seemingly
jump back and forth.
2014-08-26 23:13:20 +00:00
|
|
|
OPT_DOUBLE("cache-secs", demuxer_min_secs_cache, M_OPT_MIN, .min = 0),
|
|
|
|
OPT_FLAG("cache-pause", cache_pausing, 0),
|
|
|
|
|
2014-06-10 20:48:11 +00:00
|
|
|
OPT_DOUBLE("mf-fps", mf_fps, 0),
|
|
|
|
OPT_STRING("mf-type", mf_type, 0),
|
2013-07-16 11:28:28 +00:00
|
|
|
#if HAVE_TV
|
2014-06-09 21:54:45 +00:00
|
|
|
OPT_SUBSTRUCT("tv", tv_params, tv_params_conf, 0),
|
2013-07-16 11:28:28 +00:00
|
|
|
#endif /* HAVE_TV */
|
|
|
|
#if HAVE_PVR
|
2014-06-10 18:12:19 +00:00
|
|
|
OPT_SUBSTRUCT("pvr", stream_pvr_opts, stream_pvr_conf, 0),
|
2013-07-16 11:28:28 +00:00
|
|
|
#endif /* HAVE_PVR */
|
|
|
|
#if HAVE_DVBIN
|
2014-06-10 19:44:50 +00:00
|
|
|
OPT_SUBSTRUCT("dvbin", stream_dvb_opts, stream_dvb_conf, 0),
|
2011-03-10 21:08:21 +00:00
|
|
|
#endif
|
2014-07-29 23:15:42 +00:00
|
|
|
OPT_SUBSTRUCT("", stream_lavf_opts, stream_lavf_conf, 0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
|
|
|
// ------------------------- a-v sync options --------------------
|
|
|
|
|
|
|
|
// set A-V sync correction speed (0=disables it):
|
2013-03-08 01:08:02 +00:00
|
|
|
OPT_FLOATRANGE("mc", default_max_pts_correction, 0, 0, 100),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
|
|
|
// force video/audio rate:
|
2015-02-03 22:04:19 +00:00
|
|
|
OPT_DOUBLE("fps", force_fps, CONF_MIN, .min = 0),
|
2014-04-24 15:56:26 +00:00
|
|
|
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),
|
2014-02-25 22:59:27 +00:00
|
|
|
OPT_DOUBLE("speed", playback_speed, M_OPT_RANGE | M_OPT_FIXED,
|
|
|
|
.min = 0.01, .max = 100.0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2014-10-02 00:58:52 +00:00
|
|
|
OPT_FLAG("audio-pitch-correction", pitch_correction, 0),
|
|
|
|
|
2011-03-10 21:08:21 +00:00
|
|
|
// set a-v distance
|
2013-03-08 01:08:02 +00:00
|
|
|
OPT_FLOATRANGE("audio-delay", audio_delay, 0, -100.0, 100.0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
|
|
|
// ------------------------- codec/vfilter options --------------------
|
|
|
|
|
2013-11-30 23:12:10 +00:00
|
|
|
OPT_SETTINGSLIST("af-defaults", af_defs, 0, &af_obj_list),
|
2015-02-03 22:04:19 +00:00
|
|
|
OPT_SETTINGSLIST("af*", af_settings, 0, &af_obj_list),
|
2013-11-30 23:12:10 +00:00
|
|
|
OPT_SETTINGSLIST("vf-defaults", vf_defs, 0, &vf_obj_list),
|
2015-02-03 22:04:19 +00:00
|
|
|
OPT_SETTINGSLIST("vf*", vf_settings, 0, &vf_obj_list),
|
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 14:15:19 +00:00
|
|
|
|
2015-02-27 17:31:24 +00:00
|
|
|
OPT_CHOICE("deinterlace", deinterlace, 0,
|
core: add --deinterlace option, restore it with resume functionality
The --deinterlace option does on playback start what the "deinterlace"
property normally does at runtime. You could do this before by using the
--vf option or by messing with the vo_vdpau default options, but this
new option is supposed to be a "foolproof" way.
The main motivation for adding this is so that the deinterlace property
can be restored when using the video resume functionality
(quit_watch_later command).
Implementation-wise, this is a bit messy. The video chain is rebuilt in
mpcodecs_reconfig_vo(), where we don't have access to MPContext, so the
usual mechanism for enabling deinterlacing can't be used. Further,
mpcodecs_reconfig_vo() is called by the video decoder, which doesn't
have access to MPContext either. Moving this call to mplayer.c isn't
currently possible either (see below). So we just do this before frames
are filtered, which potentially means setting the deinterlacing every
frame. Fortunately, setting deinterlacing is stable and idempotent, so
this is hopefully not a problem. We also add a counter that is
incremented on each reconfig to reduce the amount of additional work per
frame to nearly zero.
The reason we can't move mpcodecs_reconfig_vo() to mplayer.c is because
of hardware decoding: we need to check whether the video chain works
before we decide that we can use hardware decoding. Changing it so that
this can be decided in advance without building a filter chain sounds
like a good idea and should be done, but we aren't there yet.
2013-09-13 16:06:08 +00:00
|
|
|
({"auto", -1},
|
|
|
|
{"no", 0},
|
2015-02-27 17:31:24 +00:00
|
|
|
{"yes", 1})),
|
core: add --deinterlace option, restore it with resume functionality
The --deinterlace option does on playback start what the "deinterlace"
property normally does at runtime. You could do this before by using the
--vf option or by messing with the vo_vdpau default options, but this
new option is supposed to be a "foolproof" way.
The main motivation for adding this is so that the deinterlace property
can be restored when using the video resume functionality
(quit_watch_later command).
Implementation-wise, this is a bit messy. The video chain is rebuilt in
mpcodecs_reconfig_vo(), where we don't have access to MPContext, so the
usual mechanism for enabling deinterlacing can't be used. Further,
mpcodecs_reconfig_vo() is called by the video decoder, which doesn't
have access to MPContext either. Moving this call to mplayer.c isn't
currently possible either (see below). So we just do this before frames
are filtered, which potentially means setting the deinterlacing every
frame. Fortunately, setting deinterlacing is stable and idempotent, so
this is hopefully not a problem. We also add a counter that is
incremented on each reconfig to reduce the amount of additional work per
frame to nearly zero.
The reason we can't move mpcodecs_reconfig_vo() to mplayer.c is because
of hardware decoding: we need to check whether the video chain works
before we decide that we can use hardware decoding. Changing it so that
this can be decided in advance without building a filter chain sounds
like a good idea and should be done, but we aren't there yet.
2013-09-13 16:06:08 +00:00
|
|
|
|
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 14:15:19 +00:00
|
|
|
OPT_STRING("ad", audio_decoders, 0),
|
|
|
|
OPT_STRING("vd", video_decoders, 0),
|
2013-06-28 13:26:30 +00:00
|
|
|
|
2015-06-05 20:35:43 +00:00
|
|
|
OPT_STRING("audio-spdif", audio_spdif, 0),
|
|
|
|
|
2013-06-28 13:26:30 +00:00
|
|
|
OPT_FLAG("ad-spdif-dtshd", dtshd, 0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2015-07-07 12:25:37 +00:00
|
|
|
OPT_CHOICE_C("hwdec", hwdec_api, 0, mp_hwdec_names),
|
2015-07-07 12:53:58 +00:00
|
|
|
OPT_CHOICE_C("hwdec-preload", vo.hwdec_preload_api, 0, mp_hwdec_names),
|
2013-05-03 19:00:05 +00:00
|
|
|
OPT_STRING("hwdec-codecs", hwdec_codecs, 0),
|
2012-12-11 17:16:42 +00:00
|
|
|
|
2014-06-10 20:41:14 +00:00
|
|
|
OPT_SUBSTRUCT("sws", vo.sws_opts, sws_conf, 0),
|
|
|
|
|
2013-09-26 14:53:17 +00:00
|
|
|
// -1 means auto aspect (prefer container size until aspect change)
|
|
|
|
// 0 means square pixels
|
2014-04-24 16:10:20 +00:00
|
|
|
OPT_FLOATRANGE("video-aspect", movie_aspect, 0, -1.0, 10.0),
|
|
|
|
OPT_FLOAT_STORE("no-video-aspect", movie_aspect, 0, 0.0),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2013-05-20 22:45:42 +00:00
|
|
|
OPT_CHOICE("field-dominance", field_dominance, 0,
|
|
|
|
({"auto", -1}, {"top", 0}, {"bottom", 1})),
|
2011-03-10 21:08:21 +00:00
|
|
|
|
2014-06-10 23:35:39 +00:00
|
|
|
OPT_SUBSTRUCT("vd-lavc", vd_lavc_params, vd_lavc_conf, 0),
|
2014-06-10 23:39:51 +00:00
|
|
|
OPT_SUBSTRUCT("ad-lavc", ad_lavc_params, ad_lavc_conf, 0),
|
2013-06-28 12:56:52 +00:00
|
|
|
|
2014-06-10 23:46:20 +00:00
|
|
|
OPT_SUBSTRUCT("demuxer-lavf", demux_lavf, demux_lavf_conf, 0),
|
2014-06-10 21:06:42 +00:00
|
|
|
OPT_SUBSTRUCT("demuxer-rawaudio", demux_rawaudio, demux_rawaudio_conf, 0),
|
|
|
|
OPT_SUBSTRUCT("demuxer-rawvideo", demux_rawvideo, demux_rawvideo_conf, 0),
|
2015-04-23 17:21:17 +00:00
|
|
|
OPT_SUBSTRUCT("demuxer-mkv", demux_mkv, demux_mkv_conf, 0),
|
2013-06-28 13:26:30 +00:00
|
|
|
|
2011-03-10 21:08:21 +00:00
|
|
|
// ------------------------- subtitles options --------------------
|
|
|
|
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING_APPEND_LIST("sub-file", sub_name, M_OPT_FILE),
|
2011-03-10 21:08:21 +00:00
|
|
|
OPT_PATHLIST("sub-paths", sub_paths, 0),
|
2014-04-24 15:42:54 +00:00
|
|
|
OPT_STRING("sub-codepage", sub_cp, 0),
|
2013-04-28 23:49:20 +00:00
|
|
|
OPT_FLOAT("sub-delay", sub_delay, 0),
|
2014-04-24 15:42:54 +00:00
|
|
|
OPT_FLOAT("sub-fps", sub_fps, 0),
|
2013-06-24 22:03:37 +00:00
|
|
|
OPT_FLOAT("sub-speed", sub_speed, 0),
|
2013-04-28 23:39:50 +00:00
|
|
|
OPT_FLAG("sub-visibility", sub_visibility, 0),
|
2013-03-08 01:08:02 +00:00
|
|
|
OPT_FLAG("sub-forced-only", forced_subs_only, 0),
|
2013-11-01 15:02:47 +00:00
|
|
|
OPT_FLAG("stretch-dvd-subs", stretch_dvd_subs, 0),
|
2015-07-18 12:36:17 +00:00
|
|
|
OPT_FLAG("stretch-image-subs-to-screen", stretch_image_subs, 0),
|
2014-06-13 00:06:03 +00:00
|
|
|
OPT_FLAG("sub-fix-timing", sub_fix_timing, 0),
|
2014-05-04 08:31:24 +00:00
|
|
|
OPT_CHOICE("sub-auto", sub_auto, 0,
|
|
|
|
({"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})),
|
2015-02-02 20:23:12 +00:00
|
|
|
OPT_CHOICE("audio-file-auto", audiofile_auto, 0,
|
|
|
|
({"no", -1}, {"exact", 0}, {"fuzzy", 1}, {"all", 2})),
|
2013-04-28 23:49:20 +00:00
|
|
|
OPT_INTRANGE("sub-pos", sub_pos, 0, 0, 100),
|
2012-11-24 23:06:16 +00:00
|
|
|
OPT_FLOATRANGE("sub-gauss", sub_gauss, 0, 0.0, 3.0),
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("sub-gray", sub_gray, 0),
|
2014-04-24 15:42:54 +00:00
|
|
|
OPT_FLAG("sub-ass", ass_enabled, 0),
|
2012-11-17 19:56:45 +00:00
|
|
|
OPT_FLOATRANGE("sub-scale", sub_scale, 0, 0, 100),
|
2011-09-03 10:47:56 +00:00
|
|
|
OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000),
|
2015-02-16 19:04:15 +00:00
|
|
|
OPT_FLAG("sub-use-margins", sub_use_margins, 0),
|
|
|
|
OPT_FLAG("ass-force-margins", ass_use_margins, 0),
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("ass-vsfilter-aspect-compat", ass_vsfilter_aspect_compat, 0),
|
2013-07-14 23:48:25 +00:00
|
|
|
OPT_CHOICE("ass-vsfilter-color-compat", ass_vsfilter_color_compat, 0,
|
|
|
|
({"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})),
|
2013-06-30 16:46:29 +00:00
|
|
|
OPT_FLAG("ass-vsfilter-blur-compat", ass_vsfilter_blur_compat, 0),
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("embeddedfonts", use_embedded_fonts, 0),
|
2011-07-23 02:13:25 +00:00
|
|
|
OPT_STRINGLIST("ass-force-style", ass_force_style_list, 0),
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("ass-styles", ass_styles_file, M_OPT_FILE),
|
2013-09-25 19:40:35 +00:00
|
|
|
OPT_CHOICE("ass-hinting", ass_hinting, 0,
|
|
|
|
({"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})),
|
2013-09-25 19:42:29 +00:00
|
|
|
OPT_CHOICE("ass-shaper", ass_shaper, 0,
|
|
|
|
({"simple", 0}, {"complex", 1})),
|
2012-10-11 00:23:29 +00:00
|
|
|
OPT_CHOICE("ass-style-override", ass_style_override, 0,
|
2014-10-17 00:06:08 +00:00
|
|
|
({"no", 0}, {"yes", 1}, {"force", 3}, {"signfs", 4})),
|
2015-01-05 18:18:08 +00:00
|
|
|
OPT_FLAG("sub-scale-by-window", sub_scale_by_window, 0),
|
2014-06-14 17:17:31 +00:00
|
|
|
OPT_FLAG("sub-scale-with-window", sub_scale_with_window, 0),
|
2015-02-16 19:04:15 +00:00
|
|
|
OPT_FLAG("ass-scale-with-window", ass_scale_with_window, 0),
|
2013-02-16 20:17:59 +00:00
|
|
|
OPT_FLAG("osd-bar", osd_bar_visible, 0),
|
2013-02-14 19:43:00 +00:00
|
|
|
OPT_FLOATRANGE("osd-bar-align-x", osd_bar_align_x, 0, -1.0, +1.0),
|
|
|
|
OPT_FLOATRANGE("osd-bar-align-y", osd_bar_align_y, 0, -1.0, +1.0),
|
2013-03-30 19:08:56 +00:00
|
|
|
OPT_FLOATRANGE("osd-bar-w", osd_bar_w, 0, 1, 100),
|
|
|
|
OPT_FLOATRANGE("osd-bar-h", osd_bar_h, 0, 0.1, 50),
|
options: drop --opt:subopt option names
For all suboptions, "flat" options were available by separating the
parent option and the sub option with ":", e.g. "--rawvideo:w=123". Drop
this syntax and use "-" as separator. This means even suboptions are
available as normal options now, e.g. "--rawvideo-w=123". The old syntax
doesn't work anymore.
Note that this is completely separate from actual suboptions. For
example, "-rawvideo w=123:h=123" still works. (Not that this syntax is
worth supporting, but it's needed anyway, for for other things like vf
and vo suboptions.)
As a consequence of this change, we also have to add new "no-" prefixed
options for flag suboptions, so that "--no-input-default-bindings"
works. ("--input-no-default-bindings" also works as a consequence of
allowing "-input no-default-bindings" - they are handled by the same
underlying option.)
For --input, always use the full syntax in the manpage. There exist
suboptions other than --input (like --tv, --rawvideo, etc.), but since
they might be handled differently in the future, don't touch these yet.
M_OPT_PREFIXED becomes the default, so remove it. As a minor unrelated
cleanup, get rid of M_OPT_MERGE too and use the OPT_SUBSTRUCT() macro in
some places.
Unrelated: remove the duplicated --tv:buffersize option, fix a typo in
changes.rst.
2013-02-21 21:10:21 +00:00
|
|
|
OPT_SUBSTRUCT("osd", osd_style, osd_style_conf, 0),
|
2014-11-25 10:08:25 +00:00
|
|
|
OPT_FLAG("use-text-osd", use_text_osd, CONF_GLOBAL),
|
2015-02-16 19:03:56 +00:00
|
|
|
OPT_SUBSTRUCT("sub-text", sub_text_style, sub_style_conf, 0),
|
2014-08-14 21:59:35 +00:00
|
|
|
OPT_FLAG("sub-clear-on-seek", sub_clear_on_seek, 0),
|
2001-11-02 00:32:35 +00:00
|
|
|
|
2002-05-04 21:26:45 +00:00
|
|
|
//---------------------- libao/libvo options ------------------------
|
2013-07-21 19:17:48 +00:00
|
|
|
OPT_SETTINGSLIST("vo", vo.video_driver_list, 0, &vo_obj_list),
|
2013-11-30 23:12:10 +00:00
|
|
|
OPT_SETTINGSLIST("vo-defaults", vo.vo_defs, 0, &vo_obj_list),
|
2013-07-21 19:33:17 +00:00
|
|
|
OPT_SETTINGSLIST("ao", audio_driver_list, 0, &ao_obj_list),
|
2013-11-30 23:12:10 +00:00
|
|
|
OPT_SETTINGSLIST("ao-defaults", ao_defs, 0, &ao_obj_list),
|
2014-10-09 19:21:31 +00:00
|
|
|
OPT_STRING("audio-device", audio_device, 0),
|
2014-11-07 14:54:35 +00:00
|
|
|
OPT_STRING("audio-client-name", audio_client_name, 0),
|
2015-05-08 19:47:39 +00:00
|
|
|
OPT_CHOICE("force-window", force_vo, 0,
|
|
|
|
({"no", 0}, {"yes", 1}, {"immediate", 2})),
|
2014-02-25 22:59:27 +00:00
|
|
|
OPT_FLAG("ontop", vo.ontop, M_OPT_FIXED),
|
|
|
|
OPT_FLAG("border", vo.border, M_OPT_FIXED),
|
2015-01-16 22:38:47 +00:00
|
|
|
OPT_FLAG("on-all-workspaces", vo.all_workspaces, M_OPT_FIXED),
|
2010-05-03 23:34:38 +00:00
|
|
|
|
2014-05-20 00:40:00 +00:00
|
|
|
OPT_FLAG("window-dragging", allow_win_drag, CONF_GLOBAL),
|
|
|
|
|
softvol, ao_pulse: prefer ao_pulse volume control by default
--softvol is enabled by default. For most audio outputs, this is a good
thing, as they have either their own (bad) soft volume implementation,
or control the system mixer. With ao_pulse, the situation is a bit
different: it supports per-application volume (i.e. volume control is
not really global). More importantly, ao_pulse uses a rather large audio
buffer, and changing the volume with mplayer's volume filter has a large
delay. With the native ao_pulse volume control, it's instant, because
PulseAudio's audio filtering happens at a later stage in its processing
pipeline (inaccessible for mplayer).
This means native volume control should really be allowed for ao_pulse,
while it's the reverse for other audio outputs. Make --softvol a choice
option, and add a new "auto" choice. This is default and will use PA's
volume control with ao_pulse, and mplayer's volume filter otherwise
(i.e. the old softvol behavior).
2012-09-18 19:41:22 +00:00
|
|
|
OPT_CHOICE("softvol", softvol, 0,
|
|
|
|
({"no", SOFTVOL_NO},
|
|
|
|
{"yes", SOFTVOL_YES},
|
|
|
|
{"auto", SOFTVOL_AUTO})),
|
2015-05-22 16:44:59 +00:00
|
|
|
OPT_FLOATRANGE("softvol-max", softvol_max, 0, 100, 1000),
|
|
|
|
OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 1000),
|
2015-02-27 17:31:24 +00:00
|
|
|
OPT_CHOICE("mute", mixer_init_mute, 0,
|
2012-11-15 18:22:01 +00:00
|
|
|
({"auto", -1},
|
|
|
|
{"no", 0},
|
2015-02-27 17:31:24 +00:00
|
|
|
{"yes", 1})),
|
2013-09-19 12:32:47 +00:00
|
|
|
OPT_STRING("volume-restore-data", mixer_restore_volume_data, 0),
|
2015-02-27 17:31:24 +00:00
|
|
|
OPT_CHOICE("gapless-audio", gapless_audio, 0,
|
2014-06-08 21:54:05 +00:00
|
|
|
({"no", 0},
|
2015-02-27 17:31:24 +00:00
|
|
|
{"yes", 1},
|
2014-06-08 21:54:05 +00:00
|
|
|
{"weak", -1})),
|
2014-09-04 21:48:27 +00:00
|
|
|
OPT_DOUBLE("audio-buffer", audio_buffer, M_OPT_MIN | M_OPT_MAX,
|
|
|
|
.min = 0, .max = 10),
|
2010-05-03 23:34:38 +00:00
|
|
|
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_GEOMETRY("geometry", vo.geometry, 0),
|
|
|
|
OPT_SIZE_BOX("autofit", vo.autofit, 0),
|
|
|
|
OPT_SIZE_BOX("autofit-larger", vo.autofit_larger, 0),
|
2015-01-16 21:30:32 +00:00
|
|
|
OPT_SIZE_BOX("autofit-smaller", vo.autofit_smaller, 0),
|
2015-04-24 20:52:01 +00:00
|
|
|
OPT_FLOATRANGE("window-scale", vo.window_scale, 0, 0.001, 100),
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_FLAG("force-window-position", vo.force_window_position, 0),
|
2010-05-03 23:34:38 +00:00
|
|
|
// vo name (X classname) and window title strings
|
2014-04-24 16:10:20 +00:00
|
|
|
OPT_STRING("x11-name", vo.winname, 0),
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_STRING("title", wintitle, 0),
|
2015-05-22 18:03:14 +00:00
|
|
|
OPT_STRING("force-media-title", media_title, 0),
|
2010-05-03 23:34:38 +00:00
|
|
|
// set aspect ratio of monitor - useful for 16:9 TV-out
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_FLOATRANGE("monitoraspect", vo.force_monitor_aspect, 0, 0.0, 9.0),
|
|
|
|
OPT_FLOATRANGE("monitorpixelaspect", vo.monitor_pixel_aspect, 0, 0.2, 9.0),
|
2010-05-03 23:34:38 +00:00
|
|
|
// start in fullscreen mode:
|
2014-02-25 22:59:27 +00:00
|
|
|
OPT_FLAG("fullscreen", vo.fullscreen, M_OPT_FIXED),
|
|
|
|
OPT_FLAG("fs", vo.fullscreen, M_OPT_FIXED),
|
|
|
|
OPT_FLAG("native-keyrepeat", vo.native_keyrepeat, M_OPT_FIXED),
|
2013-03-06 16:27:03 +00:00
|
|
|
OPT_FLOATRANGE("panscan", vo.panscan, 0, 0.0, 1.0),
|
2013-06-14 22:15:32 +00:00
|
|
|
OPT_FLOATRANGE("video-zoom", vo.zoom, 0, -20.0, 20.0),
|
|
|
|
OPT_FLOATRANGE("video-pan-x", vo.pan_x, 0, -3.0, 3.0),
|
|
|
|
OPT_FLOATRANGE("video-pan-y", vo.pan_y, 0, -3.0, 3.0),
|
|
|
|
OPT_FLOATRANGE("video-align-x", vo.align_x, 0, -1.0, 1.0),
|
|
|
|
OPT_FLOATRANGE("video-align-y", vo.align_y, 0, -1.0, 1.0),
|
2013-09-01 01:27:03 +00:00
|
|
|
OPT_FLAG("video-unscaled", vo.unscaled, 0),
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_FLAG("force-rgba-osd-rendering", force_rgba_osd, 0),
|
2015-03-30 21:58:39 +00:00
|
|
|
OPT_CHOICE_OR_INT("video-rotate", video_rotate, 0, 0, 360,
|
2014-05-24 12:08:39 +00:00
|
|
|
({"no", -1})),
|
2015-04-02 21:54:08 +00:00
|
|
|
OPT_CHOICE_C("video-stereo-mode", video_stereo_mode, 0, mp_stereo3d_names),
|
2010-05-03 23:34:38 +00:00
|
|
|
|
2013-09-08 00:07:20 +00:00
|
|
|
OPT_CHOICE_OR_INT("cursor-autohide", cursor_autohide_delay, 0,
|
2012-11-15 17:59:41 +00:00
|
|
|
0, 30000, ({"no", -1}, {"always", -2})),
|
2013-09-08 00:46:19 +00:00
|
|
|
OPT_FLAG("cursor-autohide-fs-only", cursor_autohide_fs, 0),
|
2013-06-13 22:24:41 +00:00
|
|
|
OPT_FLAG("stop-screensaver", stop_screensaver, 0),
|
2009-07-06 23:26:13 +00:00
|
|
|
|
2014-12-09 20:31:50 +00:00
|
|
|
OPT_INT64("wid", vo.WinID, 0),
|
2013-07-16 11:28:28 +00:00
|
|
|
#if HAVE_X11
|
2014-10-04 13:03:02 +00:00
|
|
|
OPT_CHOICE("x11-netwm", vo.x11_netwm, 0,
|
|
|
|
({"auto", 0}, {"no", -1}, {"yes", 1})),
|
2004-07-23 13:00:16 +00:00
|
|
|
#endif
|
2013-03-08 01:08:02 +00:00
|
|
|
OPT_STRING("heartbeat-cmd", heartbeat_cmd, 0),
|
2013-04-04 12:24:42 +00:00
|
|
|
OPT_FLOAT("heartbeat-interval", heartbeat_interval, CONF_MIN, 0),
|
2004-07-23 13:00:16 +00:00
|
|
|
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_CHOICE_OR_INT("screen", vo.screen_id, 0, 0, 32,
|
2013-02-17 15:35:44 +00:00
|
|
|
({"default", -1})),
|
|
|
|
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_CHOICE_OR_INT("fs-screen", vo.fsscreen_id, 0, 0, 32,
|
2013-02-10 08:50:12 +00:00
|
|
|
({"all", -2}, {"current", -1})),
|
2013-05-10 22:22:23 +00:00
|
|
|
|
2014-12-01 17:05:30 +00:00
|
|
|
OPT_FLAG("fs-black-out-screens", vo.fs_black_out_screens, 0),
|
2013-03-04 16:40:21 +00:00
|
|
|
OPT_INTRANGE("brightness", gamma_brightness, 0, -100, 100),
|
|
|
|
OPT_INTRANGE("saturation", gamma_saturation, 0, -100, 100),
|
|
|
|
OPT_INTRANGE("contrast", gamma_contrast, 0, -100, 100),
|
|
|
|
OPT_INTRANGE("hue", gamma_hue, 0, -100, 100),
|
|
|
|
OPT_INTRANGE("gamma", gamma_gamma, 0, -100, 100),
|
2013-05-16 21:12:52 +00:00
|
|
|
OPT_FLAG("keepaspect", vo.keepaspect, 0),
|
2014-10-04 20:17:36 +00:00
|
|
|
OPT_FLAG("keepaspect-window", vo.keepaspect_window, 0),
|
2002-05-04 21:26:45 +00:00
|
|
|
|
2015-02-16 19:04:05 +00:00
|
|
|
OPT_FLAG("use-filedir-conf", use_filedir_conf, 0),
|
2012-09-17 06:45:35 +00:00
|
|
|
OPT_CHOICE("osd-level", osd_level, 0,
|
|
|
|
({"0", 0}, {"1", 1}, {"2", 2}, {"3", 3})),
|
2010-05-07 19:02:47 +00:00
|
|
|
OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000),
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("osd-fractions", osd_fractions, 0),
|
2013-05-14 12:10:27 +00:00
|
|
|
OPT_FLOATRANGE("osd-scale", osd_scale, 0, 0, 100),
|
2013-12-10 18:58:57 +00:00
|
|
|
OPT_FLAG("osd-scale-by-window", osd_scale_by_window, 0),
|
2002-05-04 21:26:45 +00:00
|
|
|
|
2013-03-08 01:08:02 +00:00
|
|
|
OPT_DOUBLE("sstep", step_sec, CONF_MIN, 0),
|
2002-05-04 21:26:45 +00:00
|
|
|
|
2012-09-17 06:38:19 +00:00
|
|
|
OPT_CHOICE("framedrop", frame_dropping, 0,
|
|
|
|
({"no", 0},
|
video: add VO framedropping mode
This mostly uses the same idea as with vo_vdpau.c, but much simplified.
On X11, it tries to get the display framerate with XF86VM, and limits
the frequency of new video frames against it. Note that this is an old
extension, and is confirmed not to work correctly with multi-monitor
setups. But we're using it because it was already around (it is also
used by vo_vdpau).
This attempts to predict the next vsync event by using the time of the
last frame and the display FPS. Even if that goes completely wrong,
the results are still relatively good.
On other systems, or if the X11 code doesn't return a display FPS, a
framerate of 1000 is assumed. This is infinite for all practical
purposes, and means that only frames which are definitely too late are
dropped. This probably has worse results, but is still useful.
"--framedrop=yes" is basically replaced with "--framedrop=decoder". The
old framedropping mode is kept around, and should perhaps be improved.
Dropping on the decoder level is still useful if decoding itself is too
slow.
2014-08-15 21:33:33 +00:00
|
|
|
{"vo", 1},
|
|
|
|
{"decoder", 2},
|
|
|
|
{"decoder+vo", 3})),
|
2002-05-04 21:26:45 +00:00
|
|
|
|
2014-08-15 22:05:02 +00:00
|
|
|
OPT_DOUBLE("display-fps", frame_drop_fps, M_OPT_MIN, .min = 0),
|
|
|
|
|
2015-02-03 22:04:19 +00:00
|
|
|
OPT_FLAG("untimed", untimed, 0),
|
2002-05-04 21:26:45 +00:00
|
|
|
|
2015-02-03 22:04:19 +00:00
|
|
|
OPT_STRING("stream-capture", stream_capture, M_OPT_FILE),
|
|
|
|
OPT_STRING("stream-dump", stream_dump, M_OPT_FILE),
|
2013-05-11 20:19:33 +00:00
|
|
|
|
2014-10-28 18:51:44 +00:00
|
|
|
OPT_FLAG("stop-playback-on-init-failure", stop_playback_on_init_failure, 0),
|
|
|
|
|
2015-02-16 19:04:05 +00:00
|
|
|
OPT_CHOICE_OR_INT("loop", loop_times, 0, 1, 10000,
|
2015-02-12 21:41:45 +00:00
|
|
|
({"no", 1},
|
2015-05-22 12:56:26 +00:00
|
|
|
{"inf", -1}, {"yes", -1},
|
2015-02-12 21:41:45 +00:00
|
|
|
{"force", -2})),
|
2015-02-27 17:31:24 +00:00
|
|
|
OPT_CHOICE_OR_INT("loop-file", loop_file, 0, 0, 10000,
|
|
|
|
({"no", 0},
|
|
|
|
{"yes", -1},
|
2014-09-22 20:56:00 +00:00
|
|
|
{"inf", -1})),
|
2012-08-05 21:34:28 +00:00
|
|
|
|
core: add playback resume feature (manual/opt-in)
A "watch later" command is now mapped to Shift+Q. This quits the player
and stores the playback state in a config file in ~/.mpv/watch_later/.
When calling the player with the same file again, playback is resumed
at that time position.
It's also possible to make mpv save playback state always on quit with
the --save-position-on-quit option. Likewise, resuming can be disabled
with the --no-resume-playback option.
This also attempts to save some playback parameters, like fullscreen
state or track selection. This will unconditionally override config
settings and command line options (which is probably not what you would
expect, but in general nobody will really care about this). Some things
are not backed up, because that would cause various problems. Additional
subtitle files, video filters, etc. are not stored because that would be
too hard and fragile. Volume/mute state are not stored because it would
mess up if the system mixer is used, or if the system mixer was
readjusted in the meantime.
Basically, the tradeoff between perfect state restoration and
complexity/fragility makes it not worth to attempt to implement
it perfectly, even if the result is a little bit inconsistent.
2013-05-05 17:37:29 +00:00
|
|
|
OPT_FLAG("resume-playback", position_resume, 0),
|
|
|
|
OPT_FLAG("save-position-on-quit", position_save_on_quit, 0),
|
2014-06-01 16:25:21 +00:00
|
|
|
OPT_FLAG("write-filename-in-watch-later-config", write_filename_in_watch_later_config, 0),
|
2014-12-12 22:57:49 +00:00
|
|
|
OPT_FLAG("ignore-path-in-watch-later-config", ignore_path_in_watch_later_config, 0),
|
core: add playback resume feature (manual/opt-in)
A "watch later" command is now mapped to Shift+Q. This quits the player
and stores the playback state in a config file in ~/.mpv/watch_later/.
When calling the player with the same file again, playback is resumed
at that time position.
It's also possible to make mpv save playback state always on quit with
the --save-position-on-quit option. Likewise, resuming can be disabled
with the --no-resume-playback option.
This also attempts to save some playback parameters, like fullscreen
state or track selection. This will unconditionally override config
settings and command line options (which is probably not what you would
expect, but in general nobody will really care about this). Some things
are not backed up, because that would cause various problems. Additional
subtitle files, video filters, etc. are not stored because that would be
too hard and fragile. Volume/mute state are not stored because it would
mess up if the system mixer is used, or if the system mixer was
readjusted in the meantime.
Basically, the tradeoff between perfect state restoration and
complexity/fragility makes it not worth to attempt to implement
it perfectly, even if the result is a little bit inconsistent.
2013-05-05 17:37:29 +00:00
|
|
|
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("ordered-chapters", ordered_chapters, 0),
|
2014-08-13 21:24:46 +00:00
|
|
|
OPT_STRING("ordered-chapters-files", ordered_chapters_files, M_OPT_FILE),
|
2010-11-26 14:56:05 +00:00
|
|
|
OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000),
|
2009-04-07 23:37:27 +00:00
|
|
|
|
2013-08-14 01:25:50 +00:00
|
|
|
OPT_DOUBLE("chapter-seek-threshold", chapter_seek_threshold, 0),
|
|
|
|
|
2014-11-02 15:47:23 +00:00
|
|
|
OPT_STRING("chapters-file", chapter_file, M_OPT_FILE),
|
|
|
|
|
2013-08-25 18:40:21 +00:00
|
|
|
OPT_FLAG("load-unsafe-playlists", load_unsafe_playlists, 0),
|
2013-11-19 21:36:33 +00:00
|
|
|
OPT_FLAG("merge-files", merge_files, 0),
|
2013-08-25 18:40:21 +00:00
|
|
|
|
2010-05-03 23:34:38 +00:00
|
|
|
// a-v sync stuff:
|
2013-07-26 00:06:58 +00:00
|
|
|
OPT_FLAG("correct-pts", correct_pts, 0),
|
2010-12-17 23:00:28 +00:00
|
|
|
OPT_CHOICE("pts-association-mode", user_pts_assoc_mode, 0,
|
|
|
|
({"auto", 0}, {"decoder", 1}, {"sort", 2})),
|
2013-02-08 20:09:18 +00:00
|
|
|
OPT_FLAG("initial-audio-sync", initial_audio_sync, 0),
|
2010-12-14 23:09:47 +00:00
|
|
|
OPT_CHOICE("hr-seek", hr_seek, 0,
|
2015-04-15 12:26:54 +00:00
|
|
|
({"no", -1}, {"absolute", 0}, {"yes", 1}, {"always", 1})),
|
2015-04-20 18:03:05 +00:00
|
|
|
OPT_FLOAT("hr-seek-demuxer-offset", hr_seek_demuxer_offset, 0),
|
2014-05-07 20:01:17 +00:00
|
|
|
OPT_FLAG("hr-seek-framedrop", hr_seek_framedrop, 0),
|
2012-09-20 01:32:01 +00:00
|
|
|
OPT_CHOICE_OR_INT("autosync", autosync, 0, 0, 10000,
|
|
|
|
({"no", -1})),
|
2002-09-23 22:12:29 +00:00
|
|
|
|
2012-09-03 20:44:44 +00:00
|
|
|
OPT_CHOICE("term-osd", term_osd, 0,
|
2012-01-06 18:48:50 +00:00
|
|
|
({"force", 1},
|
2012-09-21 07:22:25 +00:00
|
|
|
{"auto", 2},
|
2012-09-18 13:50:24 +00:00
|
|
|
{"no", 0})),
|
2012-01-06 18:48:50 +00:00
|
|
|
|
2014-01-15 15:14:37 +00:00
|
|
|
OPT_FLAG("term-osd-bar", term_osd_bar, 0),
|
|
|
|
OPT_STRING("term-osd-bar-chars", term_osd_bar_chars, 0),
|
|
|
|
|
2014-04-24 16:16:47 +00:00
|
|
|
OPT_STRING("term-playing-msg", playing_msg, 0),
|
2014-09-01 22:09:03 +00:00
|
|
|
OPT_STRING("osd-playing-msg", osd_playing_msg, 0),
|
2014-04-24 16:16:47 +00:00
|
|
|
OPT_STRING("term-status-msg", status_msg, 0),
|
2014-02-20 13:46:23 +00:00
|
|
|
OPT_STRING("osd-status-msg", osd_status_msg, 0),
|
2014-09-17 23:19:27 +00:00
|
|
|
OPT_STRING("osd-msg1", osd_msg[0], 0),
|
|
|
|
OPT_STRING("osd-msg2", osd_msg[1], 0),
|
|
|
|
OPT_STRING("osd-msg3", osd_msg[2], 0),
|
2010-05-03 23:34:38 +00:00
|
|
|
|
2015-02-27 17:31:24 +00:00
|
|
|
OPT_CHOICE("idle", player_idle_mode, 0,
|
2014-12-07 11:49:07 +00:00
|
|
|
({"no", 0},
|
|
|
|
{"once", 1},
|
2015-02-27 17:31:24 +00:00
|
|
|
{"yes", 2})),
|
2014-12-07 11:49:07 +00:00
|
|
|
|
2014-04-24 15:27:27 +00:00
|
|
|
OPT_FLAG("input-terminal", consolecontrols, CONF_GLOBAL),
|
2002-05-04 21:26:45 +00:00
|
|
|
|
2014-10-15 15:48:47 +00:00
|
|
|
OPT_STRING("input-file", input_file, M_OPT_FILE | M_OPT_GLOBAL),
|
2014-10-16 09:48:18 +00:00
|
|
|
OPT_STRING("input-unix-socket", ipc_path, M_OPT_FILE),
|
|
|
|
|
2014-06-13 00:17:31 +00:00
|
|
|
OPT_SUBSTRUCT("screenshot", screenshot_image_opts, image_writer_conf, 0),
|
|
|
|
OPT_STRING("screenshot-template", screenshot_template, 0),
|
2015-05-03 12:44:42 +00:00
|
|
|
OPT_STRING("screenshot-directory", screenshot_directory, 0),
|
2011-10-06 18:46:02 +00:00
|
|
|
|
2014-06-10 23:54:03 +00:00
|
|
|
OPT_SUBSTRUCT("input", input_opts, input_config, 0),
|
2013-07-27 19:26:00 +00:00
|
|
|
|
2013-12-26 18:22:40 +00:00
|
|
|
OPT_PRINT("list-properties", property_print_help),
|
2014-06-30 10:49:01 +00:00
|
|
|
OPT_PRINT("list-protocols", stream_print_proto_list),
|
2013-12-26 18:22:40 +00:00
|
|
|
OPT_PRINT("help", print_help),
|
|
|
|
OPT_PRINT("h", print_help),
|
|
|
|
OPT_PRINT("version", print_version),
|
|
|
|
OPT_PRINT("V", print_version),
|
2005-02-23 01:37:03 +00:00
|
|
|
|
2014-06-11 13:55:39 +00:00
|
|
|
#if HAVE_ENCODING
|
2014-06-11 00:04:02 +00:00
|
|
|
OPT_SUBSTRUCT("", encode_opts, encode_config, 0),
|
2012-11-14 01:34:42 +00:00
|
|
|
#endif
|
2012-09-14 15:51:26 +00:00
|
|
|
|
2014-12-11 00:04:15 +00:00
|
|
|
OPT_REMOVED("a52drc", "use --ad-lavc-ac3drc=level"),
|
|
|
|
OPT_REMOVED("afm", "use --ad=..."),
|
|
|
|
OPT_REPLACED("aspect", "video-aspect"),
|
|
|
|
OPT_REMOVED("ass-bottom-margin", "use --vf=sub=bottom:top"),
|
|
|
|
OPT_REPLACED("ass", "sub-ass"),
|
|
|
|
OPT_REPLACED("audiofile", "audio-file"),
|
|
|
|
OPT_REMOVED("benchmark", "use --untimed (no stats)"),
|
|
|
|
OPT_REMOVED("capture", "use --stream-capture=<filename>"),
|
|
|
|
OPT_REMOVED("channels", "use --audio-channels (changed semantics)"),
|
|
|
|
OPT_REPLACED("cursor-autohide-delay", "cursor-autohide"),
|
|
|
|
OPT_REPLACED("delay", "audio-delay"),
|
|
|
|
OPT_REMOVED("dumpstream", "use --stream-dump=<filename>"),
|
|
|
|
OPT_REPLACED("dvdangle", "dvd-angle"),
|
|
|
|
OPT_REPLACED("endpos", "length"),
|
|
|
|
OPT_REPLACED("font", "osd-font"),
|
|
|
|
OPT_REPLACED("forcedsubsonly", "sub-forced-only"),
|
|
|
|
OPT_REPLACED("format", "audio-format"),
|
|
|
|
OPT_REMOVED("hardframedrop", NULL),
|
|
|
|
OPT_REMOVED("identify", "use TOOLS/mpv_identify.sh"),
|
|
|
|
OPT_REMOVED("lavdopts", "use --vd-lavc-..."),
|
|
|
|
OPT_REMOVED("lavfdopts", "use --demuxer-lavf-..."),
|
2014-12-14 23:31:30 +00:00
|
|
|
OPT_REPLACED("lua", "script"),
|
|
|
|
OPT_REPLACED("lua-opts", "script-opts"),
|
2014-12-11 00:04:15 +00:00
|
|
|
OPT_REMOVED("mixer-channel", "use AO suboptions (alsa, oss)"),
|
|
|
|
OPT_REMOVED("mixer", "use AO suboptions (alsa, oss)"),
|
|
|
|
OPT_REPLACED("mouse-movements", "input-cursor"),
|
|
|
|
OPT_REPLACED("msgcolor", "msg-color"),
|
|
|
|
OPT_REMOVED("msglevel", "use --msg-level (changed semantics)"),
|
|
|
|
OPT_REPLACED("msgmodule", "msg-module"),
|
|
|
|
OPT_REPLACED("name", "x11-name"),
|
|
|
|
OPT_REPLACED("noar", "no-input-appleremote"),
|
|
|
|
OPT_REPLACED("noautosub", "no-sub-auto"),
|
|
|
|
OPT_REPLACED("noconsolecontrols", "no-input-terminal"),
|
|
|
|
OPT_REPLACED("nosound", "no-audio"),
|
|
|
|
OPT_REPLACED("osdlevel", "osd-level"),
|
|
|
|
OPT_REMOVED("panscanrange", "use --video-zoom, --video-pan-x/y"),
|
|
|
|
OPT_REPLACED("playing-msg", "term-playing-msg"),
|
|
|
|
OPT_REMOVED("pp", NULL),
|
|
|
|
OPT_REMOVED("pphelp", NULL),
|
|
|
|
OPT_REMOVED("rawaudio", "use --demuxer-rawaudio-..."),
|
|
|
|
OPT_REMOVED("rawvideo", "use --demuxer-rawvideo-..."),
|
|
|
|
OPT_REPLACED("spugauss", "sub-gauss"),
|
|
|
|
OPT_REPLACED("srate", "audio-samplerate"),
|
|
|
|
OPT_REPLACED("ss", "start"),
|
|
|
|
OPT_REPLACED("stop-xscreensaver", "stop-screensaver"),
|
|
|
|
OPT_REPLACED("sub-fuzziness", "sub-auto"),
|
|
|
|
OPT_REPLACED("sub", "sub-file"),
|
|
|
|
OPT_REPLACED("subcp", "sub-codepage"),
|
|
|
|
OPT_REPLACED("subdelay", "sub-delay"),
|
|
|
|
OPT_REPLACED("subfile", "sub"),
|
|
|
|
OPT_REPLACED("subfont-text-scale", "sub-scale"),
|
|
|
|
OPT_REPLACED("subfont", "sub-text-font"),
|
|
|
|
OPT_REPLACED("subfps", "sub-fps"),
|
|
|
|
OPT_REPLACED("subpos", "sub-pos"),
|
|
|
|
OPT_REPLACED("tvscan", "tv-scan"),
|
|
|
|
OPT_REMOVED("use-filename-title", "use --title='${filename}'"),
|
|
|
|
OPT_REMOVED("vc", "use --vd=..., --hwdec=..."),
|
|
|
|
OPT_REMOVED("vobsub", "use --sub-file (pass the .idx file)"),
|
|
|
|
OPT_REMOVED("xineramascreen", "use --screen (different values)"),
|
|
|
|
OPT_REMOVED("xy", "use --autofit"),
|
|
|
|
OPT_REMOVED("zoom", "Inverse available as ``--video-unscaled"),
|
|
|
|
OPT_REPLACED("media-keys", "input-media-keys"),
|
|
|
|
OPT_REPLACED("right-alt-gr", "input-right-alt-gr"),
|
|
|
|
OPT_REPLACED("autosub", "sub-auto"),
|
|
|
|
OPT_REPLACED("autosub-match", "sub-auto"),
|
|
|
|
OPT_REPLACED("status-msg", "term-status-msg"),
|
|
|
|
OPT_REPLACED("idx", "index"),
|
|
|
|
OPT_REPLACED("forceidx", "index"),
|
|
|
|
OPT_REMOVED("cache-pause-below", "for 'no', use --no-cache-pause"),
|
|
|
|
OPT_REMOVED("no-cache-pause-below", "use --no-cache-pause"),
|
|
|
|
OPT_REMOVED("volstep", "edit input.conf directly instead"),
|
2015-02-03 22:09:02 +00:00
|
|
|
OPT_REMOVED("fixed-vo", "--fixed-vo=yes is now the default"),
|
2014-12-11 22:23:50 +00:00
|
|
|
OPT_REPLACED("mkv-subtitle-preroll", "demuxer-mkv-subtitle-preroll"),
|
|
|
|
OPT_REPLACED("dtshd", "ad-spdif-dtshd"),
|
2015-02-16 19:04:15 +00:00
|
|
|
OPT_REPLACED("ass-use-margins", "sub-use-margins"),
|
2015-05-22 18:03:14 +00:00
|
|
|
OPT_REPLACED("media-title", "force-media-title"),
|
2014-12-11 22:23:50 +00:00
|
|
|
|
2014-06-11 00:04:02 +00:00
|
|
|
{0}
|
2001-03-18 23:32:31 +00:00
|
|
|
};
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2013-06-07 20:57:00 +00:00
|
|
|
const struct MPOpts mp_default_opts = {
|
2014-02-06 15:49:50 +00:00
|
|
|
.use_terminal = 1,
|
2013-12-21 22:11:12 +00:00
|
|
|
.msg_color = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.audio_driver_list = NULL,
|
2015-03-23 17:46:26 +00:00
|
|
|
.audio_decoders = "lavc:libdcadec,-spdif:*", // never select spdif by default
|
2013-06-07 20:31:26 +00:00
|
|
|
.video_decoders = NULL,
|
core: add --deinterlace option, restore it with resume functionality
The --deinterlace option does on playback start what the "deinterlace"
property normally does at runtime. You could do this before by using the
--vf option or by messing with the vo_vdpau default options, but this
new option is supposed to be a "foolproof" way.
The main motivation for adding this is so that the deinterlace property
can be restored when using the video resume functionality
(quit_watch_later command).
Implementation-wise, this is a bit messy. The video chain is rebuilt in
mpcodecs_reconfig_vo(), where we don't have access to MPContext, so the
usual mechanism for enabling deinterlacing can't be used. Further,
mpcodecs_reconfig_vo() is called by the video decoder, which doesn't
have access to MPContext either. Moving this call to mplayer.c isn't
currently possible either (see below). So we just do this before frames
are filtered, which potentially means setting the deinterlacing every
frame. Fortunately, setting deinterlacing is stable and idempotent, so
this is hopefully not a problem. We also add a counter that is
incremented on each reconfig to reduce the amount of additional work per
frame to nearly zero.
The reason we can't move mpcodecs_reconfig_vo() to mplayer.c is because
of hardware decoding: we need to check whether the video chain works
before we decide that we can use hardware decoding. Changing it so that
this can be decided in advance without building a filter chain sounds
like a good idea and should be done, but we aren't there yet.
2013-09-13 16:06:08 +00:00
|
|
|
.deinterlace = -1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.softvol = SOFTVOL_AUTO,
|
2015-05-22 16:44:59 +00:00
|
|
|
.softvol_max = 130,
|
2013-06-07 20:31:26 +00:00
|
|
|
.mixer_init_volume = -1,
|
|
|
|
.mixer_init_mute = -1,
|
2014-06-30 16:24:20 +00:00
|
|
|
.gapless_audio = -1,
|
2014-09-04 21:48:27 +00:00
|
|
|
.audio_buffer = 0.2,
|
2014-10-09 19:21:31 +00:00
|
|
|
.audio_device = "auto",
|
2014-11-07 14:54:35 +00:00
|
|
|
.audio_client_name = "mpv",
|
2013-06-07 20:31:26 +00:00
|
|
|
.vo = {
|
|
|
|
.video_driver_list = NULL,
|
|
|
|
.monitor_pixel_aspect = 1.0,
|
|
|
|
.screen_id = -1,
|
|
|
|
.fsscreen_id = -1,
|
|
|
|
.panscan = 0.0f,
|
|
|
|
.keepaspect = 1,
|
2014-10-04 20:17:36 +00:00
|
|
|
.keepaspect_window = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.border = 1,
|
|
|
|
.WinID = -1,
|
2015-04-24 20:52:01 +00:00
|
|
|
.window_scale = 1.0,
|
2013-06-07 20:31:26 +00:00
|
|
|
},
|
2014-05-20 00:40:00 +00:00
|
|
|
.allow_win_drag = 1,
|
2014-12-10 16:51:45 +00:00
|
|
|
.wintitle = "mpv - ${?media-title:${media-title}}${!media-title:No file.}",
|
2013-06-07 20:31:26 +00:00
|
|
|
.heartbeat_interval = 30.0,
|
2013-06-13 22:24:41 +00:00
|
|
|
.stop_screensaver = 1,
|
2013-09-08 00:07:20 +00:00
|
|
|
.cursor_autohide_delay = 1000,
|
2013-06-07 20:31:26 +00:00
|
|
|
.gamma_gamma = 1000,
|
|
|
|
.gamma_brightness = 1000,
|
|
|
|
.gamma_contrast = 1000,
|
|
|
|
.gamma_saturation = 1000,
|
|
|
|
.gamma_hue = 1000,
|
|
|
|
.osd_level = 1,
|
|
|
|
.osd_duration = 1000,
|
|
|
|
.osd_bar_align_y = 0.5,
|
|
|
|
.osd_bar_w = 75.0,
|
|
|
|
.osd_bar_h = 3.125,
|
|
|
|
.osd_scale = 1,
|
2013-12-10 18:58:57 +00:00
|
|
|
.osd_scale_by_window = 1,
|
2015-01-05 18:18:08 +00:00
|
|
|
.sub_scale_by_window = 1,
|
2015-02-16 19:04:15 +00:00
|
|
|
.ass_use_margins = 0,
|
|
|
|
.sub_use_margins = 1,
|
|
|
|
.ass_scale_with_window = 0,
|
|
|
|
.sub_scale_with_window = 1,
|
2014-11-25 10:08:25 +00:00
|
|
|
.use_text_osd = 1,
|
2014-05-12 23:14:07 +00:00
|
|
|
#if HAVE_LUA
|
2013-10-14 19:09:54 +00:00
|
|
|
.lua_load_osc = 1,
|
2014-12-09 20:53:38 +00:00
|
|
|
.lua_load_ytdl = 1,
|
2015-04-26 17:52:28 +00:00
|
|
|
.lua_ytdl_format = "best",
|
2015-02-22 20:32:42 +00:00
|
|
|
.lua_ytdl_raw_options = NULL,
|
2014-05-12 23:14:07 +00:00
|
|
|
#endif
|
2014-02-28 21:25:48 +00:00
|
|
|
.auto_load_scripts = 1,
|
2015-02-12 21:41:45 +00:00
|
|
|
.loop_times = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.ordered_chapters = 1,
|
|
|
|
.chapter_merge_threshold = 100,
|
2013-08-14 01:25:50 +00:00
|
|
|
.chapter_seek_threshold = 5.0,
|
2014-05-07 20:01:17 +00:00
|
|
|
.hr_seek_framedrop = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.load_config = 1,
|
|
|
|
.position_resume = 1,
|
2014-05-19 21:27:09 +00:00
|
|
|
.stream_cache = {
|
|
|
|
.size = -1,
|
2015-07-22 21:38:45 +00:00
|
|
|
.def_size = 75000,
|
2014-05-19 21:27:09 +00:00
|
|
|
.initial = 0,
|
|
|
|
.seek_min = 500,
|
2015-07-22 21:38:45 +00:00
|
|
|
.back_buffer = 75000,
|
2014-06-22 00:50:52 +00:00
|
|
|
.file_max = 1024 * 1024,
|
2014-05-19 21:27:09 +00:00
|
|
|
},
|
2015-08-05 21:41:29 +00:00
|
|
|
.demuxer_max_packs = 16000,
|
|
|
|
.demuxer_max_bytes = 400 * 1024 * 1024,
|
2014-08-16 15:09:08 +00:00
|
|
|
.demuxer_thread = 1,
|
2015-02-27 11:44:40 +00:00
|
|
|
.demuxer_min_secs = 1.0,
|
2013-09-22 00:40:29 +00:00
|
|
|
.network_rtsp_transport = 2,
|
2015-02-06 16:01:35 +00:00
|
|
|
.network_timeout = 0.0,
|
2015-07-13 11:34:58 +00:00
|
|
|
.hls_bitrate = INT_MAX,
|
2015-02-27 11:44:40 +00:00
|
|
|
.demuxer_min_secs_cache = 10.0,
|
player: redo how stream caching and pausing on low cache works
Add the --cache-secs option, which literally overrides the value of
--demuxer-readahead-secs if the stream cache is active. The default
value is very high (10 seconds), which means it can act as network
cache.
Remove the old behavior of trying to pause once the byte cache runs
low. Instead, do something similar wit the demuxer cache. The nice
thing is that we can guess how many seconds of video it has cached,
and we can make better decisions. But for now, apply a relatively
naive heuristic: if the cache is below 0.5 secs, pause, and wait
until at least 2 secs are available.
Note that due to timestamp reordering, the estimated cached duration
of video might be inaccurate, depending on the file format. If the
file format has DTS, it's easy, otherwise the duration will seemingly
jump back and forth.
2014-08-26 23:13:20 +00:00
|
|
|
.cache_pausing = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.chapterrange = {-1, -1},
|
2014-11-18 11:50:54 +00:00
|
|
|
.ab_loop = {MP_NOPTS_VALUE, MP_NOPTS_VALUE},
|
2013-06-07 20:31:26 +00:00
|
|
|
.edition_id = -1,
|
|
|
|
.default_max_pts_correction = -1,
|
2013-07-26 00:06:58 +00:00
|
|
|
.correct_pts = 1,
|
2013-11-25 22:14:54 +00:00
|
|
|
.user_pts_assoc_mode = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.initial_audio_sync = 1,
|
2014-08-17 00:51:13 +00:00
|
|
|
.frame_dropping = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.term_osd = 2,
|
2014-01-15 15:14:37 +00:00
|
|
|
.term_osd_bar_chars = "[-+-]",
|
2013-06-07 20:31:26 +00:00
|
|
|
.consolecontrols = 1,
|
|
|
|
.play_frames = -1,
|
|
|
|
.keep_open = 0,
|
2015-05-22 19:00:24 +00:00
|
|
|
.stream_id = { { [STREAM_AUDIO] = -1,
|
|
|
|
[STREAM_VIDEO] = -1,
|
|
|
|
[STREAM_SUB] = -1, },
|
|
|
|
{ [STREAM_AUDIO] = -2,
|
|
|
|
[STREAM_VIDEO] = -2,
|
|
|
|
[STREAM_SUB] = -2, }, },
|
|
|
|
.stream_id_ff = { [STREAM_AUDIO] = -1,
|
|
|
|
[STREAM_VIDEO] = -1,
|
|
|
|
[STREAM_SUB] = -1, },
|
2013-06-07 20:31:26 +00:00
|
|
|
.audio_display = 1,
|
|
|
|
.sub_visibility = 1,
|
|
|
|
.sub_pos = 100,
|
2013-06-24 22:03:37 +00:00
|
|
|
.sub_speed = 1.0,
|
2014-12-15 16:14:23 +00:00
|
|
|
.audio_output_channels = {0}, // auto
|
2013-08-25 16:23:40 +00:00
|
|
|
.audio_output_format = 0, // AF_FORMAT_UNKNOWN
|
2013-06-07 20:31:26 +00:00
|
|
|
.playback_speed = 1.,
|
2014-10-02 00:58:52 +00:00
|
|
|
.pitch_correction = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.movie_aspect = -1.,
|
|
|
|
.field_dominance = -1,
|
2014-05-04 08:31:24 +00:00
|
|
|
.sub_auto = 0,
|
2015-02-05 21:14:17 +00:00
|
|
|
.audiofile_auto = 0,
|
2013-06-07 20:31:26 +00:00
|
|
|
.osd_bar_visible = 1,
|
2013-07-16 11:28:28 +00:00
|
|
|
#if HAVE_LIBASS
|
2013-06-07 20:31:26 +00:00
|
|
|
.ass_enabled = 1,
|
|
|
|
#endif
|
|
|
|
.sub_scale = 1,
|
|
|
|
.ass_vsfilter_aspect_compat = 1,
|
2013-07-14 23:48:25 +00:00
|
|
|
.ass_vsfilter_color_compat = 1,
|
2013-06-30 16:46:29 +00:00
|
|
|
.ass_vsfilter_blur_compat = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.ass_style_override = 1,
|
2013-09-25 19:42:29 +00:00
|
|
|
.ass_shaper = 1,
|
2013-06-07 20:31:26 +00:00
|
|
|
.use_embedded_fonts = 1,
|
2014-06-13 00:06:03 +00:00
|
|
|
.sub_fix_timing = 1,
|
2014-07-22 21:40:48 +00:00
|
|
|
.sub_cp = "auto",
|
2015-05-01 19:44:37 +00:00
|
|
|
.screenshot_template = "mpv-shot%n",
|
2013-06-07 20:31:26 +00:00
|
|
|
|
2015-05-14 18:17:23 +00:00
|
|
|
.hwdec_codecs = "h264,vc1,wmv3,hevc",
|
2013-06-07 20:31:26 +00:00
|
|
|
|
2014-06-13 00:05:37 +00:00
|
|
|
.index_mode = 1,
|
2013-07-07 21:54:11 +00:00
|
|
|
|
2014-07-14 23:49:02 +00:00
|
|
|
.dvd_angle = 1,
|
|
|
|
|
2014-06-10 20:48:11 +00:00
|
|
|
.mf_fps = 1.0,
|
2014-12-29 21:51:18 +00:00
|
|
|
|
2015-03-29 13:12:11 +00:00
|
|
|
#if HAVE_RPI
|
|
|
|
.hwdec_api = -1,
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 21:51:18 +00:00
|
|
|
.display_tags = (char **)(const char*[]){
|
2014-12-31 20:07:50 +00:00
|
|
|
"Artist", "Album", "Album_Artist", "Comment", "Composer", "Genre",
|
|
|
|
"Performer", "Title", "Track", "icy-title",
|
2014-12-29 21:51:18 +00:00
|
|
|
NULL
|
|
|
|
},
|
2013-06-07 20:31:26 +00:00
|
|
|
};
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_CFG_MPLAYER_H */
|