这是源代码,系统不会自带源代码,都在仓库里面。 你找这个干嘛?
这是源代码,系统不会自带源代码,都在仓库里面。 你找这个干嘛?
github上回了个链接 第555行 说是突破100倍速看这个
如果是deepin或者uos
你可以去试试
https://github.com/dependon/mpv-cmake
我写了个cmake ,在x86平台下uos编译通过,想了解mpv的话,可以调试
如果是deepin或者uos
你可以去试试
https://github.com/dependon/mpv-cmake
我写了个cmake ,在x86平台下uos编译通过,想了解mpv的话,可以调试
记得先安装mpv的编译依赖
放出sourcelists的开发源,sudo apt build-dep mpv
记得先安装mpv的编译依赖
放出sourcelists的开发源,sudo apt build-dep mpv
如何放出sourcelists的开发源
?
如何放出sourcelists的开发源
?






然后执行 sudo apt update 就可以了
然后执行 sudo apt update 就可以了
弄完后版本 没变化
nsz@nsz:~$ mpv
mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
ffmpeg library versions:
libavutil 56.22.100
libavcodec 58.35.100
libavformat 58.20.100
libswscale 5.3.100
libavfilter 7.40.101
libswresample 3.3.100
ffmpeg version: 4.1.8-1+dde
Usage: mpv [options] [url|path/]filename
Basic options:
--start= seek to given (percent, seconds, or hh:mm:ss) position
--no-audio do not play sound
--no-video do not play video
--fs fullscreen playback
--sub-file= specify subtitle file to use
--playlist= specify playlist file
--list-options list all mpv options
--h= print options which contain the given string in their name
然后执行 sudo apt update 就可以了
Example:
./bootstrap.py
./waf configure
./waf
./waf install
第四步错误,
nsz@nsz:~/Downloads/HUAWEI Mate 20 Pro (UD)/mpv$ ./waf install
Waf: Entering directory `/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/build'
[1/1] Compiling version.sh
- install /usr/local/bin/mpv (from build/mpv)
Waf: Leaving directory `/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/build'
Build failed
Traceback (most recent call last):
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Task.py", line 180, in process
ret=self.run()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 554, in run
x.parent.mkdir()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Node.py", line 188, in mkdir
raise Errors.WafError('Could not create the directory %r'%self)
waflib.Errors.WafError: Could not create the directory /usr/local/share/doc/mpv
Traceback (most recent call last):
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Task.py", line 180, in process
ret=self.run()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 554, in run
x.parent.mkdir()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Node.py", line 188, in mkdir
raise Errors.WafError('Could not create the directory %r'%self)
waflib.Errors.WafError: Could not create the directory /usr/local/share/doc/mpv
Traceback (most recent call last):
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Task.py", line 180, in process
ret=self.run()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 554, in run
x.parent.mkdir()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Node.py", line 188, in mkdir
raise Errors.WafError('Could not create the directory %r'%self)
waflib.Errors.WafError: Could not create the directory /usr/local/share/doc/mpv
Traceback (most recent call last):
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Task.py", line 180, in process
ret=self.run()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 554, in run
x.parent.mkdir()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Node.py", line 188, in mkdir
raise Errors.WafError('Could not create the directory %r'%self)
waflib.Errors.WafError: Could not create the directory /usr/local/share/doc/mpv
Traceback (most recent call last):
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 596, in do_install
self.copy_fun(src,tgt)
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 539, in copy_fun
shutil.copy2(src,tgt)
File "/usr/lib/python3.7/shutil.py", line 263, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.7/shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/bin/mpv'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Task.py", line 180, in process
ret=self.run()
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 562, in run
fun(x.abspath(),y.abspath(),x.path_from(launch_node))
File "/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/.waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py", line 602, in do_install
raise Errors.WafError('Could not install the file %r'%tgt,e)
waflib.Errors.WafError: Could not install the file '/usr/local/bin/mpv'
nsz@ns
然后执行 sudo apt update 就可以了
加 sudo 顺利完成
nsz@nsz:~/Downloads/HUAWEI Mate 20 Pro (UD)/mpv$ sudo ./waf install
Waf: Entering directory `/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/build'
[1/1] Compiling version.sh
- install /usr/local/bin/mpv (from build/mpv)
- install /usr/local/share/doc/mpv/mpv.conf (from etc/mpv.conf)
- install /usr/local/share/doc/mpv/input.conf (from etc/input.conf)
- install /usr/local/share/doc/mpv/restore-old-bindings.conf (from etc/restore-old-bindings.conf)
- install /usr/local/share/doc/mpv/mplayer-input.conf (from etc/mplayer-input.conf)
- install /usr/local/share/man/man1/mpv.1 (from build/DOCS/man/mpv.1)
- install /usr/local/share/zsh/site-functions/_mpv (from etc/_mpv.zsh)
- install /usr/local/share/bash-completion/completions/mpv (from etc/mpv.bash-completion)
- install /usr/local/share/applications/mpv.desktop (from etc/mpv.desktop)
- install /usr/local/share/icons/hicolor/32x32/apps/mpv.png (from etc/mpv-icon-8bit-32x32.png)
- install /usr/local/share/icons/hicolor/16x16/apps/mpv.png (from etc/mpv-icon-8bit-16x16.png)
- install /usr/local/share/icons/hicolor/64x64/apps/mpv.png (from etc/mpv-icon-8bit-64x64.png)
- install /usr/local/share/icons/hicolor/128x128/apps/mpv.png (from etc/mpv-icon-8bit-128x128.png)
- install /usr/local/share/icons/hicolor/scalable/apps/mpv.svg (from etc/mpv-gradient.svg)
- install /usr/local/etc/mpv/encoding-profiles.conf (from etc/encoding-profiles.conf)
- install /usr/local/share/icons/hicolor/symbolic/apps/mpv-symbolic.svg (from etc/mpv-symbolic.svg)
Waf: Leaving directory `/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/build'
'install' finished successfully (0.366s) - 只是nsz@nsz:~$ mpv --version
mpv: error while loading shared libraries: libcdio.so.19: cannot open shared object file: No such file or directory

