From 293f5a93b77d92fd65db7f3d0df654f102e46cfb Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 11 Dec 2016 16:04:20 -0800 Subject: Move to flat package hierarchy Note to self: never try to move submodules again To migrate your existing submodules (more or less): set -x set -e mkdir .git/modules/pkg for old in */*/src ; do new="pkg/${old#*/}" if ! [ -f "$old/.git" ] || [ "${old%%/*}" = pkg ] ; then continue fi git -C ".git/modules/$old" config core.worktree "../../../../../$new" rmdir "$new" mv "$old" "$new" sed -e "s,$old,$new," "$new/.git" > "$new/.git.tmp" mv "$new/.git.tmp" "$new/.git" mkdir ".git/modules/${new%/src}" mv ".git/modules/$old" ".git/modules/$new" rm "${old%/src}"/*.ninja mv "${old%/src}"/*.tar.{gz,xz,bz2} "${new%/src}/" rmdir "${old%/src}" || true done sed -e 's,^\[submodule "[^/]*/,[submodule "pkg/,' .git/config > .git/config.tmp mv .git/config.tmp .git/config --- pkg/mpv/.gitignore | 1 + pkg/mpv/config.h | 180 + pkg/mpv/file2string.c | 34 + pkg/mpv/gen.rc | 81 + pkg/mpv/gensources.awk | 12 + ...0001-Include-poll.h-instead-of-sys-poll.h.patch | 44 + .../patch/0002-Add-generated-ebml-sources.patch | 1147 ++ pkg/mpv/patch/0003-Add-generated-man-page.patch | 14159 +++++++++++++++++++ ...x-crash-when-spdif-muxer-is-not-available.patch | 28 + pkg/mpv/rev | 1 + pkg/mpv/sources.awk | 19 + pkg/mpv/sources.txt | 293 + pkg/mpv/src | 1 + 13 files changed, 16000 insertions(+) create mode 100644 pkg/mpv/.gitignore create mode 100644 pkg/mpv/config.h create mode 100644 pkg/mpv/file2string.c create mode 100644 pkg/mpv/gen.rc create mode 100644 pkg/mpv/gensources.awk create mode 100644 pkg/mpv/patch/0001-Include-poll.h-instead-of-sys-poll.h.patch create mode 100644 pkg/mpv/patch/0002-Add-generated-ebml-sources.patch create mode 100644 pkg/mpv/patch/0003-Add-generated-man-page.patch create mode 100644 pkg/mpv/patch/0004-ad_spdif-Fix-crash-when-spdif-muxer-is-not-available.patch create mode 100644 pkg/mpv/rev create mode 100644 pkg/mpv/sources.awk create mode 100644 pkg/mpv/sources.txt create mode 160000 pkg/mpv/src (limited to 'pkg/mpv') diff --git a/pkg/mpv/.gitignore b/pkg/mpv/.gitignore new file mode 100644 index 00000000..012dc66e --- /dev/null +++ b/pkg/mpv/.gitignore @@ -0,0 +1 @@ +/tools.ninja diff --git a/pkg/mpv/config.h b/pkg/mpv/config.h new file mode 100644 index 00000000..c8289a41 --- /dev/null +++ b/pkg/mpv/config.h @@ -0,0 +1,180 @@ +#ifndef W_CONFIG_H_WAF +#define W_CONFIG_H_WAF + +#define DEFAULT_DVD_DEVICE "/dev/sr0" +#define DEFAULT_CDROM_DEVICE "/dev/sr0" +#define HAVE_CPLAYER 1 +#define HAVE_LIBMPV_SHARED 0 +#define HAVE_LIBMPV_STATIC 0 +#define HAVE_STATIC_BUILD 0 +#define HAVE_BUILD_DATE 1 +#define HAVE_OPTIMIZE 1 +#define HAVE_DEBUG_BUILD 1 +#define HAVE_MANPAGE_BUILD 0 +#define HAVE_HTML_BUILD 0 +#define HAVE_PDF_BUILD 0 +#define HAVE_LIBDL 1 +#define HAVE_DLOPEN 0 +#define HAVE_VF_DLOPEN_FILTERS 0 +#define HAVE_ZSH_COMP 0 +#define HAVE_ASM 1 +#define HAVE_TEST 0 +#define HAVE_CLANG_DATABASE 0 +#define HAVE_NOEXECSTACK 0 +#define HAVE_LIBM 1 +#define HAVE_MINGW 0 +#define HAVE_POSIX 1 +#define HAVE_FNMATCH 1 +#define HAVE_POSIX_OR_MINGW 1 +#define HAVE_WIN32 0 +#define HAVE_WIN32_INTERNAL_PTHREADS 0 +#define HAVE_PTHREADS 1 +#define HAVE_GNUC 1 +#define HAVE_STDATOMIC 1 +#define HAVE_ATOMIC_BUILTINS 0 +#define HAVE_SYNC_BUILTINS 0 +#define HAVE_ATOMICS 1 +#define HAVE_C11_TLS 1 +#define HAVE_GCC_TLS 1 +#define HAVE_LIBRT 1 +#define HAVE_ICONV 1 +#define HAVE_DOS_PATHS 0 +#define HAVE_TERMIOS_H 1 +#define HAVE_SYS_TERMIOS_H 0 +#define HAVE_TERMIOS 1 +#define HAVE_SHM 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_POSIX_SPAWN 1 +#define HAVE_SUBPROCESS 1 +#define HAVE_GLOB 1 +#define HAVE_GLOB_WIN32_REPLACEMENT 0 +#define HAVE_FCHMOD 1 +#define HAVE_VT_H 1 +#define HAVE_GBM_H 0 +#define HAVE_GLIBC_THREAD_NAME 0 +#define HAVE_OSX_THREAD_NAME 0 +#define HAVE_BSD_THREAD_NAME 0 +#define HAVE_NETBSD_THREAD_NAME 0 +#define HAVE_BSD_FSTATFS 0 +#define HAVE_LINUX_FSTATFS 1 +#define HAVE_LIBSMBCLIENT 0 +#define HAVE_LUA 1 +#define HAVE_LIBASS 1 +#define HAVE_LIBASS_OSD 1 +#define HAVE_DUMMY_OSD 0 +#define HAVE_ZLIB 1 +#define HAVE_ENCODING 0 +#define HAVE_LIBBLURAY 0 +#define HAVE_DVDREAD 0 +#define HAVE_DVDNAV 0 +#define HAVE_CDDA 0 +#define HAVE_ENCA 0 +#define HAVE_LIBGUESS 0 +#define HAVE_UCHARDET 0 +#define HAVE_RUBBERBAND 0 +#define HAVE_LCMS2 0 +#define HAVE_VAPOURSYNTH 0 +#define HAVE_VAPOURSYNTH_LAZY 0 +#define HAVE_VAPOURSYNTH_CORE 0 +#define HAVE_LIBARCHIVE 0 +#define HAVE_SDL2 0 +#define HAVE_SDL1 0 +#define HAVE_OSS_AUDIO_4FRONT 0 +#define HAVE_OSS_AUDIO_NATIVE 1 +#define HAVE_OSS_AUDIO_SUNAUDIO 0 +#define HAVE_OSS_AUDIO 0 +#define HAVE_RSOUND 0 +#define HAVE_SNDIO 0 +#define HAVE_PULSE 0 +#define HAVE_JACK 0 +#define HAVE_OPENAL 0 +#define HAVE_OPENSLES 0 +#define HAVE_ALSA 1 +#define HAVE_COREAUDIO 0 +#define HAVE_AUDIOUNIT 0 +#define HAVE_WASAPI 0 +#define HAVE_COCOA 0 +#define HAVE_DRM 1 +#define HAVE_GBM 0 +#define HAVE_WAYLAND 0 +#define HAVE_X11 0 +#define HAVE_XSS 0 +#define HAVE_XEXT 0 +#define HAVE_XV 0 +#define HAVE_XINERAMA 0 +#define HAVE_XRANDR 0 +#define HAVE_GL_COCOA 0 +#define HAVE_GL_X11 0 +#define HAVE_EGL_X11 0 +#define HAVE_EGL_DRM 0 +#define HAVE_GL_WAYLAND 0 +#define HAVE_GL_WIN32 0 +#define HAVE_GL_DXINTEROP 0 +#define HAVE_EGL_ANGLE 0 +#define HAVE_VDPAU 0 +#define HAVE_VDPAU_GL_X11 0 +#define HAVE_VAAPI 0 +#define HAVE_VAAPI_X11 0 +#define HAVE_VAAPI_WAYLAND 0 +#define HAVE_VAAPI_DRM 0 +#define HAVE_VAAPI_GLX 0 +#define HAVE_VAAPI_X_EGL 0 +#define HAVE_VAAPI_EGL 0 +#define HAVE_CACA 0 +#define HAVE_JPEG 0 +#define HAVE_DIRECT3D 0 +#define HAVE_ANDROID 0 +#define HAVE_RPI 0 +#define HAVE_STANDARD_GL 0 +#define HAVE_ANDROID_GL 0 +#define HAVE_IOS_GL 0 +#define HAVE_ANY_GL 0 +#define HAVE_PLAIN_GL 0 +#define HAVE_MALI_FBDEV 0 +#define HAVE_GL 0 +#define HAVE_EGL_HELPERS 0 +#define HAVE_LIBAV 1 +#define HAVE_LIBSWRESAMPLE 1 +#define HAVE_LIBAVRESAMPLE 0 +#define HAVE_RESAMPLER 1 +#define HAVE_LIBAVFILTER 1 +#define HAVE_LIBAVDEVICE 1 +#define HAVE_AVCODEC_CHROMA_POS_API 1 +#define HAVE_AVFRAME_METADATA 1 +#define HAVE_AVFRAME_SKIP_SAMPLES 1 +#define HAVE_AV_PIX_FMT_MMAL 1 +#define HAVE_AV_VERSION_INFO 1 +#define HAVE_AV_NEW_PIXDESC 1 +#define HAVE_AV_AVPACKET_INT64_DURATION 1 +#define HAVE_AV_SUBTITLE_NOPICT 1 +#define HAVE_AVCODEC_PROFILE_NAME 1 +#define HAVE_AVCODEC_NEW_CODEC_API 1 +#define HAVE_AVCODEC_HAS_CODECPAR 1 +#define HAVE_AVUTIL_HAS_HWCONTEXT 1 +#define HAVE_AVUTIL_HDR 1 +#define HAVE_AVUTIL_MASTERING_METADATA 1 +#define HAVE_VAAPI_HWACCEL 0 +#define HAVE_VIDEOTOOLBOX_VIDEOTOOLBOX_H 0 +#define HAVE_VIDEO_TOOLBOX_VIDEO_TOOLBOX_H 0 +#define HAVE_VIDEOTOOLBOX_HWACCEL 0 +#define HAVE_VIDEOTOOLBOX_GL 0 +#define HAVE_VDPAU_HWACCEL 0 +#define HAVE_D3D_HWACCEL 0 +#define HAVE_CUDA_HWACCEL 0 +#define HAVE_SSE4_INTRINSICS 0 +#define HAVE_TV 0 +#define HAVE_SYS_VIDEOIO_H 0 +#define HAVE_VIDEODEV 1 +#define HAVE_TV_V4L2 0 +#define HAVE_LIBV4L2 0 +#define HAVE_AUDIO_INPUT 0 +#define HAVE_DVBIN 0 +#define HAVE_WIN32_EXECUTABLE 0 +#define HAVE_APPLE_REMOTE 0 +#define HAVE_SYS_SOUNDCARD_H (HAVE_OSS_AUDIO_NATIVE || HAVE_OSS_AUDIO_4FRONT) +#define HAVE_SOUNDCARD_H HAVE_OSS_AUDIO_SUNAUDIO +#define CONFIGURATION "./waf configure --disable-libass --disable-gl" +#define MPV_CONFDIR "/etc/mpv" +#define FULLCONFIG "asm atomics audio-input av-pix-fmt-mmal av-version-info avcodec-chroma-pos-api avframe-metadata avframe-skip-samples build-date c11-tls cplayer debug-build dlopen dummy-osd dvbin encoding fchmod glob iconv libav libavdevice libavfilter libdl libm librt libswresample linux-fstatfs nanosleep optimize oss-audio oss-audio-native posix posix-or-mingw posix-spawn pthreads resampler shm stdatomic subprocess termios tv tv-v4l2 videodev vt.h zlib" + +#endif /* W_CONFIG_H_WAF */ diff --git a/pkg/mpv/file2string.c b/pkg/mpv/file2string.c new file mode 100644 index 00000000..84f31ce1 --- /dev/null +++ b/pkg/mpv/file2string.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +static const char safe[] = + "][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#%&'()*+,./:;<=>^_{|}~ -"; + +int main(int argc, char *argv[]) { + FILE *f; + char *line = NULL, *s; + size_t size = 0; + ssize_t n; + + f = fopen(argv[1], "r"); + if (!f) { + fprintf(stderr, "fopen %s: %s\n", argv[1], strerror(errno)); + return 1; + } + + printf("/* Generated from %s */\n", argv[1]); + while ((n = getline(&line, &size, f)) >= 0) { + printf("\""); + for (s = line; s < line + n; ++s) { + if (memchr(safe, *s, sizeof(safe) - 1)) + fputc(*s, stdout); + else + printf("\\%03hho", *s); + } + printf("\"\n"); + } + + return 0; +} diff --git a/pkg/mpv/gen.rc b/pkg/mpv/gen.rc new file mode 100644 index 00000000..a95e9da9 --- /dev/null +++ b/pkg/mpv/gen.rc @@ -0,0 +1,81 @@ +cflags=(\ + -isystem '$builddir'/pkg/ffmpeg/include\ + -isystem '$builddir'/pkg/zlib/include\ + -isystem pkg/ffmpeg/src\ + -I '$dir' \ + -I '$outdir' \ + -I '$srcdir' \ +) + +srcs=(\ + osdep/^(main-fn-unix.c terminal-unix.c timer-linux.c)\ + ta/^(ta.c ta_talloc.c ta_utils.c)\ + `{awk -f sources.awk 'sources=sources.txt' config.h}\ +) +checkstatus + +libs=(\ + ffmpeg/^(\ + libavcodec.a.d\ + libavdevice.a.d\ + libavfilter.a.d\ + libavformat.a.d\ + libavutil.a\ + libswresample.a.d\ + libswscale.a.d\ + )\ + zlib/libz.a\ +) + +deps=('$outdir'/version.h pkg/^(zlib ffmpeg)^/headers) + +rule versionhdr 'sh $srcdir/version.sh --cwd=$srcdir --versionh=$out' +build '$outdir'/version.h versionhdr '|' '$srcdir'/version.sh + +{ + include 'toolchain/$host_toolchain.ninja' + set srcdir '$dir' + exe file2string file2string.c +} >tools.ninja ; subninja tools.ninja + +rule file2string '$outdir/file2string $in >$out.tmp && mv $out.tmp $out' + +fn file2string { + build '$outdir'/$1 file2string '$srcdir'/$2 '|' '$outdir'/file2string + deps=($deps '$outdir'/$1) +} + +file2string input/input_conf.h etc/input.conf +file2string player/builtin_conf.inc etc/builtin.conf +file2string sub/osd_font.h sub/osd_font.otf +for(f in assdraw defaults options osc ytdl_hook) + file2string player/lua/$f.inc player/lua/$f.lua + +if(grep -qF 'HAVE_ALSA 1' config.h) { + cflags=($cflags -isystem '$builddir'/pkg/alsa-lib/include) + libs=($libs alsa-lib/libasound.a) + deps=($deps pkg/alsa-lib/headers) +} +if(grep -qF 'HAVE_DRM 1' config.h) { + cflags=($cflags '-isystem pkg/libdrm/'^(src src/include/drm)) + libs=($libs libdrm/libdrm.a) +} +if(grep -qF 'HAVE_LIBASS 1' config.h) { + cflags=($cflags -isystem '$builddir'/pkg/libass/include) + libs=($libs libass/libass.a.d) + deps=($deps pkg/libass/headers) +} +if(grep -qF 'HAVE_LUA 1' config.h) { + cflags=($cflags -isystem pkg/lua/src/src) + libs=($libs lua/liblua.a) +} + +cflags $cflags +phony deps $deps + +exe mpv -d '$dir'/deps $srcs '$builddir'/pkg/$libs +file bin/mpv '$outdir'/mpv 755 +file share/man/man1/mpv.1 '$srcdir'/DOCS/man/mpv.1 644 + +gen_inputs='$dir'/^(sources.awk sources.txt config.h) +fetch git diff --git a/pkg/mpv/gensources.awk b/pkg/mpv/gensources.awk new file mode 100644 index 00000000..f33c00df --- /dev/null +++ b/pkg/mpv/gensources.awk @@ -0,0 +1,12 @@ +# usage: awk -f gensources.awk src/wscript_build.py >sources.txt + +BEGIN { + FS = "\"" +} + +/ +\(.*\),$/ { + if (NF == 3) + print $2 + else if (NF == 5) + print $2, $4 +} diff --git a/pkg/mpv/patch/0001-Include-poll.h-instead-of-sys-poll.h.patch b/pkg/mpv/patch/0001-Include-poll.h-instead-of-sys-poll.h.patch new file mode 100644 index 00000000..d466d1dc --- /dev/null +++ b/pkg/mpv/patch/0001-Include-poll.h-instead-of-sys-poll.h.patch @@ -0,0 +1,44 @@ +From 935018562e6fee649bb629a873d4c3beca3bc72e Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Sat, 2 Jul 2016 17:11:20 -0700 +Subject: [PATCH] Include poll.h instead of sys/poll.h + +--- + video/out/drm_common.c | 2 +- + video/out/vo_drm.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/video/out/drm_common.c b/video/out/drm_common.c +index 44e017e4b..3a9b2a4b3 100644 +--- a/video/out/drm_common.c ++++ b/video/out/drm_common.c +@@ -16,10 +16,10 @@ + */ + + #include ++#include + #include + #include + #include +-#include + #include + #include + #include +diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c +index 7e642e391..726d820ba 100644 +--- a/video/out/vo_drm.c ++++ b/video/out/vo_drm.c +@@ -18,9 +18,9 @@ + #include + #include + #include ++#include + #include + #include +-#include + #include + + #include +-- +2.11.0 + diff --git a/pkg/mpv/patch/0002-Add-generated-ebml-sources.patch b/pkg/mpv/patch/0002-Add-generated-ebml-sources.patch new file mode 100644 index 00000000..bb3be12e --- /dev/null +++ b/pkg/mpv/patch/0002-Add-generated-ebml-sources.patch @@ -0,0 +1,1147 @@ +From 79a9af59e6865a39214f628186fd768165fa2329 Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Sat, 2 Jul 2016 17:32:27 -0700 +Subject: [PATCH] Add generated ebml sources + +These require perl to generate. + +$ perl TOOLS/matroska.pl --generate-header demux/ebml.c demux/demux_mkv.c > demux/ebml_types.h +$ perl TOOLS/matroska.pl --generate-definitions demux/ebml.c > demux/ebml_defs.c +--- + demux/ebml_defs.c | 529 +++++++++++++++++++++++++++++++++++++++++++++++ + demux/ebml_types.h | 587 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 1116 insertions(+) + create mode 100644 demux/ebml_defs.c + create mode 100644 demux/ebml_types.h + +diff --git a/demux/ebml_defs.c b/demux/ebml_defs.c +new file mode 100644 +index 000000000..3fcbf8a5b +--- /dev/null ++++ b/demux/ebml_defs.c +@@ -0,0 +1,529 @@ ++/* Generated by TOOLS/matroska.pl, do not edit manually */ ++ ++ ++E("EBMLVersion", ebml_version, EBML_TYPE_UINT) ++ ++E("EBMLReadVersion", ebml_read_version, EBML_TYPE_UINT) ++ ++E("EBMLMaxIDLength", ebml_max_id_length, EBML_TYPE_UINT) ++ ++E("EBMLMaxSizeLength", ebml_max_size_length, EBML_TYPE_UINT) ++ ++E("DocType", doc_type, EBML_TYPE_STR) ++ ++E("DocTypeVersion", doc_type_version, EBML_TYPE_UINT) ++ ++E("DocTypeReadVersion", doc_type_read_version, EBML_TYPE_UINT) ++ ++#define N ebml ++E_S("EBML", 7) ++F(EBML_ID_DOCTYPE, doc_type, 0) ++F(EBML_ID_DOCTYPEREADVERSION, doc_type_read_version, 0) ++F(EBML_ID_DOCTYPEVERSION, doc_type_version, 0) ++F(EBML_ID_EBMLMAXIDLENGTH, ebml_max_id_length, 0) ++F(EBML_ID_EBMLMAXSIZELENGTH, ebml_max_size_length, 0) ++F(EBML_ID_EBMLREADVERSION, ebml_read_version, 0) ++F(EBML_ID_EBMLVERSION, ebml_version, 0) ++}}; ++#undef N ++ ++E("CRC32", crc32, EBML_TYPE_BINARY) ++ ++E("Void", void, EBML_TYPE_BINARY) ++ ++E("SeekID", seek_id, EBML_TYPE_EBML_ID) ++ ++E("SeekPosition", seek_position, EBML_TYPE_UINT) ++ ++#define N seek ++E_S("Seek", 2) ++F(MATROSKA_ID_SEEKID, seek_id, 0) ++F(MATROSKA_ID_SEEKPOSITION, seek_position, 0) ++}}; ++#undef N ++ ++#define N seek_head ++E_S("SeekHead", 1) ++F(MATROSKA_ID_SEEK, seek, 1) ++}}; ++#undef N ++ ++E("SegmentUID", segment_uid, EBML_TYPE_BINARY) ++ ++E("PrevUID", prev_uid, EBML_TYPE_BINARY) ++ ++E("NextUID", next_uid, EBML_TYPE_BINARY) ++ ++E("TimecodeScale", timecode_scale, EBML_TYPE_UINT) ++ ++E("DateUTC", date_utc, EBML_TYPE_SINT) ++ ++E("Title", title, EBML_TYPE_STR) ++ ++E("MuxingApp", muxing_app, EBML_TYPE_STR) ++ ++E("WritingApp", writing_app, EBML_TYPE_STR) ++ ++E("Duration", duration, EBML_TYPE_FLOAT) ++ ++#define N info ++E_S("Info", 9) ++F(MATROSKA_ID_DATEUTC, date_utc, 0) ++F(MATROSKA_ID_DURATION, duration, 0) ++F(MATROSKA_ID_MUXINGAPP, muxing_app, 0) ++F(MATROSKA_ID_NEXTUID, next_uid, 0) ++F(MATROSKA_ID_PREVUID, prev_uid, 0) ++F(MATROSKA_ID_SEGMENTUID, segment_uid, 0) ++F(MATROSKA_ID_TIMECODESCALE, timecode_scale, 0) ++F(MATROSKA_ID_TITLE, title, 0) ++F(MATROSKA_ID_WRITINGAPP, writing_app, 0) ++}}; ++#undef N ++ ++E("Timecode", timecode, EBML_TYPE_UINT) ++ ++E("Block", block, EBML_TYPE_BINARY) ++ ++E("BlockDuration", block_duration, EBML_TYPE_UINT) ++ ++E("ReferenceBlock", reference_block, EBML_TYPE_SINT) ++ ++E("DiscardPadding", discard_padding, EBML_TYPE_SINT) ++ ++#define N block_group ++E_S("BlockGroup", 4) ++F(MATROSKA_ID_BLOCK, block, 0) ++F(MATROSKA_ID_BLOCKDURATION, block_duration, 0) ++F(MATROSKA_ID_DISCARDPADDING, discard_padding, 0) ++F(MATROSKA_ID_REFERENCEBLOCK, reference_block, 1) ++}}; ++#undef N ++ ++E("SimpleBlock", simple_block, EBML_TYPE_BINARY) ++ ++#define N cluster ++E_S("Cluster", 3) ++F(MATROSKA_ID_BLOCKGROUP, block_group, 1) ++F(MATROSKA_ID_SIMPLEBLOCK, simple_block, 1) ++F(MATROSKA_ID_TIMECODE, timecode, 0) ++}}; ++#undef N ++ ++E("TrackNumber", track_number, EBML_TYPE_UINT) ++ ++E("TrackUID", track_uid, EBML_TYPE_UINT) ++ ++E("TrackType", track_type, EBML_TYPE_UINT) ++ ++E("FlagEnabled", flag_enabled, EBML_TYPE_UINT) ++ ++E("FlagDefault", flag_default, EBML_TYPE_UINT) ++ ++E("FlagForced", flag_forced, EBML_TYPE_UINT) ++ ++E("FlagLacing", flag_lacing, EBML_TYPE_UINT) ++ ++E("MinCache", min_cache, EBML_TYPE_UINT) ++ ++E("MaxCache", max_cache, EBML_TYPE_UINT) ++ ++E("DefaultDuration", default_duration, EBML_TYPE_UINT) ++ ++E("TrackTimecodeScale", track_timecode_scale, EBML_TYPE_FLOAT) ++ ++E("MaxBlockAdditionID", max_block_addition_id, EBML_TYPE_UINT) ++ ++E("Name", name, EBML_TYPE_STR) ++ ++E("Language", language, EBML_TYPE_STR) ++ ++E("CodecID", codec_id, EBML_TYPE_STR) ++ ++E("CodecPrivate", codec_private, EBML_TYPE_BINARY) ++ ++E("CodecName", codec_name, EBML_TYPE_STR) ++ ++E("CodecDecodeAll", codec_decode_all, EBML_TYPE_UINT) ++ ++E("CodecDelay", codec_delay, EBML_TYPE_UINT) ++ ++E("SeekPreRoll", seek_pre_roll, EBML_TYPE_UINT) ++ ++E("FlagInterlaced", flag_interlaced, EBML_TYPE_UINT) ++ ++E("PixelWidth", pixel_width, EBML_TYPE_UINT) ++ ++E("PixelHeight", pixel_height, EBML_TYPE_UINT) ++ ++E("DisplayWidth", display_width, EBML_TYPE_UINT) ++ ++E("DisplayHeight", display_height, EBML_TYPE_UINT) ++ ++E("DisplayUnit", display_unit, EBML_TYPE_UINT) ++ ++E("FrameRate", frame_rate, EBML_TYPE_FLOAT) ++ ++E("ColourSpace", colour_space, EBML_TYPE_BINARY) ++ ++E("StereoMode", stereo_mode, EBML_TYPE_UINT) ++ ++E("MatrixCoefficients", matrix_coefficients, EBML_TYPE_UINT) ++ ++E("BitsPerChannel", bits_per_channel, EBML_TYPE_UINT) ++ ++E("ChromaSubsamplingHorz", chroma_subsampling_horz, EBML_TYPE_UINT) ++ ++E("ChromaSubsamplingVert", chroma_subsampling_vert, EBML_TYPE_UINT) ++ ++E("CbSubsamplingHorz", cb_subsampling_horz, EBML_TYPE_UINT) ++ ++E("CbSubsamplingVert", cb_subsampling_vert, EBML_TYPE_UINT) ++ ++E("ChromaSitingHorz", chroma_siting_horz, EBML_TYPE_UINT) ++ ++E("ChromaSitingVert", chroma_siting_vert, EBML_TYPE_UINT) ++ ++E("Range", range, EBML_TYPE_UINT) ++ ++E("TransferCharacteristics", transfer_characteristics, EBML_TYPE_UINT) ++ ++E("Primaries", primaries, EBML_TYPE_UINT) ++ ++E("MaxCLL", max_cll, EBML_TYPE_UINT) ++ ++E("MaxFALL", max_fall, EBML_TYPE_UINT) ++ ++E("PrimaryRChromaticityX", primary_r_chromaticity_x, EBML_TYPE_FLOAT) ++ ++E("PrimaryRChromaticityY", primary_r_chromaticity_y, EBML_TYPE_FLOAT) ++ ++E("PrimaryGChromaticityX", primary_g_chromaticity_x, EBML_TYPE_FLOAT) ++ ++E("PrimaryGChromaticityY", primary_g_chromaticity_y, EBML_TYPE_FLOAT) ++ ++E("PrimaryBChromaticityX", primary_b_chromaticity_x, EBML_TYPE_FLOAT) ++ ++E("PrimaryBChromaticityY", primary_b_chromaticity_y, EBML_TYPE_FLOAT) ++ ++E("WhitePointChromaticityX", white_point_chromaticity_x, EBML_TYPE_FLOAT) ++ ++E("WhitePointChromaticityY", white_point_chromaticity_y, EBML_TYPE_FLOAT) ++ ++E("LuminanceMax", luminance_max, EBML_TYPE_FLOAT) ++ ++E("LuminanceMin", luminance_min, EBML_TYPE_FLOAT) ++ ++#define N mastering_metadata ++E_S("MasteringMetadata", 10) ++F(MATROSKA_ID_LUMINANCEMAX, luminance_max, 0) ++F(MATROSKA_ID_LUMINANCEMIN, luminance_min, 0) ++F(MATROSKA_ID_PRIMARYBCHROMATICITYX, primary_b_chromaticity_x, 0) ++F(MATROSKA_ID_PRIMARYBCHROMATICITYY, primary_b_chromaticity_y, 0) ++F(MATROSKA_ID_PRIMARYGCHROMATICITYX, primary_g_chromaticity_x, 0) ++F(MATROSKA_ID_PRIMARYGCHROMATICITYY, primary_g_chromaticity_y, 0) ++F(MATROSKA_ID_PRIMARYRCHROMATICITYX, primary_r_chromaticity_x, 0) ++F(MATROSKA_ID_PRIMARYRCHROMATICITYY, primary_r_chromaticity_y, 0) ++F(MATROSKA_ID_WHITEPOINTCHROMATICITYX, white_point_chromaticity_x, 0) ++F(MATROSKA_ID_WHITEPOINTCHROMATICITYY, white_point_chromaticity_y, 0) ++}}; ++#undef N ++ ++#define N colour ++E_S("Colour", 14) ++F(MATROSKA_ID_BITSPERCHANNEL, bits_per_channel, 0) ++F(MATROSKA_ID_CBSUBSAMPLINGHORZ, cb_subsampling_horz, 0) ++F(MATROSKA_ID_CBSUBSAMPLINGVERT, cb_subsampling_vert, 0) ++F(MATROSKA_ID_CHROMASITINGHORZ, chroma_siting_horz, 0) ++F(MATROSKA_ID_CHROMASITINGVERT, chroma_siting_vert, 0) ++F(MATROSKA_ID_CHROMASUBSAMPLINGHORZ, chroma_subsampling_horz, 0) ++F(MATROSKA_ID_CHROMASUBSAMPLINGVERT, chroma_subsampling_vert, 0) ++F(MATROSKA_ID_MASTERINGMETADATA, mastering_metadata, 0) ++F(MATROSKA_ID_MATRIXCOEFFICIENTS, matrix_coefficients, 0) ++F(MATROSKA_ID_MAXCLL, max_cll, 0) ++F(MATROSKA_ID_MAXFALL, max_fall, 0) ++F(MATROSKA_ID_PRIMARIES, primaries, 0) ++F(MATROSKA_ID_RANGE, range, 0) ++F(MATROSKA_ID_TRANSFERCHARACTERISTICS, transfer_characteristics, 0) ++}}; ++#undef N ++ ++#define N video ++E_S("Video", 10) ++F(MATROSKA_ID_COLOUR, colour, 0) ++F(MATROSKA_ID_COLOURSPACE, colour_space, 0) ++F(MATROSKA_ID_DISPLAYHEIGHT, display_height, 0) ++F(MATROSKA_ID_DISPLAYUNIT, display_unit, 0) ++F(MATROSKA_ID_DISPLAYWIDTH, display_width, 0) ++F(MATROSKA_ID_FLAGINTERLACED, flag_interlaced, 0) ++F(MATROSKA_ID_FRAMERATE, frame_rate, 0) ++F(MATROSKA_ID_PIXELHEIGHT, pixel_height, 0) ++F(MATROSKA_ID_PIXELWIDTH, pixel_width, 0) ++F(MATROSKA_ID_STEREOMODE, stereo_mode, 0) ++}}; ++#undef N ++ ++E("SamplingFrequency", sampling_frequency, EBML_TYPE_FLOAT) ++ ++E("OutputSamplingFrequency", output_sampling_frequency, EBML_TYPE_FLOAT) ++ ++E("Channels", channels, EBML_TYPE_UINT) ++ ++E("BitDepth", bit_depth, EBML_TYPE_UINT) ++ ++#define N audio ++E_S("Audio", 4) ++F(MATROSKA_ID_BITDEPTH, bit_depth, 0) ++F(MATROSKA_ID_CHANNELS, channels, 0) ++F(MATROSKA_ID_OUTPUTSAMPLINGFREQUENCY, output_sampling_frequency, 0) ++F(MATROSKA_ID_SAMPLINGFREQUENCY, sampling_frequency, 0) ++}}; ++#undef N ++ ++E("ContentEncodingOrder", content_encoding_order, EBML_TYPE_UINT) ++ ++E("ContentEncodingScope", content_encoding_scope, EBML_TYPE_UINT) ++ ++E("ContentEncodingType", content_encoding_type, EBML_TYPE_UINT) ++ ++E("ContentCompAlgo", content_comp_algo, EBML_TYPE_UINT) ++ ++E("ContentCompSettings", content_comp_settings, EBML_TYPE_BINARY) ++ ++#define N content_compression ++E_S("ContentCompression", 2) ++F(MATROSKA_ID_CONTENTCOMPALGO, content_comp_algo, 0) ++F(MATROSKA_ID_CONTENTCOMPSETTINGS, content_comp_settings, 0) ++}}; ++#undef N ++ ++#define N content_encoding ++E_S("ContentEncoding", 4) ++F(MATROSKA_ID_CONTENTCOMPRESSION, content_compression, 0) ++F(MATROSKA_ID_CONTENTENCODINGORDER, content_encoding_order, 0) ++F(MATROSKA_ID_CONTENTENCODINGSCOPE, content_encoding_scope, 0) ++F(MATROSKA_ID_CONTENTENCODINGTYPE, content_encoding_type, 0) ++}}; ++#undef N ++ ++#define N content_encodings ++E_S("ContentEncodings", 1) ++F(MATROSKA_ID_CONTENTENCODING, content_encoding, 1) ++}}; ++#undef N ++ ++#define N track_entry ++E_S("TrackEntry", 23) ++F(MATROSKA_ID_AUDIO, audio, 0) ++F(MATROSKA_ID_CODECDECODEALL, codec_decode_all, 0) ++F(MATROSKA_ID_CODECDELAY, codec_delay, 0) ++F(MATROSKA_ID_CODECID, codec_id, 0) ++F(MATROSKA_ID_CODECNAME, codec_name, 0) ++F(MATROSKA_ID_CODECPRIVATE, codec_private, 0) ++F(MATROSKA_ID_CONTENTENCODINGS, content_encodings, 0) ++F(MATROSKA_ID_DEFAULTDURATION, default_duration, 0) ++F(MATROSKA_ID_FLAGDEFAULT, flag_default, 0) ++F(MATROSKA_ID_FLAGENABLED, flag_enabled, 0) ++F(MATROSKA_ID_FLAGFORCED, flag_forced, 0) ++F(MATROSKA_ID_FLAGLACING, flag_lacing, 0) ++F(MATROSKA_ID_LANGUAGE, language, 0) ++F(MATROSKA_ID_MAXBLOCKADDITIONID, max_block_addition_id, 0) ++F(MATROSKA_ID_MAXCACHE, max_cache, 0) ++F(MATROSKA_ID_MINCACHE, min_cache, 0) ++F(MATROSKA_ID_NAME, name, 0) ++F(MATROSKA_ID_SEEKPREROLL, seek_pre_roll, 0) ++F(MATROSKA_ID_TRACKNUMBER, track_number, 0) ++F(MATROSKA_ID_TRACKTIMECODESCALE, track_timecode_scale, 0) ++F(MATROSKA_ID_TRACKTYPE, track_type, 0) ++F(MATROSKA_ID_TRACKUID, track_uid, 0) ++F(MATROSKA_ID_VIDEO, video, 0) ++}}; ++#undef N ++ ++#define N tracks ++E_S("Tracks", 1) ++F(MATROSKA_ID_TRACKENTRY, track_entry, 1) ++}}; ++#undef N ++ ++E("CueTime", cue_time, EBML_TYPE_UINT) ++ ++E("CueTrack", cue_track, EBML_TYPE_UINT) ++ ++E("CueClusterPosition", cue_cluster_position, EBML_TYPE_UINT) ++ ++E("CueRelativePosition", cue_relative_position, EBML_TYPE_UINT) ++ ++E("CueDuration", cue_duration, EBML_TYPE_UINT) ++ ++#define N cue_track_positions ++E_S("CueTrackPositions", 4) ++F(MATROSKA_ID_CUECLUSTERPOSITION, cue_cluster_position, 0) ++F(MATROSKA_ID_CUEDURATION, cue_duration, 0) ++F(MATROSKA_ID_CUERELATIVEPOSITION, cue_relative_position, 0) ++F(MATROSKA_ID_CUETRACK, cue_track, 0) ++}}; ++#undef N ++ ++#define N cue_point ++E_S("CuePoint", 2) ++F(MATROSKA_ID_CUETIME, cue_time, 0) ++F(MATROSKA_ID_CUETRACKPOSITIONS, cue_track_positions, 1) ++}}; ++#undef N ++ ++#define N cues ++E_S("Cues", 1) ++F(MATROSKA_ID_CUEPOINT, cue_point, 1) ++}}; ++#undef N ++ ++E("FileDescription", file_description, EBML_TYPE_STR) ++ ++E("FileName", file_name, EBML_TYPE_STR) ++ ++E("FileMimeType", file_mime_type, EBML_TYPE_STR) ++ ++E("FileData", file_data, EBML_TYPE_BINARY) ++ ++E("FileUID", file_uid, EBML_TYPE_UINT) ++ ++#define N attached_file ++E_S("AttachedFile", 5) ++F(MATROSKA_ID_FILEDATA, file_data, 0) ++F(MATROSKA_ID_FILEDESCRIPTION, file_description, 0) ++F(MATROSKA_ID_FILEMIMETYPE, file_mime_type, 0) ++F(MATROSKA_ID_FILENAME, file_name, 0) ++F(MATROSKA_ID_FILEUID, file_uid, 0) ++}}; ++#undef N ++ ++#define N attachments ++E_S("Attachments", 1) ++F(MATROSKA_ID_ATTACHEDFILE, attached_file, 1) ++}}; ++#undef N ++ ++E("EditionUID", edition_uid, EBML_TYPE_UINT) ++ ++E("EditionFlagHidden", edition_flag_hidden, EBML_TYPE_UINT) ++ ++E("EditionFlagDefault", edition_flag_default, EBML_TYPE_UINT) ++ ++E("EditionFlagOrdered", edition_flag_ordered, EBML_TYPE_UINT) ++ ++E("ChapterUID", chapter_uid, EBML_TYPE_UINT) ++ ++E("ChapterTimeStart", chapter_time_start, EBML_TYPE_UINT) ++ ++E("ChapterTimeEnd", chapter_time_end, EBML_TYPE_UINT) ++ ++E("ChapterFlagHidden", chapter_flag_hidden, EBML_TYPE_UINT) ++ ++E("ChapterFlagEnabled", chapter_flag_enabled, EBML_TYPE_UINT) ++ ++E("ChapterSegmentUID", chapter_segment_uid, EBML_TYPE_BINARY) ++ ++E("ChapterSegmentEditionUID", chapter_segment_edition_uid, EBML_TYPE_UINT) ++ ++E("ChapString", chap_string, EBML_TYPE_STR) ++ ++E("ChapLanguage", chap_language, EBML_TYPE_STR) ++ ++E("ChapCountry", chap_country, EBML_TYPE_STR) ++ ++#define N chapter_display ++E_S("ChapterDisplay", 3) ++F(MATROSKA_ID_CHAPCOUNTRY, chap_country, 1) ++F(MATROSKA_ID_CHAPLANGUAGE, chap_language, 1) ++F(MATROSKA_ID_CHAPSTRING, chap_string, 0) ++}}; ++#undef N ++ ++#define N chapter_atom ++E_S("ChapterAtom", 8) ++F(MATROSKA_ID_CHAPTERDISPLAY, chapter_display, 1) ++F(MATROSKA_ID_CHAPTERFLAGENABLED, chapter_flag_enabled, 0) ++F(MATROSKA_ID_CHAPTERFLAGHIDDEN, chapter_flag_hidden, 0) ++F(MATROSKA_ID_CHAPTERSEGMENTEDITIONUID, chapter_segment_edition_uid, 0) ++F(MATROSKA_ID_CHAPTERSEGMENTUID, chapter_segment_uid, 0) ++F(MATROSKA_ID_CHAPTERTIMEEND, chapter_time_end, 0) ++F(MATROSKA_ID_CHAPTERTIMESTART, chapter_time_start, 0) ++F(MATROSKA_ID_CHAPTERUID, chapter_uid, 0) ++}}; ++#undef N ++ ++#define N edition_entry ++E_S("EditionEntry", 5) ++F(MATROSKA_ID_CHAPTERATOM, chapter_atom, 1) ++F(MATROSKA_ID_EDITIONFLAGDEFAULT, edition_flag_default, 0) ++F(MATROSKA_ID_EDITIONFLAGHIDDEN, edition_flag_hidden, 0) ++F(MATROSKA_ID_EDITIONFLAGORDERED, edition_flag_ordered, 0) ++F(MATROSKA_ID_EDITIONUID, edition_uid, 0) ++}}; ++#undef N ++ ++#define N chapters ++E_S("Chapters", 1) ++F(MATROSKA_ID_EDITIONENTRY, edition_entry, 1) ++}}; ++#undef N ++ ++E("TargetTypeValue", target_type_value, EBML_TYPE_UINT) ++ ++E("TargetTrackUID", target_track_uid, EBML_TYPE_UINT) ++ ++E("TargetEditionUID", target_edition_uid, EBML_TYPE_UINT) ++ ++E("TargetChapterUID", target_chapter_uid, EBML_TYPE_UINT) ++ ++E("TargetAttachmentUID", target_attachment_uid, EBML_TYPE_UINT) ++ ++#define N targets ++E_S("Targets", 5) ++F(MATROSKA_ID_TARGETATTACHMENTUID, target_attachment_uid, 0) ++F(MATROSKA_ID_TARGETCHAPTERUID, target_chapter_uid, 0) ++F(MATROSKA_ID_TARGETEDITIONUID, target_edition_uid, 0) ++F(MATROSKA_ID_TARGETTRACKUID, target_track_uid, 0) ++F(MATROSKA_ID_TARGETTYPEVALUE, target_type_value, 0) ++}}; ++#undef N ++ ++E("TagName", tag_name, EBML_TYPE_STR) ++ ++E("TagLanguage", tag_language, EBML_TYPE_STR) ++ ++E("TagString", tag_string, EBML_TYPE_STR) ++ ++#define N simple_tag ++E_S("SimpleTag", 3) ++F(MATROSKA_ID_TAGLANGUAGE, tag_language, 0) ++F(MATROSKA_ID_TAGNAME, tag_name, 0) ++F(MATROSKA_ID_TAGSTRING, tag_string, 0) ++}}; ++#undef N ++ ++#define N tag ++E_S("Tag", 2) ++F(MATROSKA_ID_SIMPLETAG, simple_tag, 1) ++F(MATROSKA_ID_TARGETS, targets, 0) ++}}; ++#undef N ++ ++#define N tags ++E_S("Tags", 1) ++F(MATROSKA_ID_TAG, tag, 1) ++}}; ++#undef N ++ ++#define N segment ++E_S("Segment", 8) ++F(MATROSKA_ID_ATTACHMENTS, attachments, 0) ++F(MATROSKA_ID_CHAPTERS, chapters, 0) ++F(MATROSKA_ID_CLUSTER, cluster, 1) ++F(MATROSKA_ID_CUES, cues, 0) ++F(MATROSKA_ID_INFO, info, 1) ++F(MATROSKA_ID_SEEKHEAD, seek_head, 1) ++F(MATROSKA_ID_TAGS, tags, 1) ++F(MATROSKA_ID_TRACKS, tracks, 1) ++}}; ++#undef N +diff --git a/demux/ebml_types.h b/demux/ebml_types.h +new file mode 100644 +index 000000000..4c61d77a0 +--- /dev/null ++++ b/demux/ebml_types.h +@@ -0,0 +1,587 @@ ++/* Generated by TOOLS/matroska.pl, do not edit manually */ ++ ++#define EBML_ID_EBMLVERSION 0x4286 ++#define EBML_ID_EBMLREADVERSION 0x42f7 ++#define EBML_ID_EBMLMAXIDLENGTH 0x42f2 ++#define EBML_ID_EBMLMAXSIZELENGTH 0x42f3 ++#define EBML_ID_DOCTYPE 0x4282 ++#define EBML_ID_DOCTYPEVERSION 0x4287 ++#define EBML_ID_DOCTYPEREADVERSION 0x4285 ++#define EBML_ID_EBML 0x1a45dfa3 ++#define EBML_ID_CRC32 0xbf ++#define EBML_ID_VOID 0xec ++#define MATROSKA_ID_SEEKID 0x53ab ++#define MATROSKA_ID_SEEKPOSITION 0x53ac ++#define MATROSKA_ID_SEEK 0x4dbb ++#define MATROSKA_ID_SEEKHEAD 0x114d9b74 ++#define MATROSKA_ID_SEGMENTUID 0x73a4 ++#define MATROSKA_ID_PREVUID 0x3cb923 ++#define MATROSKA_ID_NEXTUID 0x3eb923 ++#define MATROSKA_ID_TIMECODESCALE 0x2ad7b1 ++#define MATROSKA_ID_DATEUTC 0x4461 ++#define MATROSKA_ID_TITLE 0x7ba9 ++#define MATROSKA_ID_MUXINGAPP 0x4d80 ++#define MATROSKA_ID_WRITINGAPP 0x5741 ++#define MATROSKA_ID_DURATION 0x4489 ++#define MATROSKA_ID_INFO 0x1549a966 ++#define MATROSKA_ID_TIMECODE 0xe7 ++#define MATROSKA_ID_BLOCK 0xa1 ++#define MATROSKA_ID_BLOCKDURATION 0x9b ++#define MATROSKA_ID_REFERENCEBLOCK 0xfb ++#define MATROSKA_ID_DISCARDPADDING 0x75A2 ++#define MATROSKA_ID_BLOCKGROUP 0xa0 ++#define MATROSKA_ID_SIMPLEBLOCK 0xa3 ++#define MATROSKA_ID_CLUSTER 0x1f43b675 ++#define MATROSKA_ID_TRACKNUMBER 0xd7 ++#define MATROSKA_ID_TRACKUID 0x73c5 ++#define MATROSKA_ID_TRACKTYPE 0x83 ++#define MATROSKA_ID_FLAGENABLED 0xb9 ++#define MATROSKA_ID_FLAGDEFAULT 0x88 ++#define MATROSKA_ID_FLAGFORCED 0x55aa ++#define MATROSKA_ID_FLAGLACING 0x9c ++#define MATROSKA_ID_MINCACHE 0x6de7 ++#define MATROSKA_ID_MAXCACHE 0x6df8 ++#define MATROSKA_ID_DEFAULTDURATION 0x23e383 ++#define MATROSKA_ID_TRACKTIMECODESCALE 0x23314f ++#define MATROSKA_ID_MAXBLOCKADDITIONID 0x55ee ++#define MATROSKA_ID_NAME 0x536e ++#define MATROSKA_ID_LANGUAGE 0x22b59c ++#define MATROSKA_ID_CODECID 0x86 ++#define MATROSKA_ID_CODECPRIVATE 0x63a2 ++#define MATROSKA_ID_CODECNAME 0x258688 ++#define MATROSKA_ID_CODECDECODEALL 0xaa ++#define MATROSKA_ID_CODECDELAY 0x56AA ++#define MATROSKA_ID_SEEKPREROLL 0x56BB ++#define MATROSKA_ID_FLAGINTERLACED 0x9a ++#define MATROSKA_ID_PIXELWIDTH 0xb0 ++#define MATROSKA_ID_PIXELHEIGHT 0xba ++#define MATROSKA_ID_DISPLAYWIDTH 0x54b0 ++#define MATROSKA_ID_DISPLAYHEIGHT 0x54ba ++#define MATROSKA_ID_DISPLAYUNIT 0x54b2 ++#define MATROSKA_ID_FRAMERATE 0x2383e3 ++#define MATROSKA_ID_COLOURSPACE 0x2eb524 ++#define MATROSKA_ID_STEREOMODE 0x53b8 ++#define MATROSKA_ID_MATRIXCOEFFICIENTS 0x55B1 ++#define MATROSKA_ID_BITSPERCHANNEL 0x55B2 ++#define MATROSKA_ID_CHROMASUBSAMPLINGHORZ 0x55B3 ++#define MATROSKA_ID_CHROMASUBSAMPLINGVERT 0x55B4 ++#define MATROSKA_ID_CBSUBSAMPLINGHORZ 0x55B5 ++#define MATROSKA_ID_CBSUBSAMPLINGVERT 0x55B6 ++#define MATROSKA_ID_CHROMASITINGHORZ 0x55B7 ++#define MATROSKA_ID_CHROMASITINGVERT 0x55B8 ++#define MATROSKA_ID_RANGE 0x55B9 ++#define MATROSKA_ID_TRANSFERCHARACTERISTICS 0x55BA ++#define MATROSKA_ID_PRIMARIES 0x55BB ++#define MATROSKA_ID_MAXCLL 0x55BC ++#define MATROSKA_ID_MAXFALL 0x55BD ++#define MATROSKA_ID_PRIMARYRCHROMATICITYX 0x55D1 ++#define MATROSKA_ID_PRIMARYRCHROMATICITYY 0x55D2 ++#define MATROSKA_ID_PRIMARYGCHROMATICITYX 0x55D3 ++#define MATROSKA_ID_PRIMARYGCHROMATICITYY 0x55D4 ++#define MATROSKA_ID_PRIMARYBCHROMATICITYX 0x55D5 ++#define MATROSKA_ID_PRIMARYBCHROMATICITYY 0x55D6 ++#define MATROSKA_ID_WHITEPOINTCHROMATICITYX 0x55D7 ++#define MATROSKA_ID_WHITEPOINTCHROMATICITYY 0x55D8 ++#define MATROSKA_ID_LUMINANCEMAX 0x55D9 ++#define MATROSKA_ID_LUMINANCEMIN 0x55DA ++#define MATROSKA_ID_MASTERINGMETADATA 0x55D0 ++#define MATROSKA_ID_COLOUR 0x55B0 ++#define MATROSKA_ID_VIDEO 0xe0 ++#define MATROSKA_ID_SAMPLINGFREQUENCY 0xb5 ++#define MATROSKA_ID_OUTPUTSAMPLINGFREQUENCY 0x78b5 ++#define MATROSKA_ID_CHANNELS 0x9f ++#define MATROSKA_ID_BITDEPTH 0x6264 ++#define MATROSKA_ID_AUDIO 0xe1 ++#define MATROSKA_ID_CONTENTENCODINGORDER 0x5031 ++#define MATROSKA_ID_CONTENTENCODINGSCOPE 0x5032 ++#define MATROSKA_ID_CONTENTENCODINGTYPE 0x5033 ++#define MATROSKA_ID_CONTENTCOMPALGO 0x4254 ++#define MATROSKA_ID_CONTENTCOMPSETTINGS 0x4255 ++#define MATROSKA_ID_CONTENTCOMPRESSION 0x5034 ++#define MATROSKA_ID_CONTENTENCODING 0x6240 ++#define MATROSKA_ID_CONTENTENCODINGS 0x6d80 ++#define MATROSKA_ID_TRACKENTRY 0xae ++#define MATROSKA_ID_TRACKS 0x1654ae6b ++#define MATROSKA_ID_CUETIME 0xb3 ++#define MATROSKA_ID_CUETRACK 0xf7 ++#define MATROSKA_ID_CUECLUSTERPOSITION 0xf1 ++#define MATROSKA_ID_CUERELATIVEPOSITION 0xf0 ++#define MATROSKA_ID_CUEDURATION 0xb2 ++#define MATROSKA_ID_CUETRACKPOSITIONS 0xb7 ++#define MATROSKA_ID_CUEPOINT 0xbb ++#define MATROSKA_ID_CUES 0x1c53bb6b ++#define MATROSKA_ID_FILEDESCRIPTION 0x467e ++#define MATROSKA_ID_FILENAME 0x466e ++#define MATROSKA_ID_FILEMIMETYPE 0x4660 ++#define MATROSKA_ID_FILEDATA 0x465c ++#define MATROSKA_ID_FILEUID 0x46ae ++#define MATROSKA_ID_ATTACHEDFILE 0x61a7 ++#define MATROSKA_ID_ATTACHMENTS 0x1941a469 ++#define MATROSKA_ID_EDITIONUID 0x45bc ++#define MATROSKA_ID_EDITIONFLAGHIDDEN 0x45bd ++#define MATROSKA_ID_EDITIONFLAGDEFAULT 0x45db ++#define MATROSKA_ID_EDITIONFLAGORDERED 0x45dd ++#define MATROSKA_ID_CHAPTERUID 0x73c4 ++#define MATROSKA_ID_CHAPTERTIMESTART 0x91 ++#define MATROSKA_ID_CHAPTERTIMEEND 0x92 ++#define MATROSKA_ID_CHAPTERFLAGHIDDEN 0x98 ++#define MATROSKA_ID_CHAPTERFLAGENABLED 0x4598 ++#define MATROSKA_ID_CHAPTERSEGMENTUID 0x6e67 ++#define MATROSKA_ID_CHAPTERSEGMENTEDITIONUID 0x6ebc ++#define MATROSKA_ID_CHAPSTRING 0x85 ++#define MATROSKA_ID_CHAPLANGUAGE 0x437c ++#define MATROSKA_ID_CHAPCOUNTRY 0x437e ++#define MATROSKA_ID_CHAPTERDISPLAY 0x80 ++#define MATROSKA_ID_CHAPTERATOM 0xb6 ++#define MATROSKA_ID_EDITIONENTRY 0x45b9 ++#define MATROSKA_ID_CHAPTERS 0x1043a770 ++#define MATROSKA_ID_TARGETTYPEVALUE 0x68ca ++#define MATROSKA_ID_TARGETTRACKUID 0x63c5 ++#define MATROSKA_ID_TARGETEDITIONUID 0x63c9 ++#define MATROSKA_ID_TARGETCHAPTERUID 0x63c4 ++#define MATROSKA_ID_TARGETATTACHMENTUID 0x63c6 ++#define MATROSKA_ID_TARGETS 0x63c0 ++#define MATROSKA_ID_TAGNAME 0x45a3 ++#define MATROSKA_ID_TAGLANGUAGE 0x447a ++#define MATROSKA_ID_TAGSTRING 0x4487 ++#define MATROSKA_ID_SIMPLETAG 0x67c8 ++#define MATROSKA_ID_TAG 0x7373 ++#define MATROSKA_ID_TAGS 0x1254c367 ++#define MATROSKA_ID_SEGMENT 0x18538067 ++ ++ ++struct ebml_ebml { ++ char * doc_type; ++ uint64_t doc_type_read_version; ++ uint64_t doc_type_version; ++ uint64_t ebml_max_id_length; ++ uint64_t ebml_max_size_length; ++ uint64_t ebml_read_version; ++ uint64_t ebml_version; ++ ++ int n_ebml_version; ++ int n_ebml_max_id_length; ++ int n_ebml_max_size_length; ++ int n_doc_type; ++ int n_doc_type_version; ++ int n_doc_type_read_version; ++ int n_ebml_read_version; ++}; ++ ++struct ebml_seek { ++ uint32_t seek_id; ++ uint64_t seek_position; ++ ++ int n_seek_position; ++ int n_seek_id; ++}; ++ ++struct ebml_seek_head { ++ struct ebml_seek *seek; ++ ++ int n_seek; ++}; ++ ++struct ebml_info { ++ int64_t date_utc; ++ double duration; ++ char * muxing_app; ++ struct bstr next_uid; ++ struct bstr prev_uid; ++ struct bstr segment_uid; ++ uint64_t timecode_scale; ++ char * title; ++ char * writing_app; ++ ++ int n_segment_uid; ++ int n_prev_uid; ++ int n_next_uid; ++ int n_timecode_scale; ++ int n_date_utc; ++ int n_title; ++ int n_muxing_app; ++ int n_writing_app; ++ int n_duration; ++}; ++ ++struct ebml_block_group { ++ struct bstr block; ++ uint64_t block_duration; ++ int64_t discard_padding; ++ int64_t *reference_block; ++ ++ int n_block; ++ int n_block_duration; ++ int n_reference_block; ++ int n_discard_padding; ++}; ++ ++struct ebml_cluster { ++ struct ebml_block_group *block_group; ++ struct bstr *simple_block; ++ uint64_t timecode; ++ ++ int n_timecode; ++ int n_block_group; ++ int n_simple_block; ++}; ++ ++struct ebml_mastering_metadata { ++ double luminance_max; ++ double luminance_min; ++ double primary_b_chromaticity_x; ++ double primary_b_chromaticity_y; ++ double primary_g_chromaticity_x; ++ double primary_g_chromaticity_y; ++ double primary_r_chromaticity_x; ++ double primary_r_chromaticity_y; ++ double white_point_chromaticity_x; ++ double white_point_chromaticity_y; ++ ++ int n_primary_r_chromaticity_x; ++ int n_primary_r_chromaticity_y; ++ int n_primary_g_chromaticity_x; ++ int n_primary_g_chromaticity_y; ++ int n_primary_b_chromaticity_x; ++ int n_primary_b_chromaticity_y; ++ int n_white_point_chromaticity_x; ++ int n_white_point_chromaticity_y; ++ int n_luminance_max; ++ int n_luminance_min; ++}; ++ ++struct ebml_colour { ++ uint64_t bits_per_channel; ++ uint64_t cb_subsampling_horz; ++ uint64_t cb_subsampling_vert; ++ uint64_t chroma_siting_horz; ++ uint64_t chroma_siting_vert; ++ uint64_t chroma_subsampling_horz; ++ uint64_t chroma_subsampling_vert; ++ struct ebml_mastering_metadata mastering_metadata; ++ uint64_t matrix_coefficients; ++ uint64_t max_cll; ++ uint64_t max_fall; ++ uint64_t primaries; ++ uint64_t range; ++ uint64_t transfer_characteristics; ++ ++ int n_matrix_coefficients; ++ int n_bits_per_channel; ++ int n_chroma_subsampling_horz; ++ int n_chroma_subsampling_vert; ++ int n_cb_subsampling_horz; ++ int n_cb_subsampling_vert; ++ int n_chroma_siting_horz; ++ int n_chroma_siting_vert; ++ int n_range; ++ int n_transfer_characteristics; ++ int n_primaries; ++ int n_max_cll; ++ int n_max_fall; ++ int n_mastering_metadata; ++}; ++ ++struct ebml_video { ++ struct ebml_colour colour; ++ struct bstr colour_space; ++ uint64_t display_height; ++ uint64_t display_unit; ++ uint64_t display_width; ++ uint64_t flag_interlaced; ++ double frame_rate; ++ uint64_t pixel_height; ++ uint64_t pixel_width; ++ uint64_t stereo_mode; ++ ++ int n_flag_interlaced; ++ int n_pixel_width; ++ int n_pixel_height; ++ int n_display_width; ++ int n_display_height; ++ int n_display_unit; ++ int n_frame_rate; ++ int n_colour_space; ++ int n_stereo_mode; ++ int n_colour; ++}; ++ ++struct ebml_audio { ++ uint64_t bit_depth; ++ uint64_t channels; ++ double output_sampling_frequency; ++ double sampling_frequency; ++ ++ int n_sampling_frequency; ++ int n_output_sampling_frequency; ++ int n_channels; ++ int n_bit_depth; ++}; ++ ++struct ebml_content_compression { ++ uint64_t content_comp_algo; ++ struct bstr content_comp_settings; ++ ++ int n_content_comp_algo; ++ int n_content_comp_settings; ++}; ++ ++struct ebml_content_encoding { ++ struct ebml_content_compression content_compression; ++ uint64_t content_encoding_order; ++ uint64_t content_encoding_scope; ++ uint64_t content_encoding_type; ++ ++ int n_content_encoding_order; ++ int n_content_encoding_scope; ++ int n_content_encoding_type; ++ int n_content_compression; ++}; ++ ++struct ebml_content_encodings { ++ struct ebml_content_encoding *content_encoding; ++ ++ int n_content_encoding; ++}; ++ ++struct ebml_track_entry { ++ struct ebml_audio audio; ++ uint64_t codec_decode_all; ++ uint64_t codec_delay; ++ char * codec_id; ++ char * codec_name; ++ struct bstr codec_private; ++ struct ebml_content_encodings content_encodings; ++ uint64_t default_duration; ++ uint64_t flag_default; ++ uint64_t flag_enabled; ++ uint64_t flag_forced; ++ uint64_t flag_lacing; ++ char * language; ++ uint64_t max_block_addition_id; ++ uint64_t max_cache; ++ uint64_t min_cache; ++ char * name; ++ uint64_t seek_pre_roll; ++ uint64_t track_number; ++ double track_timecode_scale; ++ uint64_t track_type; ++ uint64_t track_uid; ++ struct ebml_video video; ++ ++ int n_track_number; ++ int n_track_uid; ++ int n_track_type; ++ int n_flag_enabled; ++ int n_flag_default; ++ int n_flag_forced; ++ int n_flag_lacing; ++ int n_min_cache; ++ int n_max_cache; ++ int n_default_duration; ++ int n_track_timecode_scale; ++ int n_max_block_addition_id; ++ int n_name; ++ int n_language; ++ int n_codec_id; ++ int n_codec_private; ++ int n_codec_name; ++ int n_codec_decode_all; ++ int n_codec_delay; ++ int n_seek_pre_roll; ++ int n_video; ++ int n_audio; ++ int n_content_encodings; ++}; ++ ++struct ebml_tracks { ++ struct ebml_track_entry *track_entry; ++ ++ int n_track_entry; ++}; ++ ++struct ebml_cue_track_positions { ++ uint64_t cue_cluster_position; ++ uint64_t cue_duration; ++ uint64_t cue_relative_position; ++ uint64_t cue_track; ++ ++ int n_cue_track; ++ int n_cue_cluster_position; ++ int n_cue_relative_position; ++ int n_cue_duration; ++}; ++ ++struct ebml_cue_point { ++ uint64_t cue_time; ++ struct ebml_cue_track_positions *cue_track_positions; ++ ++ int n_cue_time; ++ int n_cue_track_positions; ++}; ++ ++struct ebml_cues { ++ struct ebml_cue_point *cue_point; ++ ++ int n_cue_point; ++}; ++ ++struct ebml_attached_file { ++ struct bstr file_data; ++ char * file_description; ++ char * file_mime_type; ++ char * file_name; ++ uint64_t file_uid; ++ ++ int n_file_description; ++ int n_file_name; ++ int n_file_mime_type; ++ int n_file_data; ++ int n_file_uid; ++}; ++ ++struct ebml_attachments { ++ struct ebml_attached_file *attached_file; ++ ++ int n_attached_file; ++}; ++ ++struct ebml_chapter_display { ++ char * *chap_country; ++ char * *chap_language; ++ char * chap_string; ++ ++ int n_chap_string; ++ int n_chap_language; ++ int n_chap_country; ++}; ++ ++struct ebml_chapter_atom { ++ struct ebml_chapter_display *chapter_display; ++ uint64_t chapter_flag_enabled; ++ uint64_t chapter_flag_hidden; ++ uint64_t chapter_segment_edition_uid; ++ struct bstr chapter_segment_uid; ++ uint64_t chapter_time_end; ++ uint64_t chapter_time_start; ++ uint64_t chapter_uid; ++ ++ int n_chapter_uid; ++ int n_chapter_time_start; ++ int n_chapter_time_end; ++ int n_chapter_flag_hidden; ++ int n_chapter_flag_enabled; ++ int n_chapter_segment_uid; ++ int n_chapter_segment_edition_uid; ++ int n_chapter_display; ++}; ++ ++struct ebml_edition_entry { ++ struct ebml_chapter_atom *chapter_atom; ++ uint64_t edition_flag_default; ++ uint64_t edition_flag_hidden; ++ uint64_t edition_flag_ordered; ++ uint64_t edition_uid; ++ ++ int n_edition_uid; ++ int n_edition_flag_hidden; ++ int n_edition_flag_default; ++ int n_edition_flag_ordered; ++ int n_chapter_atom; ++}; ++ ++struct ebml_chapters { ++ struct ebml_edition_entry *edition_entry; ++ ++ int n_edition_entry; ++}; ++ ++struct ebml_targets { ++ uint64_t target_attachment_uid; ++ uint64_t target_chapter_uid; ++ uint64_t target_edition_uid; ++ uint64_t target_track_uid; ++ uint64_t target_type_value; ++ ++ int n_target_type_value; ++ int n_target_track_uid; ++ int n_target_edition_uid; ++ int n_target_chapter_uid; ++ int n_target_attachment_uid; ++}; ++ ++struct ebml_simple_tag { ++ char * tag_language; ++ char * tag_name; ++ char * tag_string; ++ ++ int n_tag_name; ++ int n_tag_language; ++ int n_tag_string; ++}; ++ ++struct ebml_tag { ++ struct ebml_simple_tag *simple_tag; ++ struct ebml_targets targets; ++ ++ int n_targets; ++ int n_simple_tag; ++}; ++ ++struct ebml_tags { ++ struct ebml_tag *tag; ++ ++ int n_tag; ++}; ++ ++struct ebml_segment { ++ struct ebml_attachments attachments; ++ struct ebml_chapters chapters; ++ struct ebml_cluster *cluster; ++ struct ebml_cues cues; ++ struct ebml_info *info; ++ struct ebml_seek_head *seek_head; ++ struct ebml_tags *tags; ++ struct ebml_tracks *tracks; ++ ++ int n_seek_head; ++ int n_info; ++ int n_cluster; ++ int n_tracks; ++ int n_cues; ++ int n_attachments; ++ int n_chapters; ++ int n_tags; ++}; ++ ++extern const struct ebml_elem_desc ebml_ebml_desc; ++extern const struct ebml_elem_desc ebml_seek_desc; ++extern const struct ebml_elem_desc ebml_seek_head_desc; ++extern const struct ebml_elem_desc ebml_info_desc; ++extern const struct ebml_elem_desc ebml_block_group_desc; ++extern const struct ebml_elem_desc ebml_cluster_desc; ++extern const struct ebml_elem_desc ebml_mastering_metadata_desc; ++extern const struct ebml_elem_desc ebml_colour_desc; ++extern const struct ebml_elem_desc ebml_video_desc; ++extern const struct ebml_elem_desc ebml_audio_desc; ++extern const struct ebml_elem_desc ebml_content_compression_desc; ++extern const struct ebml_elem_desc ebml_content_encoding_desc; ++extern const struct ebml_elem_desc ebml_content_encodings_desc; ++extern const struct ebml_elem_desc ebml_track_entry_desc; ++extern const struct ebml_elem_desc ebml_tracks_desc; ++extern const struct ebml_elem_desc ebml_cue_track_positions_desc; ++extern const struct ebml_elem_desc ebml_cue_point_desc; ++extern const struct ebml_elem_desc ebml_cues_desc; ++extern const struct ebml_elem_desc ebml_attached_file_desc; ++extern const struct ebml_elem_desc ebml_attachments_desc; ++extern const struct ebml_elem_desc ebml_chapter_display_desc; ++extern const struct ebml_elem_desc ebml_chapter_atom_desc; ++extern const struct ebml_elem_desc ebml_edition_entry_desc; ++extern const struct ebml_elem_desc ebml_chapters_desc; ++extern const struct ebml_elem_desc ebml_targets_desc; ++extern const struct ebml_elem_desc ebml_simple_tag_desc; ++extern const struct ebml_elem_desc ebml_tag_desc; ++extern const struct ebml_elem_desc ebml_tags_desc; ++extern const struct ebml_elem_desc ebml_segment_desc; ++ ++#define MAX_EBML_SUBELEMENTS 23 +-- +2.11.0 + diff --git a/pkg/mpv/patch/0003-Add-generated-man-page.patch b/pkg/mpv/patch/0003-Add-generated-man-page.patch new file mode 100644 index 00000000..5c95cc05 --- /dev/null +++ b/pkg/mpv/patch/0003-Add-generated-man-page.patch @@ -0,0 +1,14159 @@ +From 85c80cb0f48c4d51dd5192b79c543a4b8fd863ec Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Sat, 2 Jul 2016 21:08:15 -0700 +Subject: [PATCH] Add generated man page + +This requires python and rst2man to generate. + +$ rst2man.py DOCS/man/mpv.rst DOCS/man/mpv.1 +--- + DOCS/man/mpv.1 | 14137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 14137 insertions(+) + create mode 100644 DOCS/man/mpv.1 + +diff --git a/DOCS/man/mpv.1 b/DOCS/man/mpv.1 +new file mode 100644 +index 000000000..c411fc606 +--- /dev/null ++++ b/DOCS/man/mpv.1 +@@ -0,0 +1,14137 @@ ++.\" Man page generated from reStructuredText. ++. ++.TH MPV 1 "" "" "multimedia" ++.SH NAME ++mpv \- a media player ++. ++.nr rst2man-indent-level 0 ++. ++.de1 rstReportMargin ++\\$1 \\n[an-margin] ++level \\n[rst2man-indent-level] ++level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] ++- ++\\n[rst2man-indent0] ++\\n[rst2man-indent1] ++\\n[rst2man-indent2] ++.. ++.de1 INDENT ++.\" .rstReportMargin pre: ++. RS \\$1 ++. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] ++. nr rst2man-indent-level +1 ++.\" .rstReportMargin post: ++.. ++.de UNINDENT ++. RE ++.\" indent \\n[an-margin] ++.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] ++.nr rst2man-indent-level -1 ++.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] ++.in \\n[rst2man-indent\\n[rst2man-indent-level]]u ++.. ++.SH SYNOPSIS ++.nf ++\fBmpv\fP [options] [file|URL|PLAYLIST|\-] ++\fBmpv\fP [options] files ++.fi ++.sp ++.SH DESCRIPTION ++.sp ++\fBmpv\fP is a media player based on MPlayer and mplayer2. It supports a wide variety of video ++file formats, audio and video codecs, and subtitle types. Special input URL ++types are available to read input from a variety of sources other than disk ++files. Depending on platform, a variety of different video and audio output ++methods are supported. ++.sp ++Usage examples to get you started quickly can be found at the end of this man ++page. ++.SH INTERACTIVE CONTROL ++.sp ++mpv has a fully configurable, command\-driven control layer which allows you ++to control mpv using keyboard, mouse, or remote control (there is no ++LIRC support \- configure remotes as input devices instead). ++.sp ++See the \fB\-\-input\-\fP options for ways to customize it. ++.sp ++The following listings are not necessarily complete. See \fBetc/input.conf\fP for ++a list of default bindings. User \fBinput.conf\fP files and Lua scripts can ++define additional key bindings. ++.SS Keyboard Control ++.INDENT 0.0 ++.TP ++.B LEFT and RIGHT ++Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek ++(see \fB\-\-hr\-seek\fP). ++.TP ++.B UP and DOWN ++Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see ++\fB\-\-hr\-seek\fP). ++.TP ++.B Ctrl+LEFT and Ctrl+RIGHT ++Seek to the previous/next subtitle. Subject to some restrictions and ++might not always work; see \fBsub\-seek\fP command. ++.TP ++.B [ and ] ++Decrease/increase current playback speed by 10%. ++.TP ++.B { and } ++Halve/double current playback speed. ++.TP ++.B BACKSPACE ++Reset playback speed to normal. ++.TP ++.B < and > ++Go backward/forward in the playlist. ++.TP ++.B ENTER ++Go forward in the playlist. ++.TP ++.B p / SPACE ++Pause (pressing again unpauses). ++.TP ++.B \&. ++Step forward. Pressing once will pause, every consecutive press will ++play one frame and then go into pause mode again. ++.UNINDENT ++.INDENT 0.0 ++.TP ++.B , ++Step backward. Pressing once will pause, every consecutive press will ++play one frame in reverse and then go into pause mode again. ++.TP ++.B q ++Stop playing and quit. ++.TP ++.B Q ++Like \fBq\fP, but store the current playback position. Playing the same file ++later will resume at the old playback position if possible. ++.TP ++.B / and * ++Decrease/increase volume. ++.TP ++.B 9 and 0 ++Decrease/increase volume. ++.TP ++.B m ++Mute sound. ++.TP ++.B _ ++Cycle through the available video tracks. ++.TP ++.B # ++Cycle through the available audio tracks. ++.TP ++.B f ++Toggle fullscreen (see also \fB\-\-fs\fP). ++.TP ++.B ESC ++Exit fullscreen mode. ++.TP ++.B T ++Toggle stay\-on\-top (see also \fB\-\-ontop\fP). ++.TP ++.B w and e ++Decrease/increase pan\-and\-scan range. ++.TP ++.B o (also P) ++Show progression bar, elapsed time and total duration on the OSD. ++.TP ++.B O ++Toggle OSD states between normal and playback time/duration. ++.TP ++.B v ++Toggle subtitle visibility. ++.TP ++.B j and J ++Cycle through the available subtitles. ++.TP ++.B x and z ++Adjust subtitle delay by +/\- 0.1 seconds. ++.TP ++.B l ++Set/clear A\-B loop points. See \fBab\-loop\fP command for details. ++.TP ++.B L ++Toggle infinite looping. ++.TP ++.B Ctrl + and Ctrl \- ++Adjust audio delay by +/\- 0.1 seconds. ++.TP ++.B u ++Switch between applying no style overrides to SSA/ASS subtitles, and ++overriding them almost completely with the normal subtitle style. See ++\fB\-\-sub\-ass\-style\-override\fP for more info. ++.TP ++.B V ++Toggle subtitle VSFilter aspect compatibility mode. See ++\fB\-\-sub\-ass\-vsfilter\-aspect\-compat\fP for more info. ++.TP ++.B r and t ++Move subtitles up/down. ++.TP ++.B s ++Take a screenshot. ++.TP ++.B S ++Take a screenshot, without subtitles. (Whether this works depends on VO ++driver support.) ++.TP ++.B Ctrl s ++Take a screenshot, as the window shows it (with subtitles, OSD, and scaled ++video). ++.TP ++.B I ++Show filename on the OSD. ++.TP ++.B PGUP and PGDWN ++Seek to the beginning of the previous/next chapter. In most cases, ++"previous" will actually go to the beginning of the current chapter; see ++\fB\-\-chapter\-seek\-threshold\fP\&. ++.TP ++.B Shift+PGUP and Shift+PGDWN ++Seek backward or forward by 10 minutes. (This used to be mapped to ++PGUP/PGDWN without Shift.) ++.TP ++.B d ++Activate/deactivate deinterlacer. ++.TP ++.B A ++Cycle aspect ratio override. ++.UNINDENT ++.sp ++(The following keys are valid only when using a video output that supports the ++corresponding adjustment, or the software equalizer (\fB\-\-vf=eq\fP).) ++.INDENT 0.0 ++.TP ++.B 1 and 2 ++Adjust contrast. ++.TP ++.B 3 and 4 ++Adjust brightness. ++.TP ++.B 5 and 6 ++Adjust gamma. ++.TP ++.B 7 and 8 ++Adjust saturation. ++.TP ++.B Alt+0 (and command+0 on OSX) ++Resize video window to half its original size. ++.TP ++.B Alt+1 (and command+1 on OSX) ++Resize video window to its original size. ++.TP ++.B Alt+2 (and command+2 on OSX) ++Resize video window to double its original size. ++.TP ++.B command + f (OSX only) ++Toggle fullscreen (see also \fB\-\-fs\fP). ++.TP ++.B command + [ and command + ] (OSX only) ++Set video window alpha. ++.UNINDENT ++.sp ++(The following keys are valid if you have a keyboard with multimedia keys.) ++.INDENT 0.0 ++.TP ++.B PAUSE ++Pause. ++.TP ++.B STOP ++Stop playing and quit. ++.TP ++.B PREVIOUS and NEXT ++Seek backward/forward 1 minute. ++.UNINDENT ++.sp ++(The following keys are only valid if you compiled with TV or DVB input ++support.) ++.INDENT 0.0 ++.TP ++.B h and k ++Select previous/next tv\-channel. ++.TP ++.B H and K ++Select previous/next dvb\-channel. ++.UNINDENT ++.SS Mouse Control ++.INDENT 0.0 ++.TP ++.B button 3 and button 4 ++Seek backward/forward 1 minute. ++.TP ++.B button 5 and button 6 ++Decrease/increase volume. ++.UNINDENT ++.SH USAGE ++.sp ++Every \fIflag\fP option has a \fIno\-flag\fP counterpart, e.g. the opposite of the ++\fB\-\-fs\fP option is \fB\-\-no\-fs\fP\&. \fB\-\-fs=yes\fP is same as \fB\-\-fs\fP, \fB\-\-fs=no\fP ++is the same as \fB\-\-no\-fs\fP\&. ++.sp ++If an option is marked as \fI(XXX only)\fP, it will only work in combination with ++the \fIXXX\fP option or if \fIXXX\fP is compiled in. ++.SS Escaping spaces and other special characters ++.sp ++Keep in mind that the shell will partially parse and mangle the arguments you ++pass to mpv. For example, you might need to quote or escape options and ++filenames: ++.INDENT 0.0 ++.INDENT 3.5 ++\fBmpv "filename with spaces.mkv" \-\-title="window title"\fP ++.UNINDENT ++.UNINDENT ++.sp ++It gets more complicated if the suboption parser is involved. The suboption ++parser puts several options into a single string, and passes them to a ++component at once, instead of using multiple options on the level of the ++command line. ++.sp ++The suboption parser can quote strings with \fB"\fP and \fB[...]\fP\&. ++Additionally, there is a special form of quoting with \fB%n%\fP described below. ++.sp ++For example, assume the hypothetical \fBfoo\fP filter can take multiple options: ++.INDENT 0.0 ++.INDENT 3.5 ++\fBmpv test.mkv \-\-vf=foo:option1=value1:option2:option3=value3,bar\fP ++.UNINDENT ++.UNINDENT ++.sp ++This passes \fBoption1\fP and \fBoption3\fP to the \fBfoo\fP filter, with \fBoption2\fP ++as flag (implicitly \fBoption2=yes\fP), and adds a \fBbar\fP filter after that. If ++an option contains spaces or characters like \fB,\fP or \fB:\fP, you need to quote ++them: ++.INDENT 0.0 ++.INDENT 3.5 ++\fBmpv \(aq\-\-vf=foo:option1="option value with spaces",bar\(aq\fP ++.UNINDENT ++.UNINDENT ++.sp ++Shells may actually strip some quotes from the string passed to the commandline, ++so the example quotes the string twice, ensuring that mpv receives the \fB"\fP ++quotes. ++.sp ++The \fB[...]\fP form of quotes wraps everything between \fB[\fP and \fB]\fP\&. It\(aqs ++useful with shells that don\(aqt interpret these characters in the middle of ++an argument (like bash). These quotes are balanced (since mpv 0.9.0): the \fB[\fP ++and \fB]\fP nest, and the quote terminates on the last \fB]\fP that has no matching ++\fB[\fP within the string. (For example, \fB[a[b]c]\fP results in \fBa[b]c\fP\&.) ++.sp ++The fixed\-length quoting syntax is intended for use with external ++scripts and programs. ++.sp ++It is started with \fB%\fP and has the following format: ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++%n%string_of_length_n ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.INDENT 0.0 ++.INDENT 3.5 ++.IP "Examples" ++.sp ++\fBmpv \(aq\-\-vf=foo:option1=%11%quoted text\(aq test.avi\fP ++.sp ++Or in a script: ++.sp ++\fBmpv \-\-vf=foo:option1=%\(gaexpr length "$NAME"\(ga%"$NAME" test.avi\fP ++.UNINDENT ++.UNINDENT ++.sp ++Suboptions passed to the client API are also subject to escaping. Using ++\fBmpv_set_option_string()\fP is exactly like passing \fB\-\-name=data\fP to the ++command line (but without shell processing of the string). Some options ++support passing values in a more structured way instead of flat strings, and ++can avoid the suboption parsing mess. For example, \fB\-\-vf\fP supports ++\fBMPV_FORMAT_NODE\fP, which lets you pass suboptions as a nested data structure ++of maps and arrays. ++.SS Paths ++.sp ++Some care must be taken when passing arbitrary paths and filenames to mpv. For ++example, paths starting with \fB\-\fP will be interpreted as options. Likewise, ++if a path contains the sequence \fB://\fP, the string before that might be ++interpreted as protocol prefix, even though \fB://\fP can be part of a legal ++UNIX path. To avoid problems with arbitrary paths, you should be sure that ++absolute paths passed to mpv start with \fB/\fP, and prefix relative paths with ++\fB\&./\fP\&. ++.sp ++Using the \fBfile://\fP pseudo\-protocol is discouraged, because it involves ++strange URL unescaping rules. ++.sp ++The name \fB\-\fP itself is interpreted as stdin, and will cause mpv to disable ++console controls. (Which makes it suitable for playing data piped to stdin.) ++.sp ++The special argument \fB\-\-\fP can be used to stop mpv from interpreting the ++following arguments as options. ++.sp ++When using the client API, you should strictly avoid using \fBmpv_command_string\fP ++for invoking the \fBloadfile\fP command, and instead prefer e.g. \fBmpv_command\fP ++to avoid the need for filename escaping. ++.sp ++For paths passed to suboptions, the situation is further complicated by the ++need to escape special characters. To work this around, the path can be ++additionally wrapped in the fixed\-length syntax, e.g. \fB%n%string_of_length_n\fP ++(see above). ++.sp ++Some mpv options interpret paths starting with \fB~\fP\&. Currently, the prefix ++\fB~~/\fP expands to the mpv configuration directory (usually \fB~/.config/mpv/\fP). ++\fB~/\fP expands to the user\(aqs home directory. (The trailing \fB/\fP is always ++required.) There are the following paths as well: ++.TS ++center; ++|l|l|. ++_ ++T{ ++Name ++T} T{ ++Meaning ++T} ++_ ++T{ ++\fB~~home/\fP ++T} T{ ++same as \fB~~/\fP ++T} ++_ ++T{ ++\fB~~global/\fP ++T} T{ ++the global config path, if available (not on win32) ++T} ++_ ++T{ ++\fB~~osxbundle/\fP ++T} T{ ++the OSX bundle resource path (OSX only) ++T} ++_ ++T{ ++\fB~~desktop/\fP ++T} T{ ++the path to the desktop (win32, OSX) ++T} ++_ ++.TE ++.SS Per\-File Options ++.sp ++When playing multiple files, any option given on the command line usually ++affects all files. Example: ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++mpv \-\-a file1.mkv \-\-b file2.mkv \-\-c ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.TS ++center; ++|l|l|. ++_ ++T{ ++File ++T} T{ ++Active options ++T} ++_ ++T{ ++file1.mkv ++T} T{ ++\fB\-\-a \-\-b \-\-c\fP ++T} ++_ ++T{ ++file2.mkv ++T} T{ ++\fB\-\-a \-\-b \-\-c\fP ++T} ++_ ++.TE ++.sp ++(This is different from MPlayer and mplayer2.) ++.sp ++Also, if any option is changed at runtime (via input commands), they are not ++reset when a new file is played. ++.sp ++Sometimes, it is useful to change options per\-file. This can be achieved by ++adding the special per\-file markers \fB\-\-{\fP and \fB\-\-}\fP\&. (Note that you must ++escape these on some shells.) Example: ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++mpv \-\-a file1.mkv \-\-b \-\-\e{ \-\-c file2.mkv \-\-d file3.mkv \-\-e \-\-\e} file4.mkv \-\-f ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.TS ++center; ++|l|l|. ++_ ++T{ ++File ++T} T{ ++Active options ++T} ++_ ++T{ ++file1.mkv ++T} T{ ++\fB\-\-a \-\-b \-\-f\fP ++T} ++_ ++T{ ++file2.mkv ++T} T{ ++\fB\-\-a \-\-b \-\-f \-\-c \-\-d \-\-e\fP ++T} ++_ ++T{ ++file3.mkv ++T} T{ ++\fB\-\-a \-\-b \-\-f \-\-c \-\-d \-\-e\fP ++T} ++_ ++T{ ++file4.mkv ++T} T{ ++\fB\-\-a \-\-b \-\-f\fP ++T} ++_ ++.TE ++.sp ++Additionally, any file\-local option changed at runtime is reset when the current ++file stops playing. If option \fB\-\-c\fP is changed during playback of ++\fBfile2.mkv\fP, it is reset when advancing to \fBfile3.mkv\fP\&. This only affects ++file\-local options. The option \fB\-\-a\fP is never reset here. ++.SS Playing DVDs ++.sp ++DVDs can be played with the \fBdvd://[title]\fP syntax. The optional ++title specifier is a number which selects between separate video ++streams on the DVD. If no title is given (\fBdvd://\fP) then the longest ++title is selected automatically by the library. This is usually what ++you want. mpv does not support DVD menus. ++.sp ++DVDs which have been copied on to a hard drive or other mounted ++filesystem (by e.g. the \fBdvdbackup\fP tool) are accommodated by ++specifying the path to the local copy: \fB\-\-dvd\-device=PATH\fP\&. ++Alternatively, running \fBmpv PATH\fP should auto\-detect a DVD directory ++tree and play the longest title. ++.sp ++\fBNOTE:\fP ++.INDENT 0.0 ++.INDENT 3.5 ++mpv uses a different default DVD library than MPlayer. MPlayer ++uses libdvdread by default, and mpv uses libdvdnav by default. ++Both libraries are developed in parallel, but libdvdnav is ++intended to support more sophisticated DVD features such as menus ++and multi\-angle playback. mpv uses libdvdnav for files specified ++as either \fBdvd://...\fP or \fBdvdnav://...\fP\&. To use libdvdread, ++which will produce behavior more like MPlayer, specify ++\fBdvdread://...\fP instead. Some users have experienced problems ++when using libdvdnav, in which playback gets stuck in a DVD menu ++stream. These problems are reported to go away when auto\-selecting ++the title (\fBdvd://\fP rather than \fBdvd://1\fP) or when using ++libdvdread (e.g. \fBdvdread://0\fP). ++.sp ++DVDs use image\-based subtitles. Image subtitles are implemented as ++a bitmap video stream which can be superimposed over the main ++movie. mpv\(aqs subtitle styling and positioning options and keyboard ++shortcuts generally do not work with image\-based subtitles. ++Exceptions include options like \fB\-\-stretch\-dvd\-subs\fP and ++\fB\-\-stretch\-image\-subs\-to\-screen\fP\&. ++.UNINDENT ++.UNINDENT ++.SH CONFIGURATION FILES ++.SS Location and Syntax ++.sp ++You can put all of the options in configuration files which will be read every ++time mpv is run. The system\-wide configuration file \(aqmpv.conf\(aq is in your ++configuration directory (e.g. \fB/etc/mpv\fP or \fB/usr/local/etc/mpv\fP), the ++user\-specific one is \fB~/.config/mpv/mpv.conf\fP\&. For details and platform ++specifics (in particular Windows paths) see the \fI\%FILES\fP section. ++.sp ++User\-specific options override system\-wide options and options given on the ++command line override either. The syntax of the configuration files is ++\fBoption=value\fP\&. Everything after a \fI#\fP is considered a comment. Options ++that work without values can be enabled by setting them to \fIyes\fP and disabled by ++setting them to \fIno\fP\&. Even suboptions can be specified in this way. ++.INDENT 0.0 ++.INDENT 3.5 ++.IP "Example configuration file" ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++# Use opengl video output by default. ++vo=opengl ++# Use quotes for text that can contain spaces: ++status\-msg="Time: ${time\-pos}" ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.SS Escaping spaces and special characters ++.sp ++This is done like with command line options. The shell is not involved here, ++but option values still need to be quoted as a whole if it contains certain ++characters like spaces. A config entry can be quoted with \fB"\fP, ++as well as with the fixed\-length syntax (\fB%n%\fP) mentioned before. This is like ++passing the exact contents of the quoted string as command line option. C\-style ++escapes are currently _not_ interpreted on this level, although some options do ++this manually. (This is a mess and should probably be changed at some point.) ++.SS Putting Command Line Options into the Configuration File ++.sp ++Almost all command line options can be put into the configuration file. Here ++is a small guide: ++.TS ++center; ++|l|l|. ++_ ++T{ ++Option ++T} T{ ++Configuration file entry ++T} ++_ ++T{ ++\fB\-\-flag\fP ++T} T{ ++\fBflag\fP ++T} ++_ ++T{ ++\fB\-opt val\fP ++T} T{ ++\fBopt=val\fP ++T} ++_ ++T{ ++\fB\-\-opt=val\fP ++T} T{ ++\fBopt=val\fP ++T} ++_ ++T{ ++\fB\-opt "has spaces"\fP ++T} T{ ++\fBopt="has spaces"\fP ++T} ++_ ++.TE ++.SS File\-specific Configuration Files ++.sp ++You can also write file\-specific configuration files. If you wish to have a ++configuration file for a file called \(aqvideo.avi\(aq, create a file named ++\(aqvideo.avi.conf\(aq with the file\-specific options in it and put it in ++\fB~/.config/mpv/\fP\&. You can also put the configuration file in the same directory ++as the file to be played. Both require you to set the \fB\-\-use\-filedir\-conf\fP ++option (either on the command line or in your global config file). If a ++file\-specific configuration file is found in the same directory, no ++file\-specific configuration is loaded from \fB~/.config/mpv\fP\&. In addition, the ++\fB\-\-use\-filedir\-conf\fP option enables directory\-specific configuration files. ++For this, mpv first tries to load a mpv.conf from the same directory ++as the file played and then tries to load any file\-specific configuration. ++.SS Profiles ++.sp ++To ease working with different configurations, profiles can be defined in the ++configuration files. A profile starts with its name in square brackets, ++e.g. \fB[my\-profile]\fP\&. All following options will be part of the profile. A ++description (shown by \fB\-\-profile=help\fP) can be defined with the ++\fBprofile\-desc\fP option. To end the profile, start another one or use the ++profile name \fBdefault\fP to continue with normal options. ++.INDENT 0.0 ++.INDENT 3.5 ++.IP "Example mpv config file with profiles" ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++# normal top\-level option ++fullscreen=yes ++ ++# a profile that can be enabled with \-\-profile=big\-cache ++[big\-cache] ++cache=123400 ++demuxer\-readahead\-secs=20 ++ ++[slow] ++profile\-desc="some profile name" ++# reference a builtin profile ++profile=opengl\-hq ++ ++[fast] ++vo=vdpau ++ ++# using a profile again extends it ++[slow] ++framedrop=no ++# you can also include other profiles ++profile=big\-cache ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.SS Auto profiles ++.sp ++Some profiles are loaded automatically. The following example demonstrates this: ++.INDENT 0.0 ++.INDENT 3.5 ++.IP "Auto profile loading" ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++[protocol.dvd] ++profile\-desc="profile for dvd:// streams" ++alang=en ++ ++[extension.flv] ++profile\-desc="profile for .flv files" ++vf=flip ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.sp ++The profile name follows the schema \fBtype.name\fP, where type can be ++\fBprotocol\fP for the input/output protocol in use (see \fB\-\-list\-protocols\fP), ++and \fBextension\fP for the extension of the path of the currently played file ++(\fInot\fP the file format). ++.sp ++This feature is very limited, and there are no other auto profiles. ++.SH TAKING SCREENSHOTS ++.sp ++Screenshots of the currently played file can be taken using the \(aqscreenshot\(aq ++input mode command, which is by default bound to the \fBs\fP key. Files named ++\fBmpv\-shotNNNN.jpg\fP will be saved in the working directory, using the first ++available number \- no files will be overwritten. In pseudo\-GUI mode, the ++screenshot will be saved somewhere else. See \fI\%PSEUDO GUI MODE\fP\&. ++.sp ++A screenshot will usually contain the unscaled video contents at the end of the ++video filter chain and subtitles. By default, \fBS\fP takes screenshots without ++subtitles, while \fBs\fP includes subtitles. ++.sp ++Unlike with MPlayer, the \fBscreenshot\fP video filter is not required. This ++filter was never required in mpv, and has been removed. ++.SH TERMINAL STATUS LINE ++.sp ++During playback, mpv shows the playback status on the terminal. It looks like ++something like this: ++.INDENT 0.0 ++.INDENT 3.5 ++\fBAV: 00:03:12 / 00:24:25 (13%) A\-V: \-0.000\fP ++.UNINDENT ++.UNINDENT ++.sp ++The status line can be overridden with the \fB\-\-term\-status\-msg\fP option. ++.sp ++The following is a list of things that can show up in the status line. Input ++properties, that can be used to get the same information manually, are also ++listed. ++.INDENT 0.0 ++.IP \(bu 2 ++\fBAV:\fP or \fBV:\fP (video only) or \fBA:\fP (audio only) ++.IP \(bu 2 ++The current time position in \fBHH:MM:SS\fP format (\fBplayback\-time\fP property) ++.IP \(bu 2 ++The total file duration (absent if unknown) (\fBlength\fP property) ++.IP \(bu 2 ++Playback speed, e.g. \(ga\(ga x2.0\(ga\(ga. Only visible if the speed is not normal. This ++is the user\-requested speed, and not the actual speed (usually they should ++be the same, unless playback is too slow). (\fBspeed\fP property.) ++.IP \(bu 2 ++Playback percentage, e.g. \fB(13%)\fP\&. How much of the file has been played. ++Normally calculated out of playback position and duration, but can fallback ++to other methods (like byte position) if these are not available. ++(\fBpercent\-pos\fP property.) ++.IP \(bu 2 ++The audio/video sync as \fBA\-V: 0.000\fP\&. This is the difference between ++audio and video time. Normally it should be 0 or close to 0. If it\(aqs growing, ++it might indicate a playback problem. (\fBavsync\fP property.) ++.IP \(bu 2 ++Total A/V sync change, e.g. \fBct: \-0.417\fP\&. Normally invisible. Can show up ++if there is audio "missing", or not enough frames can be dropped. Usually ++this will indicate a problem. (\fBtotal\-avsync\-change\fP property.) ++.IP \(bu 2 ++Encoding state in \fB{...}\fP, only shown in encoding mode. ++.IP \(bu 2 ++Display sync state. If display sync is active (\fBdisplay\-sync\-active\fP ++property), this shows \fBDS: 2.500/13\fP, where the first number is average ++number of vsyncs per video frame (e.g. 2.5 when playing 24Hz videos on 60Hz ++screens), which might jitter if the ratio doesn\(aqt round off, or there are ++mistimed frames (\fBvsync\-ratio\fP), and the second number of estimated number ++of vsyncs which took too long (\fBvo\-delayed\-frame\-count\fP property). The ++latter is a heuristic, as it\(aqs generally not possible to determine this with ++certainty. ++.IP \(bu 2 ++Dropped frames, e.g. \fBDropped: 4\fP\&. Shows up only if the count is not 0. Can ++grow if the video framerate is higher than that of the display, or if video ++rendering is too slow. May also be incremented on "hiccups" and when the video ++frame couldn\(aqt be displayed on time. (\fBvo\-drop\-frame\-count\fP property.) ++If the decoder drops frames, the number of decoder\-dropped frames is appended ++to the display as well, e.g.: \fBDropped: 4/34\fP\&. This happens only if ++decoder frame dropping is enabled with the \fB\-\-framedrop\fP options. ++(\fBdrop\-frame\-count\fP property.) ++.IP \(bu 2 ++Cache state, e.g. \fBCache: 2s+134KB\fP\&. Visible if the stream cache is enabled. ++The first value shows the amount of video buffered in the demuxer in seconds, ++the second value shows \fIadditional\fP data buffered in the stream cache in ++kilobytes. (\fBdemuxer\-cache\-duration\fP and \fBcache\-used\fP properties.) ++.UNINDENT ++.SH PROTOCOLS ++.INDENT 0.0 ++.TP ++.B \fBhttp://...\fP, \fBhttps://\fP, ... ++Many network protocols are supported, but the protocol prefix must always ++be specified. mpv will never attempt to guess whether a filename is ++actually a network address. A protocol prefix is always required. ++.sp ++Note that not all prefixes are documented here. Undocumented prefixes are ++either aliases to documented protocols, or are just redirections to ++protocols implemented and documented in FFmpeg. ++.TP ++.B \fBytdl://...\fP ++By default, the youtube\-dl hook script (enabled by default for mpv CLI) ++only looks at http URLs. Prefixing an URL with \fBytdl://\fP forces it to ++be always processed by the script. This can also be used to invoke special ++youtube\-dl functionality like playing a video by ID or invoking search. ++.sp ++Keep in mind that you can\(aqt pass youtube\-dl command line options by this, ++and you have to use \fB\-\-ytdl\-raw\-options\fP instead. ++.TP ++.B \fB\-\fP ++Play data from stdin. ++.TP ++.B \fBsmb://PATH\fP ++Play a path from Samba share. ++.TP ++.B \fBbd://[title][/device]\fP \fB\-\-bluray\-device=PATH\fP ++Play a Blu\-ray disc. Currently, this does not accept ISO files. Instead, ++you must mount the ISO file as filesystem, and point \fB\-\-bluray\-device\fP ++to the mounted directory directly. ++.TP ++.B \fBdvd://[title|[starttitle]\-endtitle][/device]\fP \fB\-\-dvd\-device=PATH\fP ++Play a DVD. DVD menus are not supported. If no title is given, the longest ++title is auto\-selected. ++.sp ++\fBdvdnav://\fP is an old alias for \fBdvd://\fP and does exactly the same ++thing. ++.TP ++.B \fBdvdread://...:\fP ++Play a DVD using the old libdvdread code. This is what MPlayer and older ++mpv versions use for \fBdvd://\fP\&. Use is discouraged. It\(aqs provided only ++for compatibility and for transition. ++.TP ++.B \fBtv://[channel][/input_id]\fP \fB\-\-tv\-...\fP ++Analogue TV via V4L. Also useful for webcams. (Linux only.) ++.TP ++.B \fBpvr://\fP \fB\-\-pvr\-...\fP ++PVR. (Linux only.) ++.TP ++.B \fBdvb://[cardnumber@]channel\fP \fB\-\-dvbin\-...\fP ++Digital TV via DVB. (Linux only.) ++.TP ++.B \fBmf://[filemask|@listfile]\fP \fB\-\-mf\-...\fP ++Play a series of images as video. ++.TP ++.B \fBcdda://[device]\fP \fB\-\-cdrom\-device=PATH\fP \fB\-\-cdda\-...\fP ++Play CD. ++.TP ++.B \fBlavf://...\fP ++Access any FFmpeg/Libav libavformat protocol. Basically, this passed the ++string after the \fB//\fP directly to libavformat. ++.TP ++.B \fBav://type:options\fP ++This is intended for using libavdevice inputs. \fBtype\fP is the libavdevice ++demuxer name, and \fBoptions\fP is the (pseudo\-)filename passed to the ++demuxer. ++.sp ++For example, \fBmpv av://lavfi:mandelbrot\fP makes use of the libavfilter ++wrapper included in libavdevice, and will use the \fBmandelbrot\fP source ++filter to generate input data. ++.sp ++\fBavdevice://\fP is an alias. ++.TP ++.B \fBfile://PATH\fP ++A local path as URL. Might be useful in some special use\-cases. Note that ++\fBPATH\fP itself should start with a third \fB/\fP to make the path an ++absolute path. ++.TP ++.B \fBfd://123\fP ++Read data from the given file descriptor (for example 123). This is similar ++to piping data to stdin via \fB\-\fP, but can use an arbitrary file descriptor. ++.TP ++.B \fBedl://[edl specification as in edl\-mpv.rst]\fP ++Stitch together parts of multiple files and play them. ++.TP ++.B \fBnull://\fP ++Simulate an empty file. If opened for writing, it will discard all data. ++The \fBnull\fP demuxer will specifically pass autoprobing if this protocol ++is used (while it\(aqs not automatically invoked for empty files). ++.TP ++.B \fBmemory://data\fP ++Use the \fBdata\fP part as source data. ++.TP ++.B \fBhex://data\fP ++Like \fBmemory://\fP, but the string is interpreted as hexdump. ++.UNINDENT ++.SH PSEUDO GUI MODE ++.sp ++mpv has no official GUI, other than the OSC (\fI\%ON SCREEN CONTROLLER\fP), which ++is not a full GUI and is not meant to be. However, to compensate for the lack ++of expected GUI behavior, mpv will in some cases start with some settings ++changed to behave slightly more like a GUI mode. ++.sp ++Currently this happens only in the following cases: ++.INDENT 0.0 ++.IP \(bu 2 ++if started using the \fBmpv.desktop\fP file on Linux (e.g. started from menus ++or file associations provided by desktop environments) ++.IP \(bu 2 ++if started from explorer.exe on Windows (technically, if it was started on ++Windows, and all of the stdout/stderr/stdin handles are unset) ++.IP \(bu 2 ++started out of the bundle on OSX ++.IP \(bu 2 ++if you manually use \fB\-\-player\-operation\-mode=pseudo\-gui\fP on the command line ++.UNINDENT ++.sp ++This mode applies options from the builtin profile \fBbuiltin\-pseudo\-gui\fP, but ++only if these haven\(aqt been set in the user\(aqs config file or on the command line. ++Also, for compatibility with the old pseudo\-gui behavior, the options in the ++\fBpseudo\-gui\fP profile are applied unconditionally. In addition, the profile ++makes sure to enable the pseudo\-GUI mode, so that \fB\-\-profile=pseudo\-gui\fP ++works like in older mpv releases. The profiles are currently defined as follows: ++.INDENT 0.0 ++.INDENT 3.5 ++.sp ++.nf ++.ft C ++[builtin\-pseudo\-gui] ++terminal=no ++force\-window=yes ++idle=once ++screenshot\-directory=~~desktop/ ++[pseudo\-gui] ++player\-operation\-mode=pseudo\-gui ++.ft P ++.fi ++.UNINDENT ++.UNINDENT ++.sp ++\fBWARNING:\fP ++.INDENT 0.0 ++.INDENT 3.5 ++Currently, you can extend the \fBpseudo\-gui\fP profile in the config file the ++normal way. This is deprecated. In future mpv releases, the behavior might ++change, and not apply your additional settings, and/or use a different ++profile name. ++.UNINDENT ++.UNINDENT ++.SH OPTIONS ++.SS Track Selection ++.INDENT 0.0 ++.TP ++.B \fB\-\-alang=\fP ++Specify a priority list of audio languages to use. Different container ++formats employ different language codes. DVDs use ISO 639\-1 two\-letter ++language codes, Matroska, MPEG\-TS and NUT use ISO 639\-2 three\-letter ++language codes, while OGM uses a free\-form identifier. See also \fB\-\-aid\fP\&. ++.INDENT 7.0 ++.INDENT 3.5 ++.IP "Examples" ++.INDENT 0.0 ++.TP ++.B \fBmpv dvd://1 \-\-alang=hu,en\fP ++Chooses the Hungarian language track on a DVD and falls back on ++English if Hungarian is not available. ++.TP ++.B \fBmpv \-\-alang=jpn example.mkv\fP ++Plays a Matroska file in Japanese. ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.TP ++.B \fB\-\-slang=\fP ++Specify a priority list of subtitle languages to use. Different container ++formats employ different language codes. DVDs use ISO 639\-1 two letter ++language codes, Matroska uses ISO 639\-2 three letter language codes while ++OGM uses a free\-form identifier. See also \fB\-\-sid\fP\&. ++.INDENT 7.0 ++.INDENT 3.5 ++.IP "Examples" ++.INDENT 0.0 ++.IP \(bu 2 ++\fBmpv dvd://1 \-\-slang=hu,en\fP chooses the Hungarian subtitle track on ++a DVD and falls back on English if Hungarian is not available. ++.IP \(bu 2 ++\fBmpv \-\-slang=jpn example.mkv\fP plays a Matroska file with Japanese ++subtitles. ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.TP ++.B \fB\-\-aid=\fP ++Select audio track. \fBauto\fP selects the default, \fBno\fP disables audio. ++See also \fB\-\-alang\fP\&. mpv normally prints available audio tracks on the ++terminal when starting playback of a file. ++.sp ++\fB\-\-audio\fP is an alias for \fB\-\-aid\fP\&. ++.sp ++\fB\-\-aid=no\fP or \fB\-\-audio=no\fP or \fB\-\-no\-audio\fP disables audio playback. ++(The latter variant does not work with the client API.) ++.TP ++.B \fB\-\-sid=\fP ++Display the subtitle stream specified by \fB\fP\&. \fBauto\fP selects ++the default, \fBno\fP disables subtitles. ++.sp ++\fB\-\-sub\fP is an alias for \fB\-\-sid\fP\&. ++.sp ++\fB\-\-sid=no\fP or \fB\-\-sub=no\fP or \fB\-\-no\-sub\fP disables subtitle decoding. ++(The latter variant does not work with the client API.) ++.TP ++.B \fB\-\-vid=\fP ++Select video channel. \fBauto\fP selects the default, \fBno\fP disables video. ++.sp ++\fB\-\-video\fP is an alias for \fB\-\-vid\fP\&. ++.sp ++\fB\-\-vid=no\fP or \fB\-\-video=no\fP or \fB\-\-no\-video\fP disables video playback. ++(The latter variant does not work with the client API.) ++.sp ++If video is disabled, mpv will try to download the audio only if media is ++streamed with youtube\-dl, because it saves bandwidth. This is done by ++setting the ytdl_format to "bestaudio/best" in the ytdl_hook.lua script. ++.TP ++.B \fB\-\-ff\-aid=\fP, \fB\-\-ff\-sid=\fP, \fB\-\-ff\-vid=\fP ++Select audio/subtitle/video streams by the FFmpeg stream index. The FFmpeg ++stream index is relatively arbitrary, but useful when interacting with ++other software using FFmpeg (consider \fBffprobe\fP). ++.sp ++Note that with external tracks (added with \fB\-\-sub\-file\fP and similar ++options), there will be streams with duplicate IDs. In this case, the ++first stream in order is selected. ++.TP ++.B \fB\-\-edition=\fP ++(Matroska files only) ++Specify the edition (set of chapters) to use, where 0 is the first. If set ++to \fBauto\fP (the default), mpv will choose the first edition declared as a ++default, or if there is no default, the first edition defined. ++.UNINDENT ++.SS Playback Control ++.INDENT 0.0 ++.TP ++.B \fB\-\-start=\fP ++Seek to given time position. ++.sp ++The general format for absolute times is \fB[[hh:]mm:]ss[.ms]\fP\&. If the time ++is given with a prefix of \fB+\fP or \fB\-\fP, the seek is relative from the start ++or end of the file. (Since mpv 0.14, the start of the file is always ++considered 0.) ++.sp ++\fBpp%\fP seeks to percent position pp (0\-100). ++.sp ++\fB#c\fP seeks to chapter number c. (Chapters start from 1.) ++.INDENT 7.0 ++.INDENT 3.5 ++.IP "Examples" ++.INDENT 0.0 ++.TP ++.B \fB\-\-start=+56\fP, \fB\-\-start=+00:56\fP ++Seeks to the start time + 56 seconds. ++.TP ++.B \fB\-\-start=\-56\fP, \fB\-\-start=\-00:56\fP ++Seeks to the end time \- 56 seconds. ++.TP ++.B \fB\-\-start=01:10:00\fP ++Seeks to 1 hour 10 min. ++.TP ++.B \fB\-\-start=50%\fP ++Seeks to the middle of the file. ++.TP ++.B \fB\-\-start=30 \-\-end=40\fP ++Seeks to 30 seconds, plays 10 seconds, and exits. ++.TP ++.B \fB\-\-start=\-3:20 \-\-length=10\fP ++Seeks to 3 minutes and 20 seconds before the end of the file, plays ++10 seconds, and exits. ++.TP ++.B \fB\-\-start=\(aq#2\(aq \-\-end=\(aq#4\(aq\fP ++Plays chapters 2 and 3, and exits. ++.UNINDENT ++.UNINDENT ++.UNINDENT ++.TP ++.B \fB\-\-end=