菜单栏可以打开了
加 sudo 顺利完成
nsz@nsz:~/Downloads/HUAWEI Mate 20 Pro (UD)/mpv$ sudo ./waf install
Waf: Entering directory `/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/build'
[1/1] Compiling version.sh
- install /usr/local/bin/mpv (from build/mpv)
- install /usr/local/share/doc/mpv/mpv.conf (from etc/mpv.conf)
- install /usr/local/share/doc/mpv/input.conf (from etc/input.conf)
- install /usr/local/share/doc/mpv/restore-old-bindings.conf (from etc/restore-old-bindings.conf)
- install /usr/local/share/doc/mpv/mplayer-input.conf (from etc/mplayer-input.conf)
- install /usr/local/share/man/man1/mpv.1 (from build/DOCS/man/mpv.1)
- install /usr/local/share/zsh/site-functions/_mpv (from etc/_mpv.zsh)
- install /usr/local/share/bash-completion/completions/mpv (from etc/mpv.bash-completion)
- install /usr/local/share/applications/mpv.desktop (from etc/mpv.desktop)
- install /usr/local/share/icons/hicolor/32x32/apps/mpv.png (from etc/mpv-icon-8bit-32x32.png)
- install /usr/local/share/icons/hicolor/16x16/apps/mpv.png (from etc/mpv-icon-8bit-16x16.png)
- install /usr/local/share/icons/hicolor/64x64/apps/mpv.png (from etc/mpv-icon-8bit-64x64.png)
- install /usr/local/share/icons/hicolor/128x128/apps/mpv.png (from etc/mpv-icon-8bit-128x128.png)
- install /usr/local/share/icons/hicolor/scalable/apps/mpv.svg (from etc/mpv-gradient.svg)
- install /usr/local/etc/mpv/encoding-profiles.conf (from etc/encoding-profiles.conf)
- install /usr/local/share/icons/hicolor/symbolic/apps/mpv-symbolic.svg (from etc/mpv-symbolic.svg)
Waf: Leaving directory `/home/nsz/Downloads/HUAWEI Mate 20 Pro (UD)/mpv/build'
'install' finished successfully (0.366s) - 只是nsz@nsz:~$ mpv --version
mpv: error while loading shared libraries: libcdio.so.19: cannot open shared object file: No such file or directory

菜单栏可以打开了
4、注册动态链接库:
我们设置了动态链接库的目录,需要注册到系统中。
echo "/usr/local/ffmpeg/lib" > /etc/ld.so.conf.d/ffmpeg.conf
ldconfig -v
在命令行执行:ffmpeg
显示如下信息,那么恭喜你编译安装ffmpeg成功了:
ffmpeg version N-64965-g937eaba Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 29 2014 01:28:01 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --disable-yasm --enable-shared
WARNING: library configuration mismatch
swscale configuration: --arch=amd64 --enable-pthreads --enable-runtime-cpudetect --extra-version='6:9.14-0ubuntu0.14.04.1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-swscale --enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
libavutil 52. 92.101 / 52. 92.101
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 49.100 / 55. 49.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.102 / 4. 11.102
libswscale 2. 6.100 / 2. 1. 1
libswresample 0. 19.100 / 0. 19.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
使用这个解决
root@nsz:/home/nsz# mpv
mpv 0.34.0-208-gb1fb4b783b Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects
built on Tue Mar 1 16:38:45 CST 2022
Popular Events
More

中文 
/*
*/
#ifndef MPLAYER_CFG_MPLAYER_H
#define MPLAYER_CFG_MPLAYER_H
/*
*/
#include
#include
#include
#include
#include
#include "config.h"
#ifdef _WIN32
#include
#endif
#include "options.h"
#include "m_config.h"
#include "m_option.h"
#include "common/common.h"
#include "stream/stream.h"
#include "video/csputils.h"
#include "video/hwdec.h"
#include "video/image_writer.h"
#include "sub/osd.h"
#include "player/core.h"
#include "player/command.h"
#include "stream/stream.h"
#include "demux/demux.h"
#if HAVE_DRM
#include "video/out/drm_common.h"
#endif
static void print_version(struct mp_log *log)
{
mp_print_version(log, true);
}
extern const struct m_sub_options tv_params_conf;
extern const struct m_sub_options stream_cdda_conf;
extern const struct m_sub_options stream_dvb_conf;
extern const struct m_sub_options stream_lavf_conf;
extern const struct m_sub_options sws_conf;
extern const struct m_sub_options zimg_conf;
extern const struct m_sub_options drm_conf;
extern const struct m_sub_options demux_rawaudio_conf;
extern const struct m_sub_options demux_rawvideo_conf;
extern const struct m_sub_options demux_lavf_conf;
extern const struct m_sub_options demux_mkv_conf;
extern const struct m_sub_options demux_cue_conf;
extern const struct m_sub_options vd_lavc_conf;
extern const struct m_sub_options ad_lavc_conf;
extern const struct m_sub_options input_config;
extern const struct m_sub_options encode_config;
extern const struct m_sub_options ra_ctx_conf;
extern const struct m_sub_options gl_video_conf;
extern const struct m_sub_options ao_alsa_conf;
extern const struct m_sub_options demux_conf;
extern const struct m_sub_options demux_cache_conf;
extern const struct m_obj_list vf_obj_list;
extern const struct m_obj_list af_obj_list;
extern const struct m_obj_list vo_obj_list;
extern const struct m_sub_options ao_conf;
extern const struct m_sub_options opengl_conf;
extern const struct m_sub_options vulkan_conf;
extern const struct m_sub_options vulkan_display_conf;
extern const struct m_sub_options spirv_conf;
extern const struct m_sub_options d3d11_conf;
extern const struct m_sub_options d3d11va_conf;
extern const struct m_sub_options angle_conf;
extern const struct m_sub_options cocoa_conf;
extern const struct m_sub_options macos_conf;
extern const struct m_sub_options wayland_conf;
extern const struct m_sub_options vaapi_conf;
static const struct m_sub_options screenshot_conf = {
.opts = image_writer_opts,
.size = sizeof(struct image_writer_opts),
.defaults = &image_writer_opts_defaults,
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct mp_vo_opts
static const m_option_t mp_vo_opt_list[] = {
{"vo", OPT_SETTINGSLIST(video_driver_list, &vo_obj_list)},
{"taskbar-progress", OPT_FLAG(taskbar_progress)},
{"snap-window", OPT_FLAG(snap_window)},
{"ontop", OPT_FLAG(ontop)},
{"ontop-level", OPT_CHOICE(ontop_level, {"window", -1}, {"system", -2},
{"desktop", -3}), M_RANGE(0, INT_MAX)},
{"border", OPT_FLAG(border)},
{"fit-border", OPT_FLAG(fit_border),
.deprecation_message = "the option is ignored and no longer needed"},
{"on-all-workspaces", OPT_FLAG(all_workspaces)},
{"geometry", OPT_GEOMETRY(geometry)},
{"autofit", OPT_SIZE_BOX(autofit)},
{"autofit-larger", OPT_SIZE_BOX(autofit_larger)},
{"autofit-smaller", OPT_SIZE_BOX(autofit_smaller)},
{"window-scale", OPT_DOUBLE(window_scale), M_RANGE(0.001, 100)},
{"window-minimized", OPT_FLAG(window_minimized)},
{"window-maximized", OPT_FLAG(window_maximized)},
{"focus-on-open", OPT_BOOL(focus_on_open)},
{"force-window-position", OPT_FLAG(force_window_position)},
{"x11-name", OPT_STRING(winname)},
{"wayland-app-id", OPT_STRING(appid)},
{"monitoraspect", OPT_FLOAT(force_monitor_aspect), M_RANGE(0.0, 9.0)},
{"monitorpixelaspect", OPT_FLOAT(monitor_pixel_aspect),
M_RANGE(1.0/32.0, 32.0)},
{"fullscreen", OPT_BOOL(fullscreen)},
{"fs", OPT_ALIAS("fullscreen")},
{"native-keyrepeat", OPT_FLAG(native_keyrepeat)},
{"panscan", OPT_FLOAT(panscan), M_RANGE(0.0, 1.0)},
{"video-zoom", OPT_FLOAT(zoom), M_RANGE(-20.0, 20.0)},
{"video-pan-x", OPT_FLOAT(pan_x), M_RANGE(-3.0, 3.0)},
{"video-pan-y", OPT_FLOAT(pan_y), M_RANGE(-3.0, 3.0)},
{"video-align-x", OPT_FLOAT(align_x), M_RANGE(-1.0, 1.0)},
{"video-align-y", OPT_FLOAT(align_y), M_RANGE(-1.0, 1.0)},
{"video-scale-x", OPT_FLOAT(scale_x), M_RANGE(0, 10000.0)},
{"video-scale-y", OPT_FLOAT(scale_y), M_RANGE(0, 10000.0)},
{"video-margin-ratio-left", OPT_FLOAT(margin_x[0]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-right", OPT_FLOAT(margin_x[1]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-top", OPT_FLOAT(margin_y[0]), M_RANGE(0.0, 1.0)},
{"video-margin-ratio-bottom", OPT_FLOAT(margin_y[1]), M_RANGE(0.0, 1.0)},
{"video-unscaled", OPT_CHOICE(unscaled,
{"no", 0}, {"yes", 1}, {"downscale-big", 2})},
{"wid", OPT_INT64(WinID)},
{"screen", OPT_CHOICE(screen_id, {"default", -1}), M_RANGE(0, 32)},
{"screen-name", OPT_STRING(screen_name)},
{"fs-screen", OPT_CHOICE(fsscreen_id, {"all", -2}, {"current", -1}),
M_RANGE(0, 32)},
{"fs-screen-name", OPT_STRING(fsscreen_name)},
{"keepaspect", OPT_FLAG(keepaspect)},
{"keepaspect-window", OPT_FLAG(keepaspect_window)},
{"hidpi-window-scale", OPT_FLAG(hidpi_window_scale)},
{"native-fs", OPT_FLAG(native_fs)},
{"override-display-fps", OPT_DOUBLE(override_display_fps),
M_RANGE(0, DBL_MAX)},
{"video-timing-offset", OPT_DOUBLE(timing_offset), M_RANGE(0.0, 1.0)},
#if HAVE_X11
{"x11-netwm", OPT_CHOICE(x11_netwm, {"auto", 0}, {"no", -1}, {"yes", 1})},
{"x11-bypass-compositor", OPT_CHOICE(x11_bypass_compositor,
{"no", 0}, {"yes", 1}, {"fs-only", 2}, {"never", 3})},
#endif
#if HAVE_WIN32_DESKTOP
{"vo-mmcss-profile", OPT_STRING(mmcss_profile)},
#endif
#if HAVE_DRM
{"", OPT_SUBSTRUCT(drm_opts, drm_conf)},
#endif
#if HAVE_EGL_ANDROID
{"android-surface-size", OPT_SIZE_BOX(android_surface_size)},
#endif
{"swapchain-depth", OPT_INT(swapchain_depth), M_RANGE(1, 8)},
{0}
};
const struct m_sub_options vo_sub_opts = {
.opts = mp_vo_opt_list,
.size = sizeof(struct mp_vo_opts),
.defaults = &(const struct mp_vo_opts){
.video_driver_list = NULL,
.monitor_pixel_aspect = 1.0,
.screen_id = -1,
.fsscreen_id = -1,
.panscan = 0.0f,
.scale_x = 1.0f,
.scale_y = 1.0f,
.keepaspect = 1,
.keepaspect_window = 1,
.hidpi_window_scale = 1,
.native_fs = 1,
.taskbar_progress = 1,
.snap_window = 0,
.border = 1,
.fit_border = 1,
.appid = "mpv",
.WinID = -1,
.window_scale = 1.0,
.x11_bypass_compositor = 2,
.mmcss_profile = "Playback",
.ontop_level = -1,
.timing_offset = 0.050,
.swapchain_depth = 3,
.focus_on_open = true,
},
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct mp_sub_filter_opts
const struct m_sub_options mp_sub_filter_opts = {
.opts = (const struct m_option[]){
{"sub-filter-sdh", OPT_FLAG(sub_filter_SDH)},
{"sub-filter-sdh-harder", OPT_FLAG(sub_filter_SDH_harder)},
{"sub-filter-regex-enable", OPT_FLAG(rf_enable)},
{"sub-filter-regex-plain", OPT_FLAG(rf_plain)},
{"sub-filter-regex", OPT_STRINGLIST(rf_items)},
{"sub-filter-jsre", OPT_STRINGLIST(jsre_items)},
{"sub-filter-regex-warn", OPT_FLAG(rf_warn)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
.defaults = &(OPT_BASE_STRUCT){
.rf_enable = 1,
},
.change_flags = UPDATE_SUB_FILT,
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct mp_subtitle_opts
const struct m_sub_options mp_subtitle_sub_opts = {
.opts = (const struct m_option[]){
{"sub-delay", OPT_FLOAT(sub_delay)},
{"sub-fps", OPT_FLOAT(sub_fps)},
{"sub-speed", OPT_FLOAT(sub_speed)},
{"sub-visibility", OPT_FLAG(sub_visibility)},
{"secondary-sub-visibility", OPT_FLAG(sec_sub_visibility)},
{"sub-forced-only", OPT_CHOICE(forced_subs_only,
{"auto", -1}, {"no", 0}, {"yes", 1})},
{"stretch-dvd-subs", OPT_FLAG(stretch_dvd_subs)},
{"stretch-image-subs-to-screen", OPT_FLAG(stretch_image_subs)},
{"image-subs-video-resolution", OPT_FLAG(image_subs_video_res)},
{"sub-fix-timing", OPT_FLAG(sub_fix_timing)},
{"sub-pos", OPT_INT(sub_pos), M_RANGE(0, 150)},
{"sub-gauss", OPT_FLOAT(sub_gauss), M_RANGE(0.0, 3.0)},
{"sub-gray", OPT_FLAG(sub_gray)},
{"sub-ass", OPT_FLAG(ass_enabled), .flags = UPDATE_SUB_HARD},
{"sub-scale", OPT_FLOAT(sub_scale), M_RANGE(0, 100)},
{"sub-ass-line-spacing", OPT_FLOAT(ass_line_spacing),
M_RANGE(-1000, 1000)},
{"sub-use-margins", OPT_FLAG(sub_use_margins)},
{"sub-ass-force-margins", OPT_FLAG(ass_use_margins)},
{"sub-ass-vsfilter-aspect-compat", OPT_FLAG(ass_vsfilter_aspect_compat)},
{"sub-ass-vsfilter-color-compat", OPT_CHOICE(ass_vsfilter_color_compat,
{"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})},
{"sub-ass-vsfilter-blur-compat", OPT_FLAG(ass_vsfilter_blur_compat)},
{"embeddedfonts", OPT_FLAG(use_embedded_fonts), .flags = UPDATE_SUB_HARD},
{"sub-ass-force-style", OPT_STRINGLIST(ass_force_style_list),
.flags = UPDATE_SUB_HARD},
{"sub-ass-styles", OPT_STRING(ass_styles_file),
.flags = M_OPT_FILE | UPDATE_SUB_HARD},
{"sub-ass-hinting", OPT_CHOICE(ass_hinting,
{"none", 0}, {"light", 1}, {"normal", 2}, {"native", 3})},
{"sub-ass-shaper", OPT_CHOICE(ass_shaper,
{"simple", 0}, {"complex", 1})},
{"sub-ass-justify", OPT_FLAG(ass_justify)},
{"sub-ass-override", OPT_CHOICE(ass_style_override,
{"no", 0}, {"yes", 1}, {"force", 3}, {"scale", 4}, {"strip", 5})},
{"sub-scale-by-window", OPT_FLAG(sub_scale_by_window)},
{"sub-scale-with-window", OPT_FLAG(sub_scale_with_window)},
{"sub-ass-scale-with-window", OPT_FLAG(ass_scale_with_window)},
{"sub", OPT_SUBSTRUCT(sub_style, sub_style_conf)},
{"sub-clear-on-seek", OPT_FLAG(sub_clear_on_seek)},
{"teletext-page", OPT_INT(teletext_page), M_RANGE(1, 999)},
{"sub-past-video-end", OPT_FLAG(sub_past_video_end)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
.defaults = &(OPT_BASE_STRUCT){
.sub_visibility = 1,
.sec_sub_visibility = 1,
.forced_subs_only = -1,
.sub_pos = 100,
.sub_speed = 1.0,
.ass_enabled = 1,
.sub_scale_by_window = 1,
.ass_use_margins = 0,
.sub_use_margins = 1,
.ass_scale_with_window = 0,
.sub_scale_with_window = 1,
.teletext_page = 100,
.sub_scale = 1,
.ass_vsfilter_aspect_compat = 1,
.ass_vsfilter_color_compat = 1,
.ass_vsfilter_blur_compat = 1,
.ass_style_override = 1,
.ass_shaper = 1,
.use_embedded_fonts = 1,
},
.change_flags = UPDATE_OSD,
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct mp_osd_render_opts
const struct m_sub_options mp_osd_render_sub_opts = {
.opts = (const struct m_option[]){
{"osd-bar-align-x", OPT_FLOAT(osd_bar_align_x), M_RANGE(-1.0, +1.0)},
{"osd-bar-align-y", OPT_FLOAT(osd_bar_align_y), M_RANGE(-1.0, +1.0)},
{"osd-bar-w", OPT_FLOAT(osd_bar_w), M_RANGE(1, 100)},
{"osd-bar-h", OPT_FLOAT(osd_bar_h), M_RANGE(0.1, 50)},
{"osd", OPT_SUBSTRUCT(osd_style, osd_style_conf)},
{"osd-scale", OPT_FLOAT(osd_scale), M_RANGE(0, 100)},
{"osd-scale-by-window", OPT_FLAG(osd_scale_by_window)},
{"force-rgba-osd-rendering", OPT_FLAG(force_rgba_osd)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
.defaults = &(OPT_BASE_STRUCT){
.osd_bar_align_y = 0.5,
.osd_bar_w = 75.0,
.osd_bar_h = 3.125,
.osd_scale = 1,
.osd_scale_by_window = 1,
},
.change_flags = UPDATE_OSD,
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct dvd_opts
const struct m_sub_options dvd_conf = {
.opts = (const struct m_option[]){
{"dvd-device", OPT_STRING(device), .flags = M_OPT_FILE},
{"dvd-speed", OPT_INT(speed)},
{"dvd-angle", OPT_INT(angle), M_RANGE(1, 99)},
{0}
},
.size = sizeof(struct dvd_opts),
.defaults = &(const struct dvd_opts){
.angle = 1,
},
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct filter_opts
const struct m_sub_options filter_conf = {
.opts = (const struct m_option[]){
{"deinterlace", OPT_FLAG(deinterlace)},
{0}
},
.size = sizeof(OPT_BASE_STRUCT),
.change_flags = UPDATE_IMGPAR,
};
#undef OPT_BASE_STRUCT
#define OPT_BASE_STRUCT struct MPOpts
static const m_option_t mp_opts[] = {
// handled in command line pre-parser (parse_commandline.c)
{"v", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_NOPROP,
.offset = -1},
{"playlist", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_FILE, .offset = -1},
{"{", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_NOPROP,
.offset = -1},
{"}", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_NOPROP,
.offset = -1},
#if HAVE_TESTS
{"unittest", OPT_STRING(test_mode), .flags = CONF_NOCFG | M_OPT_NOPROP},
#endif
// ------------------------- common options --------------------
{"quiet", OPT_FLAG(quiet)},
{"really-quiet", OPT_FLAG(msg_really_quiet),
.flags = CONF_PRE_PARSE | UPDATE_TERM},
{"terminal", OPT_FLAG(use_terminal), .flags = CONF_PRE_PARSE | UPDATE_TERM},
{"msg-level", OPT_MSGLEVELS(msg_levels),
.flags = CONF_PRE_PARSE | UPDATE_TERM},
{"dump-stats", OPT_STRING(dump_stats),
.flags = UPDATE_TERM | CONF_PRE_PARSE | M_OPT_FILE},
{"msg-color", OPT_FLAG(msg_color), .flags = CONF_PRE_PARSE | UPDATE_TERM},
{"log-file", OPT_STRING(log_file),
.flags = CONF_PRE_PARSE | M_OPT_FILE | UPDATE_TERM},
{"msg-module", OPT_FLAG(msg_module), .flags = UPDATE_TERM},
{"msg-time", OPT_FLAG(msg_time), .flags = UPDATE_TERM},
#if HAVE_WIN32_DESKTOP
{"priority", OPT_CHOICE(w32_priority,
{"no", 0},
{"realtime", REALTIME_PRIORITY_CLASS},
{"high", HIGH_PRIORITY_CLASS},
{"abovenormal", ABOVE_NORMAL_PRIORITY_CLASS},
{"normal", NORMAL_PRIORITY_CLASS},
{"belownormal", BELOW_NORMAL_PRIORITY_CLASS},
{"idle", IDLE_PRIORITY_CLASS}),
.flags = UPDATE_PRIORITY},
#endif
{"config", OPT_FLAG(load_config), .flags = CONF_PRE_PARSE},
{"config-dir", OPT_STRING(force_configdir),
.flags = CONF_NOCFG | CONF_PRE_PARSE | M_OPT_FILE},
{"reset-on-next-file", OPT_STRINGLIST(reset_options)},
#if HAVE_LUA || HAV*
{"scripts", OPT_PATHLIST(script_files), .flags = M_OPT_FILE},
{"script", OPT_CLI_ALIAS("scripts-append")},
{"script-opts", OPT_KEYVALUELIST(script_opts)},
{"load-scripts", OPT_FLAG(auto_load_scripts)},
#endif
#if HAVE_LUA
{"osc", OPT_FLAG(lua_load_osc), .flags = UPDATE_BUILTIN_SCRIPTS},
{"ytdl", OPT_FLAG(lua_load_ytdl), .flags = UPDATE_BUILTIN_SCRIPTS},
{"ytdl-format", OPT_STRING(lua_ytdl_format)},
{"ytdl-raw-options", OPT_KEYVALUELIST(lua_ytdl_raw_options)},
{"load-stats-overlay", OPT_FLAG(lua_load_stats),
.flags = UPDATE_BUILTIN_SCRIPTS},
{"load-osd-console", OPT_FLAG(lua_load_console),
.flags = UPDATE_BUILTIN_SCRIPTS},
{"load-auto-profiles",
OPT_CHOICE(lua_load_auto_profiles, {"no", 0}, {"yes", 1}, {"auto", -1}),
.flags = UPDATE_BUILTIN_SCRIPTS},
#endif
// ------------------------- stream options --------------------
#if HAVE_DVDNAV
{"", OPT_SUBSTRUCT(dvd_opts, dvd_conf)},
#endif
{"edition", OPT_CHOICE(edition_id, {"auto", -1}), M_RANGE(0, 8190)},
#if HAVE_LIBBLURAY
{"bluray-device", OPT_STRING(bluray_device), .flags = M_OPT_FILE},
#endif /* HAVE_LIBBLURAY */
// ------------------------- demuxer options --------------------
#if HAVE_CDDA
{"cdda", OPT_SUBSTRUCT(stream_cdda_opts, stream_cdda_conf)},
{"cdrom-device", OPT_STRING(cdrom_device), .flags = M_OPT_FILE},
#endif
#if HAVE_DVBIN
{"dvbin", OPT_SUBSTRUCT(stream_dvb_opts, stream_dvb_conf)},
#endif
{"", OPT_SUBSTRUCT(stream_lavf_opts, stream_lavf_conf)},
// ------------------------- a-v sync options --------------------
// ------------------------- codec/vfilter options --------------------
// ------------------------- subtitles options --------------------
//---------------------- libao/libvo options ------------------------
{"", OPT_SUBSTRUCT(ao_opts, ao_conf)},
{"audio-exclusive", OPT_FLAG(audio_exclusive), .flags = UPDATE_AUDIO},
{"audio-fallback-to-null", OPT_FLAG(ao_null_fallback)},
{"audio-stream-silence", OPT_FLAG(audio_stream_silence)},
{"audio-wait-open", OPT_FLOAT(audio_wait_open), M_RANGE(0, 60)},
{"force-window", OPT_CHOICE(force_vo,
{"no", 0}, {"yes", 1}, {"immediate", 2})},
#if HAVE_POSIX
{"input-ipc-client", OPT_STRING(ipc_client)},
#endif
#if HAVE_GL
{"", OPT_SUBSTRUCT(opengl_opts, opengl_conf)},
#endif
#if HAVE_VULKAN
{"", OPT_SUBSTRUCT(vulkan_opts, vulkan_conf)},
{"", OPT_SUBSTRUCT(vulkan_display_opts, vulkan_display_conf)},
#endif
#if HAVE_D3D11
{"", OPT_SUBSTRUCT(d3d11_opts, d3d11_conf)},
#if HAVE_D3D_HWACCEL
{"", OPT_SUBSTRUCT(d3d11va_opts, d3d11va_conf)},
#endif
#endif
#if HAVE_EGL_ANGLE_WIN32
{"", OPT_SUBSTRUCT(angle_opts, angle_conf)},
#endif
#if HAVE_GL_COCOA
{"", OPT_SUBSTRUCT(cocoa_opts, cocoa_conf)},
#endif
#if HAVE_COCOA
{"", OPT_SUBSTRUCT(macos_opts, macos_conf)},
#endif
#if HAVE_WAYLAND
{"", OPT_SUBSTRUCT(wayland_opts, wayland_conf)},
#endif
#if HAVE_GL_WIN32
{"opengl-dwmflush", OPT_CHOICE(wingl_dwm_flush,
{"no", -1}, {"auto", 0}, {"windowed", 1}, {"yes", 2})},
#endif
#if HAVE_CUDA_HWACCEL
{"cuda-decode-device", OPT_CHOICE(cuda_device, {"auto", -1}),
M_RANGE(0, INT_MAX)},
#endif
#if HAVE_VAAPI
{"vaapi", OPT_SUBSTRUCT(vaapi_opts, vaapi_conf)},
#endif
#if HAVE_ZIMG
{"zimg", OPT_SUBSTRUCT(zimg_opts, zimg_conf)},
#endif