From 51de1d8436100f725f3576aefa24a2bd2057bc28 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:36:56 +0200 Subject: Adding upstream version 0.37.0. Signed-off-by: Daniel Baumann --- .editorconfig | 15 + .github/ISSUE_TEMPLATE/1_dont_ignore.md | 16 + .github/ISSUE_TEMPLATE/2_bug_report_linux.md | 49 + .github/ISSUE_TEMPLATE/2_bug_report_macos.md | 51 + .github/ISSUE_TEMPLATE/2_bug_report_windows.md | 47 + .github/ISSUE_TEMPLATE/3_bug_report.md | 43 + .github/ISSUE_TEMPLATE/4_bug_report_build.md | 30 + .github/ISSUE_TEMPLATE/5_feature_request.md | 22 + .github/ISSUE_TEMPLATE/6_question.md | 25 + .github/ISSUE_TEMPLATE/config.yml | 9 + .github/PULL_REQUEST_TEMPLATE | 5 + .github/workflows/build.yml | 292 + .github/workflows/comment.yml | 58 + .github/workflows/docs.yml | 24 + .github/workflows/lint.yml | 22 + .gitignore | 3 + Copyright | 74 + DOCS/client-api-changes.rst | 279 + DOCS/compatibility.rst | 177 + DOCS/compile-windows.md | 214 + DOCS/contribute.md | 281 + DOCS/edl-mpv.rst | 396 ++ DOCS/encoding.rst | 155 + DOCS/interface-changes.rst | 982 +++ DOCS/man/af.rst | 267 + DOCS/man/ao.rst | 249 + DOCS/man/changes.rst | 20 + DOCS/man/console.rst | 167 + DOCS/man/encode.rst | 107 + DOCS/man/input.rst | 3697 ++++++++++ DOCS/man/ipc.rst | 387 + DOCS/man/javascript.rst | 398 ++ DOCS/man/libmpv.rst | 79 + DOCS/man/lua.rst | 917 +++ DOCS/man/mpv.rst | 1690 +++++ DOCS/man/options.rst | 7377 ++++++++++++++++++++ DOCS/man/osc.rst | 456 ++ DOCS/man/stats.rst | 233 + DOCS/man/vf.rst | 794 +++ DOCS/man/vo.rst | 710 ++ DOCS/mplayer-changes.rst | 455 ++ DOCS/release-policy.md | 138 + DOCS/tech-overview.txt | 656 ++ LICENSE.GPL | 339 + LICENSE.LGPL | 502 ++ README.md | 208 + RELEASE_NOTES | 214 + TOOLS/docutils-wrapper.py | 67 + TOOLS/dylib-unhell.py | 181 + TOOLS/file2string.py | 44 + TOOLS/gen-osd-font.sh | 9 + TOOLS/idet.sh | 158 + TOOLS/lua/README.md | 20 + TOOLS/lua/acompressor.lua | 155 + TOOLS/lua/ao-null-reload.lua | 20 + TOOLS/lua/audio-hotplug-test.lua | 8 + TOOLS/lua/autocrop.lua | 298 + TOOLS/lua/autodeint.lua | 156 + TOOLS/lua/autoload.lua | 328 + TOOLS/lua/command-test.lua | 124 + TOOLS/lua/cycle-deinterlace-pullup.lua | 56 + TOOLS/lua/nan-test.lua | 37 + TOOLS/lua/observe-all.lua | 22 + TOOLS/lua/ontop-playback.lua | 19 + TOOLS/lua/osd-test.lua | 35 + TOOLS/lua/pause-when-minimize.lua | 20 + TOOLS/lua/skip-logo.lua | 265 + TOOLS/lua/status-line.lua | 92 + TOOLS/lua/test-hooks.lua | 32 + TOOLS/macos-sdk-version.py | 46 + TOOLS/macos-swift-lib-directory.py | 42 + TOOLS/matroska.py | 479 ++ TOOLS/mpv-osd-symbols.sfdir/.notdef.glyph | 6 + TOOLS/mpv-osd-symbols.sfdir/font.props | 77 + TOOLS/mpv-osd-symbols.sfdir/uniE001.glyph | 16 + TOOLS/mpv-osd-symbols.sfdir/uniE002.glyph | 22 + TOOLS/mpv-osd-symbols.sfdir/uniE003.glyph | 17 + TOOLS/mpv-osd-symbols.sfdir/uniE004.glyph | 20 + TOOLS/mpv-osd-symbols.sfdir/uniE005.glyph | 20 + TOOLS/mpv-osd-symbols.sfdir/uniE006.glyph | 47 + TOOLS/mpv-osd-symbols.sfdir/uniE007.glyph | 21 + TOOLS/mpv-osd-symbols.sfdir/uniE008.glyph | 37 + TOOLS/mpv-osd-symbols.sfdir/uniE009.glyph | 17 + TOOLS/mpv-osd-symbols.sfdir/uniE00A.glyph | 50 + TOOLS/mpv-osd-symbols.sfdir/uniE00B.glyph | 27 + TOOLS/mpv-osd-symbols.sfdir/uniE010.glyph | 21 + TOOLS/mpv-osd-symbols.sfdir/uniE011.glyph | 17 + TOOLS/mpv-osd-symbols.sfdir/uniE012.glyph | 21 + TOOLS/mpv-osd-symbols.sfdir/uniE013.glyph | 17 + TOOLS/mpv-osd-symbols.sfdir/uniE101.glyph | 16 + TOOLS/mpv-osd-symbols.sfdir/uniE104.glyph | 25 + TOOLS/mpv-osd-symbols.sfdir/uniE105.glyph | 25 + TOOLS/mpv-osd-symbols.sfdir/uniE106.glyph | 22 + TOOLS/mpv-osd-symbols.sfdir/uniE107.glyph | 56 + TOOLS/mpv-osd-symbols.sfdir/uniE108.glyph | 39 + TOOLS/mpv-osd-symbols.sfdir/uniE109.glyph | 39 + TOOLS/mpv-osd-symbols.sfdir/uniE10A.glyph | 36 + TOOLS/mpv-osd-symbols.sfdir/uniE10B.glyph | 26 + TOOLS/mpv-osd-symbols.sfdir/uniE10C.glyph | 33 + TOOLS/mpv-osd-symbols.sfdir/uniE10D.glyph | 40 + TOOLS/mpv-osd-symbols.sfdir/uniE10E.glyph | 53 + TOOLS/mpv-osd-symbols.sfdir/uniE110.glyph | 16 + TOOLS/mpv-osd-symbols.sfdir/uniE111.glyph | 37 + TOOLS/mpv-osd-symbols.sfdir/uniE112.glyph | 15 + TOOLS/mpv-osd-symbols.sfdir/uniE113.glyph | 20 + TOOLS/mpv-osd-symbols.sfdir/uniE114.glyph | 31 + TOOLS/mpv-osd-symbols.sfdir/uniE115.glyph | 27 + TOOLS/mpv_identify.sh | 149 + TOOLS/osxbundle.py | 87 + TOOLS/osxbundle/meson.build | 8 + TOOLS/osxbundle/mpv.app/Contents/Info.plist | 874 +++ TOOLS/osxbundle/mpv.app/Contents/MacOS/.gitkeep | 0 .../osxbundle/mpv.app/Contents/MacOS/lib/.gitkeep | 0 TOOLS/osxbundle/mpv.app/Contents/PkgInfo | 1 + .../mpv.app/Contents/Resources/document.icns | Bin 0 -> 311266 bytes .../osxbundle/mpv.app/Contents/Resources/icon.icns | Bin 0 -> 742954 bytes .../osxbundle/mpv.app/Contents/Resources/mpv.conf | 2 + TOOLS/stats-conv.py | 166 + TOOLS/umpv | 87 + TOOLS/uncrustify.cfg | 165 + VERSION | 1 + audio/aframe.c | 720 ++ audio/aframe.h | 75 + audio/chmap.c | 515 ++ audio/chmap.h | 163 + audio/chmap_avchannel.c | 51 + audio/chmap_avchannel.h | 32 + audio/chmap_sel.c | 389 ++ audio/chmap_sel.h | 52 + audio/decode/ad_lavc.c | 325 + audio/decode/ad_spdif.c | 441 ++ audio/filter/af_drop.c | 114 + audio/filter/af_format.c | 143 + audio/filter/af_lavcac3enc.c | 437 ++ audio/filter/af_rubberband.c | 382 + audio/filter/af_scaletempo.c | 626 ++ audio/filter/af_scaletempo2.c | 254 + audio/filter/af_scaletempo2_internals.c | 873 +++ audio/filter/af_scaletempo2_internals.h | 134 + audio/fmt-conversion.c | 60 + audio/fmt-conversion.h | 24 + audio/format.c | 267 + audio/format.h | 77 + audio/out/ao.c | 719 ++ audio/out/ao.h | 122 + audio/out/ao_alsa.c | 1161 +++ audio/out/ao_audiotrack.c | 852 +++ audio/out/ao_audiounit.m | 260 + audio/out/ao_coreaudio.c | 435 ++ audio/out/ao_coreaudio_chmap.c | 340 + audio/out/ao_coreaudio_chmap.h | 35 + audio/out/ao_coreaudio_exclusive.c | 472 ++ audio/out/ao_coreaudio_properties.c | 103 + audio/out/ao_coreaudio_properties.h | 61 + audio/out/ao_coreaudio_utils.c | 539 ++ audio/out/ao_coreaudio_utils.h | 79 + audio/out/ao_jack.c | 284 + audio/out/ao_lavc.c | 337 + audio/out/ao_null.c | 230 + audio/out/ao_openal.c | 401 ++ audio/out/ao_opensles.c | 265 + audio/out/ao_oss.c | 400 ++ audio/out/ao_pcm.c | 248 + audio/out/ao_pipewire.c | 883 +++ audio/out/ao_pulse.c | 817 +++ audio/out/ao_sdl.c | 216 + audio/out/ao_sndio.c | 321 + audio/out/ao_wasapi.c | 504 ++ audio/out/ao_wasapi.h | 116 + audio/out/ao_wasapi_changenotify.c | 246 + audio/out/ao_wasapi_utils.c | 1063 +++ audio/out/buffer.c | 736 ++ audio/out/internal.h | 237 + ci/build-freebsd.sh | 29 + ci/build-macos.sh | 22 + ci/build-mingw64.sh | 306 + ci/build-msys2.sh | 39 + ci/build-tumbleweed.sh | 20 + ci/lint-commit-msg.py | 116 + common/av_common.c | 404 ++ common/av_common.h | 54 + common/av_log.c | 215 + common/av_log.h | 11 + common/codecs.c | 107 + common/codecs.h | 48 + common/common.c | 413 ++ common/common.h | 161 + common/encode.h | 61 + common/encode_lavc.c | 949 +++ common/encode_lavc.h | 114 + common/global.h | 15 + common/meson.build | 8 + common/msg.c | 1069 +++ common/msg.h | 92 + common/msg_control.h | 45 + common/playlist.c | 413 ++ common/playlist.h | 121 + common/recorder.c | 422 ++ common/recorder.h | 25 + common/stats.c | 325 + common/stats.h | 34 + common/tags.c | 151 + common/tags.h | 31 + common/version.c | 23 + common/version.h.in | 7 + demux/cache.c | 331 + demux/cache.h | 16 + demux/codec_tags.c | 280 + demux/codec_tags.h | 35 + demux/cue.c | 270 + demux/cue.h | 43 + demux/demux.c | 4624 ++++++++++++ demux/demux.h | 361 + demux/demux_cue.c | 304 + demux/demux_disc.c | 360 + demux/demux_edl.c | 651 ++ demux/demux_lavf.c | 1448 ++++ demux/demux_libarchive.c | 120 + demux/demux_mf.c | 373 + demux/demux_mkv.c | 3392 +++++++++ demux/demux_mkv_timeline.c | 642 ++ demux/demux_null.c | 35 + demux/demux_playlist.c | 584 ++ demux/demux_raw.c | 326 + demux/demux_timeline.c | 719 ++ demux/ebml.c | 619 ++ demux/ebml.h | 93 + demux/matroska.h | 24 + demux/packet.c | 244 + demux/packet.h | 86 + demux/stheader.h | 119 + demux/timeline.c | 41 + demux/timeline.h | 72 + etc/_mpv.zsh | 265 + etc/builtin.conf | 80 + etc/encoding-profiles.conf | 224 + etc/input.conf | 181 + etc/meson.build | 20 + etc/mplayer-input.conf | 93 + etc/mpv-gradient.svg | 198 + etc/mpv-icon-8bit-128x128.png | Bin 0 -> 22984 bytes etc/mpv-icon-8bit-16x16.png | Bin 0 -> 759 bytes etc/mpv-icon-8bit-32x32.png | Bin 0 -> 2124 bytes etc/mpv-icon-8bit-64x64.png | Bin 0 -> 5686 bytes etc/mpv-icon.ico | Bin 0 -> 270345 bytes etc/mpv-symbolic.svg | 68 + etc/mpv.bash-completion | 123 + etc/mpv.conf | 143 + etc/mpv.desktop | 44 + etc/mpv.metainfo.xml | 29 + etc/mpv.svg | 86 + etc/restore-old-bindings.conf | 59 + filters/f_async_queue.c | 375 + filters/f_async_queue.h | 135 + filters/f_auto_filters.c | 431 ++ filters/f_auto_filters.h | 13 + filters/f_autoconvert.c | 576 ++ filters/f_autoconvert.h | 85 + filters/f_decoder_wrapper.c | 1326 ++++ filters/f_decoder_wrapper.h | 125 + filters/f_demux_in.c | 85 + filters/f_demux_in.h | 11 + filters/f_hwtransfer.c | 667 ++ filters/f_hwtransfer.h | 28 + filters/f_lavfi.c | 1208 ++++ filters/f_lavfi.h | 42 + filters/f_output_chain.c | 729 ++ filters/f_output_chain.h | 87 + filters/f_swresample.c | 677 ++ filters/f_swresample.h | 44 + filters/f_swscale.c | 153 + filters/f_swscale.h | 34 + filters/f_utils.c | 311 + filters/f_utils.h | 84 + filters/filter.c | 909 +++ filters/filter.h | 470 ++ filters/filter_internal.h | 145 + filters/frame.c | 210 + filters/frame.h | 59 + filters/user_filters.c | 185 + filters/user_filters.h | 39 + input/cmd.c | 671 ++ input/cmd.h | 156 + input/event.c | 93 + input/event.h | 43 + input/input.c | 1695 +++++ input/input.h | 239 + input/ipc-dummy.c | 19 + input/ipc-unix.c | 444 ++ input/ipc-win.c | 509 ++ input/ipc.c | 414 ++ input/keycodes.c | 379 + input/keycodes.h | 270 + input/meson.build | 20 + input/sdl_gamepad.c | 287 + libmpv/client.h | 2032 ++++++ libmpv/render.h | 759 ++ libmpv/render_gl.h | 211 + libmpv/stream_cb.h | 247 + meson.build | 1765 +++++ meson_options.txt | 117 + misc/bstr.c | 469 ++ misc/bstr.h | 231 + misc/charset_conv.c | 235 + misc/charset_conv.h | 22 + misc/ctype.h | 19 + misc/dispatch.c | 417 ++ misc/dispatch.h | 32 + misc/jni.c | 429 ++ misc/jni.h | 161 + misc/json.c | 359 + misc/json.h | 31 + misc/language.c | 362 + misc/language.h | 31 + misc/linked_list.h | 107 + misc/natural_sort.c | 67 + misc/natural_sort.h | 23 + misc/node.c | 159 + misc/node.h | 20 + misc/random.c | 75 + misc/random.h | 41 + misc/rendezvous.c | 55 + misc/rendezvous.h | 8 + misc/thread_pool.c | 223 + misc/thread_pool.h | 35 + misc/thread_tools.c | 276 + misc/thread_tools.h | 83 + misc/uuid.c | 141 + misc/uuid.h | 146 + mpv_talloc.h | 7 + options/m_config.h | 1 + options/m_config_core.c | 876 +++ options/m_config_core.h | 194 + options/m_config_frontend.c | 1080 +++ options/m_config_frontend.h | 266 + options/m_option.c | 3866 ++++++++++ options/m_option.h | 764 ++ options/m_property.c | 630 ++ options/m_property.h | 234 + options/options.c | 1097 +++ options/options.h | 406 ++ options/parse_commandline.c | 261 + options/parse_commandline.h | 32 + options/parse_configfile.c | 178 + options/parse_configfile.h | 30 + options/path.c | 410 ++ options/path.h | 98 + osdep/android/strnlen.c | 40 + osdep/android/strnlen.h | 33 + osdep/apple_utils.c | 39 + osdep/apple_utils.h | 28 + osdep/compiler.h | 30 + osdep/endian.h | 37 + osdep/getpid.h | 29 + osdep/glob-win.c | 162 + osdep/io.c | 904 +++ osdep/io.h | 232 + osdep/language-apple.c | 45 + osdep/language-posix.c | 72 + osdep/language-win.c | 65 + osdep/macOS_swift_bridge.h | 57 + osdep/macos/libmpv_helper.swift | 250 + osdep/macos/log_helper.swift | 47 + osdep/macos/mpv_helper.swift | 156 + osdep/macos/precise_timer.swift | 153 + osdep/macos/remote_command_center.swift | 191 + osdep/macos/swift_compat.swift | 36 + osdep/macos/swift_extensions.swift | 58 + osdep/macosx_application.h | 55 + osdep/macosx_application.m | 375 + osdep/macosx_application_objc.h | 40 + osdep/macosx_events.h | 36 + osdep/macosx_events.m | 408 ++ osdep/macosx_events_objc.h | 45 + osdep/macosx_menubar.h | 30 + osdep/macosx_menubar.m | 853 +++ osdep/macosx_menubar_objc.h | 25 + osdep/macosx_touchbar.h | 46 + osdep/macosx_touchbar.m | 334 + osdep/main-fn-cocoa.c | 10 + osdep/main-fn-unix.c | 6 + osdep/main-fn-win.c | 93 + osdep/main-fn.h | 1 + osdep/meson.build | 51 + osdep/mpv.exe.manifest | 41 + osdep/mpv.rc | 50 + osdep/path-darwin.c | 77 + osdep/path-macosx.m | 34 + osdep/path-unix.c | 100 + osdep/path-uwp.c | 35 + osdep/path-win.c | 113 + osdep/path.h | 32 + osdep/poll_wrapper.c | 89 + osdep/poll_wrapper.h | 12 + osdep/semaphore.h | 37 + osdep/semaphore_osx.c | 117 + osdep/strnlen.h | 31 + osdep/subprocess-dummy.c | 7 + osdep/subprocess-posix.c | 345 + osdep/subprocess-win.c | 516 ++ osdep/subprocess.c | 39 + osdep/subprocess.h | 88 + osdep/terminal-dummy.c | 35 + osdep/terminal-unix.c | 573 ++ osdep/terminal-win.c | 425 ++ osdep/terminal.h | 60 + osdep/threads-posix.c | 64 + osdep/threads-posix.h | 247 + osdep/threads-win32.h | 224 + osdep/threads.h | 23 + osdep/timer-darwin.c | 48 + osdep/timer-linux.c | 64 + osdep/timer-win32.c | 141 + osdep/timer.c | 67 + osdep/timer.h | 63 + osdep/w32_keyboard.c | 123 + osdep/w32_keyboard.h | 29 + osdep/win32-console-wrapper.c | 89 + osdep/windows_utils.c | 229 + osdep/windows_utils.h | 49 + player/audio.c | 985 +++ player/client.c | 2248 ++++++ player/client.h | 58 + player/command.c | 7149 +++++++++++++++++++ player/command.h | 123 + player/configfiles.c | 472 ++ player/core.h | 644 ++ player/external_files.c | 359 + player/external_files.h | 38 + player/javascript.c | 1262 ++++ player/javascript/defaults.js | 782 +++ player/javascript/meson.build | 6 + player/loadfile.c | 2066 ++++++ player/lua.c | 1341 ++++ player/lua/assdraw.lua | 160 + player/lua/auto_profiles.lua | 198 + player/lua/console.lua | 1204 ++++ player/lua/defaults.lua | 836 +++ player/lua/meson.build | 10 + player/lua/options.lua | 164 + player/lua/osc.lua | 2917 ++++++++ player/lua/stats.lua | 1417 ++++ player/lua/ytdl_hook.lua | 1191 ++++ player/main.c | 467 ++ player/meson.build | 10 + player/misc.c | 334 + player/osd.c | 580 ++ player/playloop.c | 1291 ++++ player/screenshot.c | 611 ++ player/screenshot.h | 46 + player/scripting.c | 462 ++ player/sub.c | 214 + player/video.c | 1324 ++++ stream/cookies.c | 138 + stream/cookies.h | 31 + stream/dvb_tune.c | 652 ++ stream/dvb_tune.h | 42 + stream/dvbin.h | 143 + stream/stream.c | 900 +++ stream/stream.h | 269 + stream/stream_avdevice.c | 32 + stream/stream_bluray.c | 632 ++ stream/stream_cb.c | 108 + stream/stream_cdda.c | 369 + stream/stream_concat.c | 179 + stream/stream_dvb.c | 1161 +++ stream/stream_dvdnav.c | 719 ++ stream/stream_edl.c | 17 + stream/stream_file.c | 377 + stream/stream_lavf.c | 457 ++ stream/stream_libarchive.c | 623 ++ stream/stream_libarchive.h | 35 + stream/stream_memory.c | 100 + stream/stream_mf.c | 41 + stream/stream_null.c | 35 + stream/stream_slice.c | 181 + sub/ass_mp.c | 422 ++ sub/ass_mp.h | 65 + sub/dec_sub.c | 498 ++ sub/dec_sub.h | 62 + sub/draw_bmp.c | 1035 +++ sub/draw_bmp.h | 63 + sub/filter_jsre.c | 140 + sub/filter_regex.c | 89 + sub/filter_sdh.c | 482 ++ sub/img_convert.c | 128 + sub/img_convert.h | 23 + sub/lavc_conv.c | 293 + sub/meson.build | 6 + sub/osd.c | 559 ++ sub/osd.h | 247 + sub/osd_font.otf | Bin 0 -> 4460 bytes sub/osd_libass.c | 691 ++ sub/osd_state.h | 94 + sub/sd.h | 111 + sub/sd_ass.c | 1035 +++ sub/sd_lavc.c | 676 ++ ta/README | 39 + ta/ta.c | 404 ++ ta/ta.h | 157 + ta/ta_talloc.c | 77 + ta/ta_talloc.h | 157 + ta/ta_utils.c | 315 + test/chmap.c | 218 + test/gl_video.c | 25 + test/img_format.c | 217 + test/img_utils.c | 63 + test/img_utils.h | 24 + test/json.c | 87 + test/libmpv_test.c | 271 + test/linked_list.c | 160 + test/meson.build | 148 + test/paths.c | 65 + test/ref/draw_bmp.txt | 249 + test/ref/img_formats.txt | 2834 ++++++++ test/ref/repack.txt | 385 + test/ref/repack_sws.log | 18 + test/ref/repack_zimg.log | 18 + test/ref/zimg_formats.txt | 249 + test/repack.c | 532 ++ test/scale_sws.c | 42 + test/scale_test.c | 192 + test/scale_test.h | 30 + test/scale_zimg.c | 56 + test/test_utils.c | 111 + test/test_utils.h | 56 + test/timer.c | 41 + video/csputils.c | 1020 +++ video/csputils.h | 290 + video/cuda.c | 44 + video/d3d.c | 273 + video/d3d.h | 42 + video/decode/vd_lavc.c | 1457 ++++ video/drmprime.c | 43 + video/filter/refqueue.c | 356 + video/filter/refqueue.h | 39 + video/filter/vf_d3d11vpp.c | 506 ++ video/filter/vf_fingerprint.c | 229 + video/filter/vf_format.c | 245 + video/filter/vf_gpu.c | 373 + video/filter/vf_sub.c | 164 + video/filter/vf_vapoursynth.c | 892 +++ video/filter/vf_vavpp.c | 503 ++ video/filter/vf_vdpaupp.c | 195 + video/fmt-conversion.c | 112 + video/fmt-conversion.h | 26 + video/hwdec.c | 140 + video/hwdec.h | 108 + video/image_loader.c | 48 + video/image_loader.h | 9 + video/image_writer.c | 757 ++ video/image_writer.h | 74 + video/img_format.c | 824 +++ video/img_format.h | 342 + video/mp_image.c | 1289 ++++ video/mp_image.h | 203 + video/mp_image_pool.c | 472 ++ video/mp_image_pool.h | 47 + video/out/android_common.c | 99 + video/out/android_common.h | 29 + video/out/aspect.c | 216 + video/out/aspect.h | 33 + video/out/bitmap_packer.c | 197 + video/out/bitmap_packer.h | 51 + video/out/cocoa_cb_common.swift | 230 + video/out/d3d11/context.c | 566 ++ video/out/d3d11/context.h | 9 + video/out/d3d11/hwdec_d3d11va.c | 258 + video/out/d3d11/hwdec_dxva2dxgi.c | 478 ++ video/out/d3d11/ra_d3d11.c | 2544 +++++++ video/out/d3d11/ra_d3d11.h | 47 + video/out/dither.c | 175 + video/out/dither.h | 2 + video/out/dr_helper.c | 162 + video/out/dr_helper.h | 37 + video/out/drm_atomic.c | 458 ++ video/out/drm_atomic.h | 100 + video/out/drm_common.c | 1289 ++++ video/out/drm_common.h | 108 + video/out/drm_prime.c | 160 + video/out/drm_prime.h | 45 + video/out/filter_kernels.c | 411 ++ video/out/filter_kernels.h | 56 + video/out/gpu/context.c | 277 + video/out/gpu/context.h | 107 + video/out/gpu/d3d11_helpers.c | 966 +++ video/out/gpu/d3d11_helpers.h | 103 + video/out/gpu/error_diffusion.c | 316 + video/out/gpu/error_diffusion.h | 48 + video/out/gpu/hwdec.c | 358 + video/out/gpu/hwdec.h | 156 + video/out/gpu/lcms.c | 526 ++ video/out/gpu/lcms.h | 61 + video/out/gpu/libmpv_gpu.c | 248 + video/out/gpu/libmpv_gpu.h | 40 + video/out/gpu/osd.c | 363 + video/out/gpu/osd.h | 25 + video/out/gpu/ra.c | 424 ++ video/out/gpu/ra.h | 559 ++ video/out/gpu/shader_cache.c | 1056 +++ video/out/gpu/shader_cache.h | 66 + video/out/gpu/spirv.c | 70 + video/out/gpu/spirv.h | 41 + video/out/gpu/spirv_shaderc.c | 125 + video/out/gpu/user_shaders.c | 463 ++ video/out/gpu/user_shaders.h | 99 + video/out/gpu/utils.c | 349 + video/out/gpu/utils.h | 108 + video/out/gpu/video.c | 4364 ++++++++++++ video/out/gpu/video.h | 238 + video/out/gpu/video_shaders.c | 1033 +++ video/out/gpu/video_shaders.h | 59 + video/out/gpu_next/context.c | 240 + video/out/gpu_next/context.h | 40 + video/out/hwdec/dmabuf_interop.h | 57 + video/out/hwdec/dmabuf_interop_gl.c | 311 + video/out/hwdec/dmabuf_interop_pl.c | 138 + video/out/hwdec/dmabuf_interop_wl.c | 83 + video/out/hwdec/hwdec_aimagereader.c | 402 ++ video/out/hwdec/hwdec_cuda.c | 286 + video/out/hwdec/hwdec_cuda.h | 59 + video/out/hwdec/hwdec_cuda_gl.c | 174 + video/out/hwdec/hwdec_cuda_vk.c | 344 + video/out/hwdec/hwdec_drmprime.c | 294 + video/out/hwdec/hwdec_drmprime_overlay.c | 334 + video/out/hwdec/hwdec_ios_gl.m | 222 + video/out/hwdec/hwdec_mac_gl.c | 169 + video/out/hwdec/hwdec_vaapi.c | 557 ++ video/out/hwdec/hwdec_vt.c | 141 + video/out/hwdec/hwdec_vt.h | 63 + video/out/hwdec/hwdec_vt_pl.m | 312 + video/out/hwdec/hwdec_vulkan.c | 333 + video/out/libmpv.h | 83 + video/out/libmpv_sw.c | 208 + video/out/mac/common.swift | 691 ++ video/out/mac/gl_layer.swift | 322 + video/out/mac/metal_layer.swift | 43 + video/out/mac/title_bar.swift | 229 + video/out/mac/view.swift | 297 + video/out/mac/window.swift | 593 ++ video/out/mac_common.swift | 174 + video/out/meson.build | 51 + video/out/opengl/angle_dynamic.c | 39 + video/out/opengl/angle_dynamic.h | 89 + video/out/opengl/common.c | 694 ++ video/out/opengl/common.h | 258 + video/out/opengl/context.c | 324 + video/out/opengl/context.h | 58 + video/out/opengl/context_android.c | 130 + video/out/opengl/context_angle.c | 653 ++ video/out/opengl/context_drm_egl.c | 744 ++ video/out/opengl/context_dxinterop.c | 605 ++ video/out/opengl/context_glx.c | 351 + video/out/opengl/context_rpi.c | 327 + video/out/opengl/context_wayland.c | 230 + video/out/opengl/context_win.c | 378 + video/out/opengl/context_x11egl.c | 225 + video/out/opengl/egl_helpers.c | 381 + video/out/opengl/egl_helpers.h | 38 + video/out/opengl/formats.c | 196 + video/out/opengl/formats.h | 51 + video/out/opengl/gl_headers.h | 799 +++ video/out/opengl/hwdec_d3d11egl.c | 363 + video/out/opengl/hwdec_dxva2egl.c | 384 + video/out/opengl/hwdec_dxva2gldx.c | 247 + video/out/opengl/hwdec_rpi.c | 384 + video/out/opengl/hwdec_vdpau.c | 251 + video/out/opengl/libmpv_gl.c | 114 + video/out/opengl/ra_gl.c | 1208 ++++ video/out/opengl/ra_gl.h | 17 + video/out/opengl/utils.c | 282 + video/out/opengl/utils.h | 57 + video/out/placebo/ra_pl.c | 677 ++ video/out/placebo/ra_pl.h | 16 + video/out/placebo/utils.c | 263 + video/out/placebo/utils.h | 41 + video/out/present_sync.c | 126 + video/out/present_sync.h | 57 + video/out/vo.c | 1441 ++++ video/out/vo.h | 544 ++ video/out/vo_caca.c | 314 + video/out/vo_direct3d.c | 1247 ++++ video/out/vo_dmabuf_wayland.c | 872 +++ video/out/vo_drm.c | 458 ++ video/out/vo_gpu.c | 336 + video/out/vo_gpu_next.c | 2104 ++++++ video/out/vo_image.c | 165 + video/out/vo_kitty.c | 433 ++ video/out/vo_lavc.c | 262 + video/out/vo_libmpv.c | 748 ++ video/out/vo_mediacodec_embed.c | 127 + video/out/vo_null.c | 104 + video/out/vo_rpi.c | 938 +++ video/out/vo_sdl.c | 992 +++ video/out/vo_sixel.c | 627 ++ video/out/vo_tct.c | 347 + video/out/vo_vaapi.c | 877 +++ video/out/vo_vdpau.c | 1139 +++ video/out/vo_wlshm.c | 324 + video/out/vo_x11.c | 447 ++ video/out/vo_xv.c | 921 +++ video/out/vulkan/common.h | 40 + video/out/vulkan/context.c | 372 + video/out/vulkan/context.h | 31 + video/out/vulkan/context_android.c | 96 + video/out/vulkan/context_display.c | 491 ++ video/out/vulkan/context_mac.m | 119 + video/out/vulkan/context_wayland.c | 167 + video/out/vulkan/context_win.c | 106 + video/out/vulkan/context_xlib.c | 143 + video/out/vulkan/utils.c | 42 + video/out/vulkan/utils.h | 6 + video/out/w32_common.c | 2144 ++++++ video/out/w32_common.h | 36 + video/out/wayland_common.c | 2629 +++++++ video/out/wayland_common.h | 189 + video/out/win32/displayconfig.c | 140 + video/out/win32/displayconfig.h | 27 + video/out/win32/droptarget.c | 227 + video/out/win32/droptarget.h | 35 + video/out/win_state.c | 155 + video/out/win_state.h | 35 + video/out/wldmabuf/context_wldmabuf.c | 43 + video/out/wldmabuf/ra_wldmabuf.c | 66 + video/out/wldmabuf/ra_wldmabuf.h | 23 + video/out/x11_common.c | 2291 ++++++ video/out/x11_common.h | 164 + video/repack.c | 1203 ++++ video/repack.h | 76 + video/sws_utils.c | 496 ++ video/sws_utils.h | 82 + video/vaapi.c | 288 + video/vaapi.h | 54 + video/vdpau.c | 574 ++ video/vdpau.h | 109 + video/vdpau_functions.inc | 50 + video/vdpau_mixer.c | 306 + video/vdpau_mixer.h | 61 + video/zimg.c | 730 ++ video/zimg.h | 73 + 740 files changed, 246282 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/ISSUE_TEMPLATE/1_dont_ignore.md create mode 100644 .github/ISSUE_TEMPLATE/2_bug_report_linux.md create mode 100644 .github/ISSUE_TEMPLATE/2_bug_report_macos.md create mode 100644 .github/ISSUE_TEMPLATE/2_bug_report_windows.md create mode 100644 .github/ISSUE_TEMPLATE/3_bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/4_bug_report_build.md create mode 100644 .github/ISSUE_TEMPLATE/5_feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/6_question.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/comment.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .gitignore create mode 100644 Copyright create mode 100644 DOCS/client-api-changes.rst create mode 100644 DOCS/compatibility.rst create mode 100644 DOCS/compile-windows.md create mode 100644 DOCS/contribute.md create mode 100644 DOCS/edl-mpv.rst create mode 100644 DOCS/encoding.rst create mode 100644 DOCS/interface-changes.rst create mode 100644 DOCS/man/af.rst create mode 100644 DOCS/man/ao.rst create mode 100644 DOCS/man/changes.rst create mode 100644 DOCS/man/console.rst create mode 100644 DOCS/man/encode.rst create mode 100644 DOCS/man/input.rst create mode 100644 DOCS/man/ipc.rst create mode 100644 DOCS/man/javascript.rst create mode 100644 DOCS/man/libmpv.rst create mode 100644 DOCS/man/lua.rst create mode 100644 DOCS/man/mpv.rst create mode 100644 DOCS/man/options.rst create mode 100644 DOCS/man/osc.rst create mode 100644 DOCS/man/stats.rst create mode 100644 DOCS/man/vf.rst create mode 100644 DOCS/man/vo.rst create mode 100644 DOCS/mplayer-changes.rst create mode 100644 DOCS/release-policy.md create mode 100644 DOCS/tech-overview.txt create mode 100644 LICENSE.GPL create mode 100644 LICENSE.LGPL create mode 100644 README.md create mode 100644 RELEASE_NOTES create mode 100755 TOOLS/docutils-wrapper.py create mode 100755 TOOLS/dylib-unhell.py create mode 100755 TOOLS/file2string.py create mode 100755 TOOLS/gen-osd-font.sh create mode 100755 TOOLS/idet.sh create mode 100644 TOOLS/lua/README.md create mode 100644 TOOLS/lua/acompressor.lua create mode 100644 TOOLS/lua/ao-null-reload.lua create mode 100644 TOOLS/lua/audio-hotplug-test.lua create mode 100644 TOOLS/lua/autocrop.lua create mode 100644 TOOLS/lua/autodeint.lua create mode 100644 TOOLS/lua/autoload.lua create mode 100644 TOOLS/lua/command-test.lua create mode 100644 TOOLS/lua/cycle-deinterlace-pullup.lua create mode 100644 TOOLS/lua/nan-test.lua create mode 100644 TOOLS/lua/observe-all.lua create mode 100644 TOOLS/lua/ontop-playback.lua create mode 100644 TOOLS/lua/osd-test.lua create mode 100644 TOOLS/lua/pause-when-minimize.lua create mode 100644 TOOLS/lua/skip-logo.lua create mode 100644 TOOLS/lua/status-line.lua create mode 100644 TOOLS/lua/test-hooks.lua create mode 100755 TOOLS/macos-sdk-version.py create mode 100755 TOOLS/macos-swift-lib-directory.py create mode 100755 TOOLS/matroska.py create mode 100644 TOOLS/mpv-osd-symbols.sfdir/.notdef.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/font.props create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE001.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE002.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE003.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE004.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE005.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE006.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE007.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE008.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE009.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE00A.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE00B.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE010.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE011.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE012.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE013.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE101.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE104.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE105.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE106.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE107.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE108.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE109.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE10A.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE10B.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE10C.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE10D.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE10E.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE110.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE111.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE112.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE113.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE114.glyph create mode 100644 TOOLS/mpv-osd-symbols.sfdir/uniE115.glyph create mode 100755 TOOLS/mpv_identify.sh create mode 100755 TOOLS/osxbundle.py create mode 100644 TOOLS/osxbundle/meson.build create mode 100644 TOOLS/osxbundle/mpv.app/Contents/Info.plist create mode 100644 TOOLS/osxbundle/mpv.app/Contents/MacOS/.gitkeep create mode 100644 TOOLS/osxbundle/mpv.app/Contents/MacOS/lib/.gitkeep create mode 100644 TOOLS/osxbundle/mpv.app/Contents/PkgInfo create mode 100644 TOOLS/osxbundle/mpv.app/Contents/Resources/document.icns create mode 100644 TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns create mode 100644 TOOLS/osxbundle/mpv.app/Contents/Resources/mpv.conf create mode 100755 TOOLS/stats-conv.py create mode 100755 TOOLS/umpv create mode 100644 TOOLS/uncrustify.cfg create mode 100644 VERSION create mode 100644 audio/aframe.c create mode 100644 audio/aframe.h create mode 100644 audio/chmap.c create mode 100644 audio/chmap.h create mode 100644 audio/chmap_avchannel.c create mode 100644 audio/chmap_avchannel.h create mode 100644 audio/chmap_sel.c create mode 100644 audio/chmap_sel.h create mode 100644 audio/decode/ad_lavc.c create mode 100644 audio/decode/ad_spdif.c create mode 100644 audio/filter/af_drop.c create mode 100644 audio/filter/af_format.c create mode 100644 audio/filter/af_lavcac3enc.c create mode 100644 audio/filter/af_rubberband.c create mode 100644 audio/filter/af_scaletempo.c create mode 100644 audio/filter/af_scaletempo2.c create mode 100644 audio/filter/af_scaletempo2_internals.c create mode 100644 audio/filter/af_scaletempo2_internals.h create mode 100644 audio/fmt-conversion.c create mode 100644 audio/fmt-conversion.h create mode 100644 audio/format.c create mode 100644 audio/format.h create mode 100644 audio/out/ao.c create mode 100644 audio/out/ao.h create mode 100644 audio/out/ao_alsa.c create mode 100644 audio/out/ao_audiotrack.c create mode 100644 audio/out/ao_audiounit.m create mode 100644 audio/out/ao_coreaudio.c create mode 100644 audio/out/ao_coreaudio_chmap.c create mode 100644 audio/out/ao_coreaudio_chmap.h create mode 100644 audio/out/ao_coreaudio_exclusive.c create mode 100644 audio/out/ao_coreaudio_properties.c create mode 100644 audio/out/ao_coreaudio_properties.h create mode 100644 audio/out/ao_coreaudio_utils.c create mode 100644 audio/out/ao_coreaudio_utils.h create mode 100644 audio/out/ao_jack.c create mode 100644 audio/out/ao_lavc.c create mode 100644 audio/out/ao_null.c create mode 100644 audio/out/ao_openal.c create mode 100644 audio/out/ao_opensles.c create mode 100644 audio/out/ao_oss.c create mode 100644 audio/out/ao_pcm.c create mode 100644 audio/out/ao_pipewire.c create mode 100644 audio/out/ao_pulse.c create mode 100644 audio/out/ao_sdl.c create mode 100644 audio/out/ao_sndio.c create mode 100644 audio/out/ao_wasapi.c create mode 100644 audio/out/ao_wasapi.h create mode 100644 audio/out/ao_wasapi_changenotify.c create mode 100644 audio/out/ao_wasapi_utils.c create mode 100644 audio/out/buffer.c create mode 100644 audio/out/internal.h create mode 100755 ci/build-freebsd.sh create mode 100755 ci/build-macos.sh create mode 100755 ci/build-mingw64.sh create mode 100755 ci/build-msys2.sh create mode 100755 ci/build-tumbleweed.sh create mode 100755 ci/lint-commit-msg.py create mode 100644 common/av_common.c create mode 100644 common/av_common.h create mode 100644 common/av_log.c create mode 100644 common/av_log.h create mode 100644 common/codecs.c create mode 100644 common/codecs.h create mode 100644 common/common.c create mode 100644 common/common.h create mode 100644 common/encode.h create mode 100644 common/encode_lavc.c create mode 100644 common/encode_lavc.h create mode 100644 common/global.h create mode 100644 common/meson.build create mode 100644 common/msg.c create mode 100644 common/msg.h create mode 100644 common/msg_control.h create mode 100644 common/playlist.c create mode 100644 common/playlist.h create mode 100644 common/recorder.c create mode 100644 common/recorder.h create mode 100644 common/stats.c create mode 100644 common/stats.h create mode 100644 common/tags.c create mode 100644 common/tags.h create mode 100644 common/version.c create mode 100644 common/version.h.in create mode 100644 demux/cache.c create mode 100644 demux/cache.h create mode 100644 demux/codec_tags.c create mode 100644 demux/codec_tags.h create mode 100644 demux/cue.c create mode 100644 demux/cue.h create mode 100644 demux/demux.c create mode 100644 demux/demux.h create mode 100644 demux/demux_cue.c create mode 100644 demux/demux_disc.c create mode 100644 demux/demux_edl.c create mode 100644 demux/demux_lavf.c create mode 100644 demux/demux_libarchive.c create mode 100644 demux/demux_mf.c create mode 100644 demux/demux_mkv.c create mode 100644 demux/demux_mkv_timeline.c create mode 100644 demux/demux_null.c create mode 100644 demux/demux_playlist.c create mode 100644 demux/demux_raw.c create mode 100644 demux/demux_timeline.c create mode 100644 demux/ebml.c create mode 100644 demux/ebml.h create mode 100644 demux/matroska.h create mode 100644 demux/packet.c create mode 100644 demux/packet.h create mode 100644 demux/stheader.h create mode 100644 demux/timeline.c create mode 100644 demux/timeline.h create mode 100644 etc/_mpv.zsh create mode 100644 etc/builtin.conf create mode 100644 etc/encoding-profiles.conf create mode 100644 etc/input.conf create mode 100644 etc/meson.build create mode 100644 etc/mplayer-input.conf create mode 100644 etc/mpv-gradient.svg create mode 100644 etc/mpv-icon-8bit-128x128.png create mode 100644 etc/mpv-icon-8bit-16x16.png create mode 100644 etc/mpv-icon-8bit-32x32.png create mode 100644 etc/mpv-icon-8bit-64x64.png create mode 100644 etc/mpv-icon.ico create mode 100644 etc/mpv-symbolic.svg create mode 100644 etc/mpv.bash-completion create mode 100644 etc/mpv.conf create mode 100644 etc/mpv.desktop create mode 100644 etc/mpv.metainfo.xml create mode 100644 etc/mpv.svg create mode 100644 etc/restore-old-bindings.conf create mode 100644 filters/f_async_queue.c create mode 100644 filters/f_async_queue.h create mode 100644 filters/f_auto_filters.c create mode 100644 filters/f_auto_filters.h create mode 100644 filters/f_autoconvert.c create mode 100644 filters/f_autoconvert.h create mode 100644 filters/f_decoder_wrapper.c create mode 100644 filters/f_decoder_wrapper.h create mode 100644 filters/f_demux_in.c create mode 100644 filters/f_demux_in.h create mode 100644 filters/f_hwtransfer.c create mode 100644 filters/f_hwtransfer.h create mode 100644 filters/f_lavfi.c create mode 100644 filters/f_lavfi.h create mode 100644 filters/f_output_chain.c create mode 100644 filters/f_output_chain.h create mode 100644 filters/f_swresample.c create mode 100644 filters/f_swresample.h create mode 100644 filters/f_swscale.c create mode 100644 filters/f_swscale.h create mode 100644 filters/f_utils.c create mode 100644 filters/f_utils.h create mode 100644 filters/filter.c create mode 100644 filters/filter.h create mode 100644 filters/filter_internal.h create mode 100644 filters/frame.c create mode 100644 filters/frame.h create mode 100644 filters/user_filters.c create mode 100644 filters/user_filters.h create mode 100644 input/cmd.c create mode 100644 input/cmd.h create mode 100644 input/event.c create mode 100644 input/event.h create mode 100644 input/input.c create mode 100644 input/input.h create mode 100644 input/ipc-dummy.c create mode 100644 input/ipc-unix.c create mode 100644 input/ipc-win.c create mode 100644 input/ipc.c create mode 100644 input/keycodes.c create mode 100644 input/keycodes.h create mode 100644 input/meson.build create mode 100644 input/sdl_gamepad.c create mode 100644 libmpv/client.h create mode 100644 libmpv/render.h create mode 100644 libmpv/render_gl.h create mode 100644 libmpv/stream_cb.h create mode 100644 meson.build create mode 100644 meson_options.txt create mode 100644 misc/bstr.c create mode 100644 misc/bstr.h create mode 100644 misc/charset_conv.c create mode 100644 misc/charset_conv.h create mode 100644 misc/ctype.h create mode 100644 misc/dispatch.c create mode 100644 misc/dispatch.h create mode 100644 misc/jni.c create mode 100644 misc/jni.h create mode 100644 misc/json.c create mode 100644 misc/json.h create mode 100644 misc/language.c create mode 100644 misc/language.h create mode 100644 misc/linked_list.h create mode 100644 misc/natural_sort.c create mode 100644 misc/natural_sort.h create mode 100644 misc/node.c create mode 100644 misc/node.h create mode 100644 misc/random.c create mode 100644 misc/random.h create mode 100644 misc/rendezvous.c create mode 100644 misc/rendezvous.h create mode 100644 misc/thread_pool.c create mode 100644 misc/thread_pool.h create mode 100644 misc/thread_tools.c create mode 100644 misc/thread_tools.h create mode 100644 misc/uuid.c create mode 100644 misc/uuid.h create mode 100644 mpv_talloc.h create mode 100644 options/m_config.h create mode 100644 options/m_config_core.c create mode 100644 options/m_config_core.h create mode 100644 options/m_config_frontend.c create mode 100644 options/m_config_frontend.h create mode 100644 options/m_option.c create mode 100644 options/m_option.h create mode 100644 options/m_property.c create mode 100644 options/m_property.h create mode 100644 options/options.c create mode 100644 options/options.h create mode 100644 options/parse_commandline.c create mode 100644 options/parse_commandline.h create mode 100644 options/parse_configfile.c create mode 100644 options/parse_configfile.h create mode 100644 options/path.c create mode 100644 options/path.h create mode 100644 osdep/android/strnlen.c create mode 100644 osdep/android/strnlen.h create mode 100644 osdep/apple_utils.c create mode 100644 osdep/apple_utils.h create mode 100644 osdep/compiler.h create mode 100644 osdep/endian.h create mode 100644 osdep/getpid.h create mode 100644 osdep/glob-win.c create mode 100644 osdep/io.c create mode 100644 osdep/io.h create mode 100644 osdep/language-apple.c create mode 100644 osdep/language-posix.c create mode 100644 osdep/language-win.c create mode 100644 osdep/macOS_swift_bridge.h create mode 100644 osdep/macos/libmpv_helper.swift create mode 100644 osdep/macos/log_helper.swift create mode 100644 osdep/macos/mpv_helper.swift create mode 100644 osdep/macos/precise_timer.swift create mode 100644 osdep/macos/remote_command_center.swift create mode 100644 osdep/macos/swift_compat.swift create mode 100644 osdep/macos/swift_extensions.swift create mode 100644 osdep/macosx_application.h create mode 100644 osdep/macosx_application.m create mode 100644 osdep/macosx_application_objc.h create mode 100644 osdep/macosx_events.h create mode 100644 osdep/macosx_events.m create mode 100644 osdep/macosx_events_objc.h create mode 100644 osdep/macosx_menubar.h create mode 100644 osdep/macosx_menubar.m create mode 100644 osdep/macosx_menubar_objc.h create mode 100644 osdep/macosx_touchbar.h create mode 100644 osdep/macosx_touchbar.m create mode 100644 osdep/main-fn-cocoa.c create mode 100644 osdep/main-fn-unix.c create mode 100644 osdep/main-fn-win.c create mode 100644 osdep/main-fn.h create mode 100644 osdep/meson.build create mode 100644 osdep/mpv.exe.manifest create mode 100644 osdep/mpv.rc create mode 100644 osdep/path-darwin.c create mode 100644 osdep/path-macosx.m create mode 100644 osdep/path-unix.c create mode 100644 osdep/path-uwp.c create mode 100644 osdep/path-win.c create mode 100644 osdep/path.h create mode 100644 osdep/poll_wrapper.c create mode 100644 osdep/poll_wrapper.h create mode 100644 osdep/semaphore.h create mode 100644 osdep/semaphore_osx.c create mode 100644 osdep/strnlen.h create mode 100644 osdep/subprocess-dummy.c create mode 100644 osdep/subprocess-posix.c create mode 100644 osdep/subprocess-win.c create mode 100644 osdep/subprocess.c create mode 100644 osdep/subprocess.h create mode 100644 osdep/terminal-dummy.c create mode 100644 osdep/terminal-unix.c create mode 100644 osdep/terminal-win.c create mode 100644 osdep/terminal.h create mode 100644 osdep/threads-posix.c create mode 100644 osdep/threads-posix.h create mode 100644 osdep/threads-win32.h create mode 100644 osdep/threads.h create mode 100644 osdep/timer-darwin.c create mode 100644 osdep/timer-linux.c create mode 100644 osdep/timer-win32.c create mode 100644 osdep/timer.c create mode 100644 osdep/timer.h create mode 100644 osdep/w32_keyboard.c create mode 100644 osdep/w32_keyboard.h create mode 100644 osdep/win32-console-wrapper.c create mode 100644 osdep/windows_utils.c create mode 100644 osdep/windows_utils.h create mode 100644 player/audio.c create mode 100644 player/client.c create mode 100644 player/client.h create mode 100644 player/command.c create mode 100644 player/command.h create mode 100644 player/configfiles.c create mode 100644 player/core.h create mode 100644 player/external_files.c create mode 100644 player/external_files.h create mode 100644 player/javascript.c create mode 100644 player/javascript/defaults.js create mode 100644 player/javascript/meson.build create mode 100644 player/loadfile.c create mode 100644 player/lua.c create mode 100644 player/lua/assdraw.lua create mode 100644 player/lua/auto_profiles.lua create mode 100644 player/lua/console.lua create mode 100644 player/lua/defaults.lua create mode 100644 player/lua/meson.build create mode 100644 player/lua/options.lua create mode 100644 player/lua/osc.lua create mode 100644 player/lua/stats.lua create mode 100644 player/lua/ytdl_hook.lua create mode 100644 player/main.c create mode 100644 player/meson.build create mode 100644 player/misc.c create mode 100644 player/osd.c create mode 100644 player/playloop.c create mode 100644 player/screenshot.c create mode 100644 player/screenshot.h create mode 100644 player/scripting.c create mode 100644 player/sub.c create mode 100644 player/video.c create mode 100644 stream/cookies.c create mode 100644 stream/cookies.h create mode 100644 stream/dvb_tune.c create mode 100644 stream/dvb_tune.h create mode 100644 stream/dvbin.h create mode 100644 stream/stream.c create mode 100644 stream/stream.h create mode 100644 stream/stream_avdevice.c create mode 100644 stream/stream_bluray.c create mode 100644 stream/stream_cb.c create mode 100644 stream/stream_cdda.c create mode 100644 stream/stream_concat.c create mode 100644 stream/stream_dvb.c create mode 100644 stream/stream_dvdnav.c create mode 100644 stream/stream_edl.c create mode 100644 stream/stream_file.c create mode 100644 stream/stream_lavf.c create mode 100644 stream/stream_libarchive.c create mode 100644 stream/stream_libarchive.h create mode 100644 stream/stream_memory.c create mode 100644 stream/stream_mf.c create mode 100644 stream/stream_null.c create mode 100644 stream/stream_slice.c create mode 100644 sub/ass_mp.c create mode 100644 sub/ass_mp.h create mode 100644 sub/dec_sub.c create mode 100644 sub/dec_sub.h create mode 100644 sub/draw_bmp.c create mode 100644 sub/draw_bmp.h create mode 100644 sub/filter_jsre.c create mode 100644 sub/filter_regex.c create mode 100644 sub/filter_sdh.c create mode 100644 sub/img_convert.c create mode 100644 sub/img_convert.h create mode 100644 sub/lavc_conv.c create mode 100644 sub/meson.build create mode 100644 sub/osd.c create mode 100644 sub/osd.h create mode 100644 sub/osd_font.otf create mode 100644 sub/osd_libass.c create mode 100644 sub/osd_state.h create mode 100644 sub/sd.h create mode 100644 sub/sd_ass.c create mode 100644 sub/sd_lavc.c create mode 100644 ta/README create mode 100644 ta/ta.c create mode 100644 ta/ta.h create mode 100644 ta/ta_talloc.c create mode 100644 ta/ta_talloc.h create mode 100644 ta/ta_utils.c create mode 100644 test/chmap.c create mode 100644 test/gl_video.c create mode 100644 test/img_format.c create mode 100644 test/img_utils.c create mode 100644 test/img_utils.h create mode 100644 test/json.c create mode 100644 test/libmpv_test.c create mode 100644 test/linked_list.c create mode 100644 test/meson.build create mode 100644 test/paths.c create mode 100644 test/ref/draw_bmp.txt create mode 100644 test/ref/img_formats.txt create mode 100644 test/ref/repack.txt create mode 100644 test/ref/repack_sws.log create mode 100644 test/ref/repack_zimg.log create mode 100644 test/ref/zimg_formats.txt create mode 100644 test/repack.c create mode 100644 test/scale_sws.c create mode 100644 test/scale_test.c create mode 100644 test/scale_test.h create mode 100644 test/scale_zimg.c create mode 100644 test/test_utils.c create mode 100644 test/test_utils.h create mode 100644 test/timer.c create mode 100644 video/csputils.c create mode 100644 video/csputils.h create mode 100644 video/cuda.c create mode 100644 video/d3d.c create mode 100644 video/d3d.h create mode 100644 video/decode/vd_lavc.c create mode 100644 video/drmprime.c create mode 100644 video/filter/refqueue.c create mode 100644 video/filter/refqueue.h create mode 100644 video/filter/vf_d3d11vpp.c create mode 100644 video/filter/vf_fingerprint.c create mode 100644 video/filter/vf_format.c create mode 100644 video/filter/vf_gpu.c create mode 100644 video/filter/vf_sub.c create mode 100644 video/filter/vf_vapoursynth.c create mode 100644 video/filter/vf_vavpp.c create mode 100644 video/filter/vf_vdpaupp.c create mode 100644 video/fmt-conversion.c create mode 100644 video/fmt-conversion.h create mode 100644 video/hwdec.c create mode 100644 video/hwdec.h create mode 100644 video/image_loader.c create mode 100644 video/image_loader.h create mode 100644 video/image_writer.c create mode 100644 video/image_writer.h create mode 100644 video/img_format.c create mode 100644 video/img_format.h create mode 100644 video/mp_image.c create mode 100644 video/mp_image.h create mode 100644 video/mp_image_pool.c create mode 100644 video/mp_image_pool.h create mode 100644 video/out/android_common.c create mode 100644 video/out/android_common.h create mode 100644 video/out/aspect.c create mode 100644 video/out/aspect.h create mode 100644 video/out/bitmap_packer.c create mode 100644 video/out/bitmap_packer.h create mode 100644 video/out/cocoa_cb_common.swift create mode 100644 video/out/d3d11/context.c create mode 100644 video/out/d3d11/context.h create mode 100644 video/out/d3d11/hwdec_d3d11va.c create mode 100644 video/out/d3d11/hwdec_dxva2dxgi.c create mode 100644 video/out/d3d11/ra_d3d11.c create mode 100644 video/out/d3d11/ra_d3d11.h create mode 100644 video/out/dither.c create mode 100644 video/out/dither.h create mode 100644 video/out/dr_helper.c create mode 100644 video/out/dr_helper.h create mode 100644 video/out/drm_atomic.c create mode 100644 video/out/drm_atomic.h create mode 100644 video/out/drm_common.c create mode 100644 video/out/drm_common.h create mode 100644 video/out/drm_prime.c create mode 100644 video/out/drm_prime.h create mode 100644 video/out/filter_kernels.c create mode 100644 video/out/filter_kernels.h create mode 100644 video/out/gpu/context.c create mode 100644 video/out/gpu/context.h create mode 100644 video/out/gpu/d3d11_helpers.c create mode 100644 video/out/gpu/d3d11_helpers.h create mode 100644 video/out/gpu/error_diffusion.c create mode 100644 video/out/gpu/error_diffusion.h create mode 100644 video/out/gpu/hwdec.c create mode 100644 video/out/gpu/hwdec.h create mode 100644 video/out/gpu/lcms.c create mode 100644 video/out/gpu/lcms.h create mode 100644 video/out/gpu/libmpv_gpu.c create mode 100644 video/out/gpu/libmpv_gpu.h create mode 100644 video/out/gpu/osd.c create mode 100644 video/out/gpu/osd.h create mode 100644 video/out/gpu/ra.c create mode 100644 video/out/gpu/ra.h create mode 100644 video/out/gpu/shader_cache.c create mode 100644 video/out/gpu/shader_cache.h create mode 100644 video/out/gpu/spirv.c create mode 100644 video/out/gpu/spirv.h create mode 100644 video/out/gpu/spirv_shaderc.c create mode 100644 video/out/gpu/user_shaders.c create mode 100644 video/out/gpu/user_shaders.h create mode 100644 video/out/gpu/utils.c create mode 100644 video/out/gpu/utils.h create mode 100644 video/out/gpu/video.c create mode 100644 video/out/gpu/video.h create mode 100644 video/out/gpu/video_shaders.c create mode 100644 video/out/gpu/video_shaders.h create mode 100644 video/out/gpu_next/context.c create mode 100644 video/out/gpu_next/context.h create mode 100644 video/out/hwdec/dmabuf_interop.h create mode 100644 video/out/hwdec/dmabuf_interop_gl.c create mode 100644 video/out/hwdec/dmabuf_interop_pl.c create mode 100644 video/out/hwdec/dmabuf_interop_wl.c create mode 100644 video/out/hwdec/hwdec_aimagereader.c create mode 100644 video/out/hwdec/hwdec_cuda.c create mode 100644 video/out/hwdec/hwdec_cuda.h create mode 100644 video/out/hwdec/hwdec_cuda_gl.c create mode 100644 video/out/hwdec/hwdec_cuda_vk.c create mode 100644 video/out/hwdec/hwdec_drmprime.c create mode 100644 video/out/hwdec/hwdec_drmprime_overlay.c create mode 100644 video/out/hwdec/hwdec_ios_gl.m create mode 100644 video/out/hwdec/hwdec_mac_gl.c create mode 100644 video/out/hwdec/hwdec_vaapi.c create mode 100644 video/out/hwdec/hwdec_vt.c create mode 100644 video/out/hwdec/hwdec_vt.h create mode 100644 video/out/hwdec/hwdec_vt_pl.m create mode 100644 video/out/hwdec/hwdec_vulkan.c create mode 100644 video/out/libmpv.h create mode 100644 video/out/libmpv_sw.c create mode 100644 video/out/mac/common.swift create mode 100644 video/out/mac/gl_layer.swift create mode 100644 video/out/mac/metal_layer.swift create mode 100644 video/out/mac/title_bar.swift create mode 100644 video/out/mac/view.swift create mode 100644 video/out/mac/window.swift create mode 100644 video/out/mac_common.swift create mode 100644 video/out/meson.build create mode 100644 video/out/opengl/angle_dynamic.c create mode 100644 video/out/opengl/angle_dynamic.h create mode 100644 video/out/opengl/common.c create mode 100644 video/out/opengl/common.h create mode 100644 video/out/opengl/context.c create mode 100644 video/out/opengl/context.h create mode 100644 video/out/opengl/context_android.c create mode 100644 video/out/opengl/context_angle.c create mode 100644 video/out/opengl/context_drm_egl.c create mode 100644 video/out/opengl/context_dxinterop.c create mode 100644 video/out/opengl/context_glx.c create mode 100644 video/out/opengl/context_rpi.c create mode 100644 video/out/opengl/context_wayland.c create mode 100644 video/out/opengl/context_win.c create mode 100644 video/out/opengl/context_x11egl.c create mode 100644 video/out/opengl/egl_helpers.c create mode 100644 video/out/opengl/egl_helpers.h create mode 100644 video/out/opengl/formats.c create mode 100644 video/out/opengl/formats.h create mode 100644 video/out/opengl/gl_headers.h create mode 100644 video/out/opengl/hwdec_d3d11egl.c create mode 100644 video/out/opengl/hwdec_dxva2egl.c create mode 100644 video/out/opengl/hwdec_dxva2gldx.c create mode 100644 video/out/opengl/hwdec_rpi.c create mode 100644 video/out/opengl/hwdec_vdpau.c create mode 100644 video/out/opengl/libmpv_gl.c create mode 100644 video/out/opengl/ra_gl.c create mode 100644 video/out/opengl/ra_gl.h create mode 100644 video/out/opengl/utils.c create mode 100644 video/out/opengl/utils.h create mode 100644 video/out/placebo/ra_pl.c create mode 100644 video/out/placebo/ra_pl.h create mode 100644 video/out/placebo/utils.c create mode 100644 video/out/placebo/utils.h create mode 100644 video/out/present_sync.c create mode 100644 video/out/present_sync.h create mode 100644 video/out/vo.c create mode 100644 video/out/vo.h create mode 100644 video/out/vo_caca.c create mode 100644 video/out/vo_direct3d.c create mode 100644 video/out/vo_dmabuf_wayland.c create mode 100644 video/out/vo_drm.c create mode 100644 video/out/vo_gpu.c create mode 100644 video/out/vo_gpu_next.c create mode 100644 video/out/vo_image.c create mode 100644 video/out/vo_kitty.c create mode 100644 video/out/vo_lavc.c create mode 100644 video/out/vo_libmpv.c create mode 100644 video/out/vo_mediacodec_embed.c create mode 100644 video/out/vo_null.c create mode 100644 video/out/vo_rpi.c create mode 100644 video/out/vo_sdl.c create mode 100644 video/out/vo_sixel.c create mode 100644 video/out/vo_tct.c create mode 100644 video/out/vo_vaapi.c create mode 100644 video/out/vo_vdpau.c create mode 100644 video/out/vo_wlshm.c create mode 100644 video/out/vo_x11.c create mode 100644 video/out/vo_xv.c create mode 100644 video/out/vulkan/common.h create mode 100644 video/out/vulkan/context.c create mode 100644 video/out/vulkan/context.h create mode 100644 video/out/vulkan/context_android.c create mode 100644 video/out/vulkan/context_display.c create mode 100644 video/out/vulkan/context_mac.m create mode 100644 video/out/vulkan/context_wayland.c create mode 100644 video/out/vulkan/context_win.c create mode 100644 video/out/vulkan/context_xlib.c create mode 100644 video/out/vulkan/utils.c create mode 100644 video/out/vulkan/utils.h create mode 100644 video/out/w32_common.c create mode 100644 video/out/w32_common.h create mode 100644 video/out/wayland_common.c create mode 100644 video/out/wayland_common.h create mode 100644 video/out/win32/displayconfig.c create mode 100644 video/out/win32/displayconfig.h create mode 100644 video/out/win32/droptarget.c create mode 100644 video/out/win32/droptarget.h create mode 100644 video/out/win_state.c create mode 100644 video/out/win_state.h create mode 100644 video/out/wldmabuf/context_wldmabuf.c create mode 100644 video/out/wldmabuf/ra_wldmabuf.c create mode 100644 video/out/wldmabuf/ra_wldmabuf.h create mode 100644 video/out/x11_common.c create mode 100644 video/out/x11_common.h create mode 100644 video/repack.c create mode 100644 video/repack.h create mode 100644 video/sws_utils.c create mode 100644 video/sws_utils.h create mode 100644 video/vaapi.c create mode 100644 video/vaapi.h create mode 100644 video/vdpau.c create mode 100644 video/vdpau.h create mode 100644 video/vdpau_functions.inc create mode 100644 video/vdpau_mixer.c create mode 100644 video/vdpau_mixer.h create mode 100644 video/zimg.c create mode 100644 video/zimg.h diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0f4e36d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# To use this config on you editor, follow the instructions at: +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +insert_final_newline = true +indent_style = space +indent_size = 4 +max_line_length = 80 +trim_trailing_whitespace = true + +[.git/COMMIT*] +max_line_length = 72 diff --git a/.github/ISSUE_TEMPLATE/1_dont_ignore.md b/.github/ISSUE_TEMPLATE/1_dont_ignore.md new file mode 100644 index 0000000..578d560 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_dont_ignore.md @@ -0,0 +1,16 @@ +--- +name: 'README: DO NOT IGNORE OR DELETE THE ISSUE TEMPLATE' +about: 'Chose and fill out one of the following templates!' +title: '' +labels: priority:ignored-issue-template +assignees: '' + +--- + +We ask you to not ignore the issue template. Fill it out as good and correct as +possible. Issues that don't adhere to our request will be closed for ignoring +the issue template. This is because analyzing a bug without a log file is harder +than necessary. Low quality bug reports are noise. + +Please go back and chose the proper issue template. Opening issues with this +template will be closed immediately. diff --git a/.github/ISSUE_TEMPLATE/2_bug_report_linux.md b/.github/ISSUE_TEMPLATE/2_bug_report_linux.md new file mode 100644 index 0000000..6faaf85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_bug_report_linux.md @@ -0,0 +1,49 @@ +--- +name: 'Report a Linux Issue' +about: 'Create a report for a runtime related Linux Issue' +title: '' +labels: 'os:linux' +assignees: '' + +--- + +### Important Information + +Provide following Information: +- mpv version +- Linux Distribution and Version +- Source of the mpv binary +- If known which version of mpv introduced the problem +- Window Manager and version +- GPU driver and version +- Possible screenshot or video of visual glitches + +If you're not using git master or the latest release, update. +Releases are listed here: https://github.com/mpv-player/mpv/releases + +### Reproduction steps + +Try to reproduce your issue with --no-config first. If it isn't reproducible +with --no-config try to first find out which option or script causes your issue. + +Describe the reproduction steps as precise as possible. It's very likely that +the bug you experience wasn't reproduced by the developer because the workflow +differs from your own. + +### Expected behavior + +### Actual behavior + +### Log file + +Make a log file made with -v -v or --log-file=output.txt, paste it to +https://0x0.st/ or attach it to the github issue, and replace this text with a +link to it. + +The issue will be closed for ignoring the issue template. + +### Sample files + +Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ +or similar sites. (Only needed if the issue cannot be reproduced without it.) +Do not use garbage like "cloud storage", especially not Google Drive. diff --git a/.github/ISSUE_TEMPLATE/2_bug_report_macos.md b/.github/ISSUE_TEMPLATE/2_bug_report_macos.md new file mode 100644 index 0000000..809ea39 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_bug_report_macos.md @@ -0,0 +1,51 @@ +--- +name: 'Report a macOS Issue' +about: 'Create a report for a runtime related macOS Issue' +title: '' +labels: 'os:mac' +assignees: '' + +--- + +### Important Information + +Provide following Information: +- mpv version +- macOS Version +- Source of the mpv binary or bundle +- If known which version of mpv introduced the problem +- Possible screenshot or video of visual glitches + +If you're not using git master or the latest release, update. +Releases are listed here: https://github.com/mpv-player/mpv/releases + +### Reproduction steps + +Try to reproduce your issue with --no-config first. If it isn't reproducible +with --no-config try to first find out which option or script causes your issue. + +Describe the reproduction steps as precise as possible. It's very likely that +the bug you experience wasn't reproduced by the developer because the workflow +differs from your own. + +### Expected behavior + +### Actual behavior + +### Log file + +Make a log file made with -v -v or --log-file=output.txt. If you use the Bundle +from a version later than 0.32 a default log is created for your last run at +~/Library/Logs/mpv.log. You can jump to that file via the Help > Show log File… +menu. Paste the log to https://0x0.st/ or attach it to the github issue, and +replace this text with a link to it. + +In the case of a crash please provide the macOS Crash Report (Backtrace). + +The issue will be closed for ignoring the issue template. + +### Sample files + +Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ +or similar sites. (Only needed if the issue cannot be reproduced without it.) +Do not use garbage like "cloud storage", especially not Google Drive. diff --git a/.github/ISSUE_TEMPLATE/2_bug_report_windows.md b/.github/ISSUE_TEMPLATE/2_bug_report_windows.md new file mode 100644 index 0000000..b42c385 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_bug_report_windows.md @@ -0,0 +1,47 @@ +--- +name: 'Report a Windows Issue' +about: 'Create a report for a runtime related Windows Issue' +title: '' +labels: 'os:win' +assignees: '' + +--- + +### Important Information + +Provide following Information: +- mpv version +- Windows Version +- Source of the mpv binary +- If known which version of mpv introduced the problem +- Possible screenshot or video of visual glitches + +If you're not using git master or the latest release, update. +Releases are listed here: https://github.com/mpv-player/mpv/releases + +### Reproduction steps + +Try to reproduce your issue with --no-config first. If it isn't reproducible +with --no-config try to first find out which option or script causes your issue. + +Describe the reproduction steps as precise as possible. It's very likely that +the bug you experience wasn't reproduced by the developer because the workflow +differs from your own. + +### Expected behavior + +### Actual behavior + +### Log file + +Make a log file made with -v -v or --log-file=output.txt, paste it to +https://0x0.st/ or attach it to the github issue, and replace this text with a +link to it. + +The issue will be closed for ignoring the issue template. + +### Sample files + +Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ +or similar sites. (Only needed if the issue cannot be reproduced without it.) +Do not use garbage like "cloud storage", especially not Google Drive. diff --git a/.github/ISSUE_TEMPLATE/3_bug_report.md b/.github/ISSUE_TEMPLATE/3_bug_report.md new file mode 100644 index 0000000..60df58d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3_bug_report.md @@ -0,0 +1,43 @@ +--- +name: 'Report a different Issue' +about: 'Create a report for a runtime related Issue' +title: '' +labels: '' +assignees: '' + +--- + +### Important Information + +Provide following Information: +- mpv version +- Platform and Version +- Source of the mpv binary + +If you're not using git master or the latest release, update. +Releases are listed here: https://github.com/mpv-player/mpv/releases + +### Reproduction steps + +Try to reproduce your issue with --no-config first. If it isn't reproducible +with --no-config try to first find out which option or script causes your issue. + +Describe the reproduction steps as precise as possible. It's very likely that +the bug you experience wasn't reproduced by the developer because the workflow +differs from your own. + +### Expected behavior + +### Actual behavior + +### Log file + +Make a log file made with -v -v or --log-file=output.txt, paste it to +https://0x0.st/ or attach it to the github issue, and replace this text with a +link to it. + +### Sample files + +Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ +or similar sites. (Only needed if the issue cannot be reproduced without it.) +Do not use garbage like "cloud storage", especially not Google Drive. diff --git a/.github/ISSUE_TEMPLATE/4_bug_report_build.md b/.github/ISSUE_TEMPLATE/4_bug_report_build.md new file mode 100644 index 0000000..e8697f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4_bug_report_build.md @@ -0,0 +1,30 @@ +--- +name: 'Report a build Problem' +about: 'Create a report for a build related Issue' +title: '' +labels: 'core:meson' +assignees: '' + +--- + +### mpv version and platform versions + +If you're not using git master or the latest release, update. +Releases are listed here: https://github.com/mpv-player/mpv/releases + +### Reproduction steps + +Describe the reproduction steps as precise as possible. It's very likely that +the bug you experience wasn't reproduced by the developer because the workflow +differs from your own. + +### Expected behavior + +### Actual behavior + +### Log file + +Upload meson-logs/meson-log.txt or meson setup build output to https://0x0.st/ or attach +it to the github issue, and replace this text with a link to it. + +The issue will be closed for ignoring the issue template. diff --git a/.github/ISSUE_TEMPLATE/5_feature_request.md b/.github/ISSUE_TEMPLATE/5_feature_request.md new file mode 100644 index 0000000..2fba2ba --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5_feature_request.md @@ -0,0 +1,22 @@ +--- +name: 'Request a new Feature' +about: 'Create a request for a new feature' +title: '' +labels: 'meta:feature-request' +assignees: '' + +--- + +Before requesting a new feature make sure it hasn't been requested yet. +https://github.com/mpv-player/mpv/labels/meta%3Afeature-request + +### Expected behavior of the wanted feature + +### Alternative behavior of the wanted feature + +### Log file + +Even if you think it's not necessary at first, it might help us later to find +possible issues. Make a log file made with -v -v or --log-file=output.txt, paste +it to https://0x0.st/ or attach it to the github issue, and replace this text +with a link to it. diff --git a/.github/ISSUE_TEMPLATE/6_question.md b/.github/ISSUE_TEMPLATE/6_question.md new file mode 100644 index 0000000..b6131f3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/6_question.md @@ -0,0 +1,25 @@ +--- +name: 'Ask a Question' +about: 'Ask a question about mpv' +title: '' +labels: 'meta:question' +assignees: '' + +--- + +Don't ask questions about issues, errors or problems you have and instead open +a proper issue with the right template from the previous selection. + +This template is meant for questions about the workings of mpv, to clarify about +unspecified behaviour of options or command, or anything else that is not well +described and needs clarification. + +Before asking a question make sure it hasn't been asked or answered yet. +https://github.com/mpv-player/mpv/labels/meta%3Aquestion + +### Log file + +Even if you think it's not necessary at first, it might help us later to find +possible issues. Make a log file made with -v -v or --log-file=output.txt, paste +it to https://0x0.st/ or attach it to the github issue, and replace this text +with a link to it. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..536ac9c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +blank_issues_enabled: false +contact_links: + - name: mpv IRC channel + url: https://mpv.io/community/ + about: Feel free to ask questions here irc://irc.libera.chat/mpv + - name: mpv IRC developer channel + url: https://mpv.io/community/ + about: Ask questions related to the development of mpv here + irc://irc.libera.chat/mpv-devel diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE new file mode 100644 index 0000000..6c721d5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE @@ -0,0 +1,5 @@ +Read this before you submit this pull request: +https://github.com/mpv-player/mpv/blob/master/DOCS/contribute.md + +Reading this link and following the rules will get your pull request reviewed +and merged faster. Nobody wants lazy pull requests. \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ddbfd90 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,292 @@ +name: build + +on: + push: + branches: + - master + - ci + - 'release/**' + paths-ignore: + - 'DOCS/**' + - 'TOOLS/lua/**' + pull_request: + branches: [master] + paths-ignore: + - 'DOCS/**' + - 'TOOLS/lua/**' + +jobs: + mingw: + runs-on: ubuntu-22.04 + env: + CCACHE_BASEDIR: ${{ github.workspace }} + CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_MAXSIZE: 500M + strategy: + fail-fast: false + matrix: + target: [i686-w64-mingw32, x86_64-w64-mingw32] + steps: + - uses: actions/checkout@v3 + + - name: Get time + id: get_time + run: echo "timestamp=`date +%s%N`" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ matrix.target }}-${{ steps.get_time.outputs.timestamp }} + restore-keys: ${{ matrix.target }}- + + - name: Install dependencies + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -y autoconf automake pkg-config g++-mingw-w64 gcc-multilib python3-pip ninja-build nasm wine wine32 wine64 ccache + sudo python3 -m pip install meson + + - name: Build libraries + run: | + ./ci/build-mingw64.sh + env: + TARGET: ${{ matrix.target }} + + - name: Build with meson + id: build + run: | + ./ci/build-mingw64.sh meson pack + env: + TARGET: ${{ matrix.target }} + + - name: Print meson log + if: ${{ failure() && steps.build.outcome == 'failure' }} + run: | + cat ./build/meson-logs/meson-log.txt + + - name: Functional test + id: tests + run: | + cd artifact && wine64 ./mpv.com -v --no-config + env: + WINEDEBUG: '+loaddll' + + - uses: actions/upload-artifact@v3 + with: + name: mpv-${{ matrix.target }} + path: mpv-git-*.zip + + macos: + runs-on: ${{ matrix.os }} + strategy: + matrix: + cc: + - "clang" + cxx: + - "clang++" + os: + - "macos-12" + - "macos-13" + steps: + - uses: actions/checkout@v3 + + - name: Remove stray upstream python binary symlinks under /usr/local + run: | + find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -print + brew unlink python && brew link --overwrite python + + - name: Install dependencies + run: | + brew update + brew install autoconf automake pkg-config libtool python freetype fribidi little-cms2 lua@5.1 libass ffmpeg meson libplacebo + + - name: Build with meson + id: build + run: | + ./ci/build-macos.sh + env: + CC: "${{ matrix.cc }}" + CXX: "${{ matrix.cxx }}" + TRAVIS_OS_NAME: "${{ matrix.os }}" + + - name: Print meson log + if: ${{ failure() && steps.build.outcome == 'failure' }} + run: | + cat ./build/meson-logs/meson-log.txt + + - name: Run meson tests + id: tests + run: | + meson test -C build + + - name: Print meson test log + if: ${{ failure() && steps.tests.outcome == 'failure' }} + run: | + cat ./build/meson-logs/testlog.txt + + linux: + runs-on: "ubuntu-22.04" + container: + image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps" + env: + CC: "${{ matrix.config.cc }}" + CXX: "${{ matrix.config.cxx }}" + strategy: + matrix: + config: + - { + cc: "gcc", + cxx: "g++", + } + - { + cc: "clang", + cxx: "clang++", + } + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + # workaround to avoid "fatal: unsafe repository" error + git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Build with meson + id: build + run: | + ./ci/build-tumbleweed.sh + + - name: Print meson log + if: ${{ failure() && steps.build.outcome == 'failure' }} + run: | + cat ./build/meson-logs/meson-log.txt + + - name: Run meson tests + id: tests + run: | + meson test -C build + + - name: Print meson test log + if: ${{ failure() && steps.tests.outcome == 'failure' }} + run: | + cat ./build/meson-logs/testlog.txt + + freebsd: + runs-on: ubuntu-latest # until https://github.com/actions/runner/issues/385 + timeout-minutes: 30 # avoid any weirdness with the VM + steps: + - uses: actions/checkout@v3 + - name: Test in FreeBSD VM + uses: cross-platform-actions/action@v0.19.1 + with: + operating_system: freebsd + version: '13.2' + run: | + sudo pkg update + sudo pkg install -y \ + alsa-lib \ + cmake \ + evdev-proto \ + ffmpeg \ + git \ + iconv \ + jackit \ + libarchive \ + libbluray \ + libcaca \ + libcdio-paranoia \ + libdvdnav \ + libplacebo \ + libXinerama \ + libxkbcommon \ + libxpresent \ + libXv \ + luajit \ + meson \ + mujs \ + openal-soft \ + pipewire \ + pkgconf \ + pulseaudio \ + python3 \ + rubberband \ + sekrit-twc-zimg \ + sdl2 \ + sndio \ + uchardet \ + v4l_compat \ + vulkan-headers \ + wayland-protocols + ./ci/build-freebsd.sh + meson test -C build + + msys2: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + sys: + - clang32 + - clang64 + - mingw32 + - mingw64 + - ucrt64 + defaults: + run: + shell: msys2 {0} + steps: + - name: Disable autocrlf + shell: pwsh + run: | + git config --global core.autocrlf false + git config --global core.eol lf + - uses: actions/checkout@v3 + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.sys }} + update: true + install: git + pacboy: >- + angleproject:p + ca-certificates:p + cc:p + diffutils:p + ffmpeg:p + lcms2:p + libarchive:p + libass:p + libcdio-paranoia:p + libdvdnav:p + libjpeg-turbo:p + libplacebo:p + lua51:p + meson:p + ninja:p + pkgconf:p + python:p + rst2pdf:p + rubberband:p + shaderc:p + spirv-cross:p + uchardet:p + vapoursynth:p + vulkan:p + + - name: Build with meson + id: build + run: | + ./ci/build-msys2.sh meson + + - name: Print meson log + if: ${{ failure() && steps.build.outcome == 'failure' }} + run: | + cat ./build/meson-logs/meson-log.txt + + - name: Run meson tests + id: tests + run: | + meson test -C build + + - name: Print meson test log + if: ${{ failure() && steps.tests.outcome == 'failure' }} + run: | + cat ./build/meson-logs/testlog.txt diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml new file mode 100644 index 0000000..7f9603a --- /dev/null +++ b/.github/workflows/comment.yml @@ -0,0 +1,58 @@ +name: comment + +on: + workflow_run: + workflows: ["build"] + types: [completed] + +jobs: + pr_comment: + if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + script: | + const { owner, repo } = context.repo; + const run_id = ${{ github.event.workflow_run.id }}; + const pull_head_sha = '${{github.event.workflow_run.head_sha}}'; + + const issue_number = await(async () => { + const pulls = await github.rest.pulls.list({ owner, repo }); + for await (const { data } of github.paginate.iterator(pulls)) { + for (const pull of data) { + if (pull.head.sha === pull_head_sha) { + return pull.number; + } + } + } + })(); + if (issue_number) { + core.info(`Using pull request ${issue_number}`); + } else { + return core.error(`No matching pull request found`); + } + + const { data: { artifacts } } = await github.rest.actions.listWorkflowRunArtifacts({ owner, repo, run_id }); + if (!artifacts.length) { + return core.error(`No artifacts found`); + } + + let body = `Download the artifacts for this pull request:\n\n
Windows\n`; + for (const art of artifacts) { + const art_link = `https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip`; + if (art.name.includes('w64')) { + body += `\n* [${art.name}](${art_link})`; + } + } + body += `\n
`; + + const { data: comments } = await github.rest.issues.listComments({ repo, owner, issue_number }); + const existing_comment = comments.find((c) => c.user.login === 'github-actions[bot]'); + if (existing_comment) { + core.info(`Updating comment ${existing_comment.id}`); + await github.rest.issues.updateComment({ repo, owner, comment_id: existing_comment.id, body }); + } else { + core.info(`Creating a comment`); + await github.rest.issues.createComment({ repo, owner, issue_number, body }); + } diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..d1fcb5c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,24 @@ +name: docs + +on: + push: + branches: + - master + - ci + - 'release/**' + paths: + - 'DOCS/**' + pull_request: + branches: [master] + paths: + - 'DOCS/**' + +jobs: + check-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Docs + run: | + sudo apt-get install python3-docutils + rst2man --strip-elements-with-class=contents --halt=2 ./DOCS/man/mpv.rst mpv.1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..939255e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +name: lint + +on: + push: + branches: + - master + - ci + - 'release/**' + pull_request: + branches: [master] + +jobs: + commit-msg: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 50 + + - name: Lint + run: | + ./ci/lint-commit-msg.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b805192 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/subprojects/* +!/subprojects/packagefiles +!/subprojects/*.wrap diff --git a/Copyright b/Copyright new file mode 100644 index 0000000..79f718b --- /dev/null +++ b/Copyright @@ -0,0 +1,74 @@ +mpv is a fork of mplayer2, which is a fork of MPlayer. + +mpv as a whole is licensed under the GNU General Public License GPL version 2 +or later (called GPLv2+ in this document, see LICENSE.GPL for full license +text) by default, or the GNU Lesser General Public License LGPL version 2 or +later (LGPLv2.1+ in this document, see LICENSE.LGPL for full license text) if +built with the -Dgpl=false configure switch. + +Most source files are LGPLv2.1+ or GPLv2+, but some files are available under +more liberal licenses, such as BSD, MIT, ISC, and possibly others. Look at the +copyright header of each source file, and grep the sources for "Copyright" if +you need to know details. C source files without Copyright notice are usually +licensed as LGPLv2.1+. Also see the list of files with specific licenses below +(not all files can have a standard license header). + +All new contributions must be LGPLv2.1+ licensed. Using a more liberal license +compatible to LGPLv2.1+ is also ok. + +Changes done to GPL code must come with the implicit/explicit agreement that the +project can relicense the changes to LGPLv2.1+ at a later point without asking +the contributor. This is a safeguard for making potential relicensing of +remaining GPL code to LGPLv2.1+ easier. + +See DOCS/contribute.md for binding rules wrt. licensing for contributions. + +For information about authors and contributors, consult the git log, which +contains the complete SVN and CVS history as well. + +"v2.1+" in this context means "version 2.1 or later". + +Some libraries are GPLv2+ or GPLv3+ only. Building mpv with Samba support makes +it GPLv3+. + +mpv can be built as LGPLv2.1+ with the -Dgpl=false configure option. To add a +LGPL mode to mpv, MPlayer code had to be relicensed from GPLv2+ to LGPLv2.1+ by +asking the MPlayer authors for permission. Since permission could not be +obtained from everyone, LGPL mode disables the following features, some of them +quite central: +- Linux X11 video output +- BSD audio output via OSS +- NVIDIA/Linux hardware decoding (vdpau, although nvdec usually works) +- Linux TV input +- minor features: jack, DVD, CDDA, SMB, CACA, legacy direct3d VO +Some of these will be fixed in the future. The intended use for LGPL mode is +with libmpv, and currently it's not recommended to build mpv CLI in LGPL mode +at all. + +The following files are still GPL only (-Dgpl=false disables them): + + audio/out/ao_jack.c will stay GPL + audio/out/ao_oss.c will stay GPL + stream/dvb* must stay GPL + stream/stream_cdda.c unknown + stream/stream_dvb.* must stay GPL + stream/stream_dvdnav.c unknown + video/out/vo_caca.c unknown + video/out/vo_direct3d.c unknown + video/out/vo_vaapi.c probably impossible (some company's code) + video/out/vo_vdpau.c probably impossible (nVidia's code) + video/out/vo_x11.c probably impossible + video/out/vo_xv.c probably impossible + video/out/x11_common.* probably impossible + video/vdpau.c hard (GPL-only parts must be ifdefed) + video/vdpau.h unknown + video/vdpau_mixer.* actual code must be rewritten + DOCS/man/ GPLv2+ + bootstrap.py unknown license, probably GPLv2+ or LGPLv2+ + etc/mplayer-input.conf unknown license, probably GPLv2+ + mpv.desktop unknown license, probably GPLv2+ + etc/restore-old-bindings.conf unknown license, probably GPLv2+ + +None of the cases listed above affect the final binary if it's built as +LGPL. Linked libraries still can affect the final license (for example if +FFmpeg was built as GPL). diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst new file mode 100644 index 0000000..f092647 --- /dev/null +++ b/DOCS/client-api-changes.rst @@ -0,0 +1,279 @@ +Introduction +============ + +This file lists all changes that can cause compatibility issues when using +mpv through the client API (libmpv and ``client.h``). Since the client API +interfaces to input handling (commands, properties) as well as command line +options, you should also look at ``interface-changes.rst``. + +Normally, changes to the C API that are incompatible to previous iterations +receive a major version bump (i.e. the first version number is increased), +while C API additions bump the minor version (i.e. the second number is +increased). Changes to properties/commands/options may also lead to a minor +version bump, in particular if they are incompatible. + +The version number is the same as used for MPV_CLIENT_API_VERSION (see +``client.h`` how to convert between major/minor version numbers and the flat +32 bit integer). + +Also, read the section ``Compatibility`` in ``client.h``, and compatibility.rst. + +Options, commands, properties +============================= + +Changes to these are not listed here, but in ``interface-changes.rst``. (Before +client API version 1.17, they were listed here partially.) + +This listing includes changes to the bare C API and behavior only, not what +you can access with them. + +API changes +=========== + +:: + + --- mpv 0.37.0 --- + 2.2 - add mpv_time_ns() + --- mpv 0.36.0 --- + 2.1 - add mpv_del_property() + --- mpv 0.35.0 --- + 2.0 - remove headers/functions of the obsolete opengl_cb API + - remove mpv_opengl_init_params.extra_exts field + - remove deprecated mpv_detach_destroy. Use mpv_destroy instead. + - remove obsolete mpv_suspend and mpv_resume + - remove deprecated SCRIPT_INPUT_DISPATCH, PAUSE and UNPAUSE, TRACKS_CHANGED + TRACK_SWITCHED, METADATA_UPDATE, CHAPTER_CHANGE events + --- mpv 0.33.0 --- + 1.109 - add MPV_RENDER_API_TYPE_SW and related (software rendering API) + - inactivate the opengl_cb API (always fails to initialize now) + The opengl_cb API was deprecated over 2 years ago. Use the render API + instead. + 1.108 - Deprecate MPV_EVENT_IDLE + - add mpv_event_start_file + - add the following fields to mpv_event_end_file: playlist_entry_id, + playlist_insert_id, playlist_insert_num_entries + - add mpv_event_to_node() + - add mpv_client_id() + 1.107 - Remove the deprecated qthelper.hpp. This was obviously not part of the + libmpv API, only an "additionally" provided helper, thus this is not + considered an API change. If you are maintaining a project that relies + on this header, you can simply download this file and adjust the + include statement to use it instead: + + https://raw.githubusercontent.com/mpv-player/mpv/v0.32.0/libmpv/qthelper.hpp + + It is a good idea to write better wrappers for your use, though. + --- mpv 0.31.0 --- + 1.107 - Deprecate MPV_EVENT_TICK + --- mpv 0.30.0 --- + 1.106 - Add cancel_fn to mpv_stream_cb_info + 1.105 - Fix deadlock problems with MPV_RENDER_PARAM_ADVANCED_CONTROL and if + the "vd-lavc-dr" option is enabled (which it is by default). + There were no actual API changes. + API users on older API versions and mpv releases should set + "vd-lavc-dr" to "no" to avoid these issues. + API users must still adhere to the tricky rules documented in render.h + to avoid other deadlocks. + 1.104 - Deprecate struct mpv_opengl_drm_params. Replaced by mpv_opengl_drm_params_v2 + - Deprecate MPV_RENDER_PARAM_DRM_DISPLAY. Replaced by MPV_RENDER_PARAM_DRM_DISPLAY_V2. + 1.103 - redo handling of async commands + - add mpv_event_command and make it possible to return values from + commands issued with mpv_command_async() or mpv_command_node_async() + - add mpv_abort_async_command() + 1.102 - rename struct mpv_opengl_drm_osd_size to mpv_opengl_drm_draw_surface_size + - rename MPV_RENDER_PARAM_DRM_OSD_SIZE to MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE + --- mpv 0.29.0 --- + 1.101 - add MPV_RENDER_PARAM_ADVANCED_CONTROL and related API + - add MPV_RENDER_PARAM_NEXT_FRAME_INFO and related symbols + - add MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME + - add MPV_RENDER_PARAM_SKIP_RENDERING + - add mpv_render_context_get_info() + 1.100 - bump API number to avoid confusion with mpv release versions + - actually apply the GL_MP_MPGetNativeDisplay change for the new render + API. This also means compatibility for anything but x11 and wayland + through the old opengl-cb GL_MP_MPGetNativeDisplay method is now + unsupported. + - deprecate mpv_get_wakeup_pipe(). It's complex, but easy to replace + using normal API (just set a wakeup callback to a function which + writes to a pipe). + - add a 1st class hook API, which replaces the hacky mpv_command() + based one. The old API is deprecated and will be removed soon. The + old API was never meant to be stable, while the new API is. + 1.29 - the behavior of mpv_terminate_destroy() and mpv_detach_destroy() + changes subtly (see documentation in the header file). In particular, + mpv_detach_destroy() will not leave the player running in all + situations anymore (it gets closer to refcounting). + - rename mpv_detach_destroy() to mpv_destroy() (the old function will + remain valid as deprecated alias) + - add mpv_create_weak_client(), which makes use of above changes + - MPV_EVENT_SHUTDOWN is now returned exactly once if a mpv_handle + should terminate, instead of spamming the event queue with this event + 1.28 - deprecate the render opengl_cb API, and replace it with render.h + and render_gl.h. The goal is allowing support for APIs other than + OpenGL. The old API is emulated with the new API. + Likewise, the "opengl-cb" VO is renamed to "libmpv". + mpv_get_sub_api() is deprecated along the opengl_cb API. + The new API is relatively similar, but not the same. The rough + equivalents are: + mpv_opengl_cb_init_gl => mpv_render_context_create + mpv_opengl_cb_set_update_callback => mpv_render_context_set_update_callback + mpv_opengl_cb_draw => mpv_render_context_render + mpv_opengl_cb_report_flip => mpv_render_context_report_swap + mpv_opengl_cb_uninit_gl => mpv_render_context_free + The VO opengl-cb is also renamed to "libmpv". + Also, the GL_MP_MPGetNativeDisplay pseudo extension is not used by the + render API anymore, and the old opengl-cb API only handles the "x11" + and "wl" names anymore. Support for everything else has been removed. + The new render API uses proper API parameters, e.g. for X11 you pass + MPV_RENDER_PARAM_X11_DISPLAY directly. + - deprecate the qthelper.hpp header file. This provided some C++ helper + utility functions for Qt with use of libmpv. There is no reason to + keep this in the mpv git repository, nor to make it part of the libmpv + API. If you're using this header, you can safely copy it into your + project - it uses only libmpv public API. Alternatively, it could be + maintained in a separate repository by interested parties. + 1.27 - make opengl-cb the default VO. This causes a subtle behavior change + if the API user called mpv_opengl_cb_init_gl(), but does not set + the "vo" option. Before, it would still have used another VO (like + on the CLI, e.g. vo=gpu). Now it'll behave as if vo=opengl-cb was + used. + --- mpv 0.28.0 --- + 1.26 - remove glMPGetNativeDisplay("drm") support + - add mpv_opengl_cb_window_pos and mpv_opengl_cb_drm_params and + support via glMPGetNativeDisplay() for using it + - make --stop-playback-on-init-failure=no the default in libmpv (just + like in mpv CLI) + --- mpv 0.27.0 --- + 1.25 - remove setting "no-" options via mpv_set_option*(). (See corresponding + deprecation in 0.23.0.) + --- mpv 0.25.0 --- + 1.24 - add a MPV_ENABLE_DEPRECATED preprocessor symbol, which can be defined + by the user to exclude deprecated API symbols from the C headers + --- mpv 0.23.0 --- + 1.24 - the deprecated mpv_suspend() and mpv_resume() APIs now do nothing. + --- mpv 0.22.0 --- + 1.23 - deprecate setting "no-" options via mpv_set_option*(). For example, + instead of "no-video=" you should set "video=no". + - do not override the SIGPIPE signal handler anymore. This was done as + workaround for the FFmpeg TLS code, which has been fixed long ago. + - deprecate mpv_suspend() and mpv_resume(). They will be stubbed out + in mpv 0.23.0. + - make mpv_set_property() work to some degree before mpv_initialize(). + It can now be used instead of mpv_set_option(). + - semi-deprecate mpv_set_option()/mpv_set_option_string(). You should + use mpv_set_property() instead. There are some deprecated properties + which conflict with some options (see client.h remarks on + mpv_set_option()), for which mpv_set_option() might still be required. + In future mpv releases, the conflicting deprecated options/properties + will be removed, and mpv_set_option() will internally translate API + calls to mpv_set_property(). + - qthelper.hpp: deprecate get_property_variant, set_property_variant, + set_option_variant, command_variant, and replace them with + get_property, set_property, command. + --- mpv 0.19.0 --- + 1.22 - add stream_cb API for custom protocols + --- mpv 0.18.1 --- + ---- - remove "status" log level from mpv_request_log_messages() docs. This + is 100% equivalent to "v". The behavior is still the same, thus no + actual API change. + --- mpv 0.18.0 --- + 1.21 - mpv_set_property() changes behavior with MPV_FORMAT_NODE. Before this + change it rejected mpv_nodes with format==MPV_FORMAT_STRING if the + property was not a string or did not have special mechanisms in place + the function failed. Now it always invokes the option string parser, + and mpv_node with a basic data type works exactly as if the function + is invoked with that type directly. This new behavior is equivalent + to mpv_set_option(). + This also affects the mp.set_property_native() Lua function. + - generally, setting choice options/properties with "yes"/"no" options + can now be set as MPV_FORMAT_FLAG + - reading a choice property as MPV_FORMAT_NODE will now return a + MPV_FORMAT_FLAG value if the choice is "yes" (true) or "no" (false) + This implicitly affects Lua and JSON IPC interfaces as well. + - big changes to vo-cmdline on vo_opengl and vo_opengl_hq (but not + vo_opengl_cb): options are now normally not reset, but applied on top + of the current options. The special undocumented value "-" still + works, but now resets all options to before any vo-cmdline command + has been called. + --- mpv 0.12.0 --- + 1.20 - deprecate "GL_MP_D3D_interfaces"/"glMPGetD3DInterface", and introduce + "GL_MP_MPGetNativeDisplay"/"glMPGetNativeDisplay" (this is a + backwards-compatible rename) + --- mpv 0.11.0 --- + --- mpv 0.10.0 --- + 1.19 - add "GL_MP_D3D_interfaces" pseudo extension to make it possible to + use DXVA2 in OpenGL fullscreen mode in some situations + - mpv_request_log_messages() now accepts "terminal-default" as parameter + 1.18 - add MPV_END_FILE_REASON_REDIRECT, and change behavior of + MPV_EVENT_END_FILE accordingly + - a bunch of interface-changes.rst changes + 1.17 - mpv_initialize() now blocks SIGPIPE (details see client.h) + --- mpv 0.9.0 --- + 1.16 - add mpv_opengl_cb_report_flip() + - introduce mpv_opengl_cb_draw() and deprecate mpv_opengl_cb_render() + - add MPV_FORMAT_BYTE_ARRAY + 1.15 - mpv_initialize() will now load config files. This requires setting + the "config" and "config-dir" options. In particular, it will load + mpv.conf. + - minor backwards-compatible change to the "seek" and "screenshot" + commands (new flag syntax, old additional args deprecated) + --- mpv 0.8.0 --- + 1.14 - add mpv_wait_async_requests() + - the --msg-level option changes its native type from a flat string to + a key-value list (setting/reading the option as string still works) + 1.13 - add MPV_EVENT_QUEUE_OVERFLOW + 1.12 - add class Handle to qthelper.hpp + - improve opengl_cb.h API uninitialization behavior, and fix the qml + example + - add mpv_create_client() function + 1.11 - add OpenGL rendering interop API - allows an application to combine + its own and mpv's OpenGL rendering + Warning: this API is not stable yet - anything in opengl_cb.h might + be changed in completely incompatible ways in minor API bumps + --- mpv 0.7.0 --- + 1.10 - deprecate/disable everything directly related to script_dispatch + (most likely affects nobody) + 1.9 - add enum mpv_end_file_reason for mpv_event_end_file.reason + - add MPV_END_FILE_REASON_ERROR and the mpv_event_end_file.error field + for slightly better error reporting on playback failure + - add --stop-playback-on-init-failure option, and make it the default + behavior for libmpv only + - add qthelper.hpp set_option_variant() + - mark the following events as deprecated: + MPV_EVENT_TRACKS_CHANGED + MPV_EVENT_TRACK_SWITCHED + MPV_EVENT_PAUSE + MPV_EVENT_UNPAUSE + MPV_EVENT_METADATA_UPDATE + MPV_EVENT_CHAPTER_CHANGE + They are handled better with mpv_observe_property() as mentioned in + the documentation comments. They are not removed and still work. + 1.8 - add qthelper.hpp + 1.7 - add mpv_command_node(), mpv_command_node_async() + 1.6 - modify "core-idle" property behavior + - MPV_EVENT_LOG_MESSAGE now always sends complete lines + - introduce numeric log levels (mpv_log_level) + --- mpv 0.6.0 --- + 1.5 - change in X11 and "--wid" behavior again. The previous change didn't + work as expected, and now the behavior can be explicitly controlled + with the "input-x11-keyboard" option. This is only a temporary + measure until XEmbed is implemented and confirmed working. + Note: in 1.6, "input-x11-keyboard" was renamed to "input-vo-keyboard", + although the old option name still works. + 1.4 - subtle change in X11 and "--wid" behavior + (this change was added to 0.5.2, and broke some things, see #1090) + --- mpv 0.5.0 --- + 1.3 - add MPV_MAKE_VERSION() + 1.2 - remove "stream-time-pos" property (no replacement) + 1.1 - remap dvdnav:// to dvd:// + - add "--cache-file", "--cache-file-size" + - add "--colormatrix-primaries" (and property) + - add "primaries" sub-field to image format properties + - add "playback-time" property + - extend the "--start" option; a leading "+", which was previously + insignificant is now significant + - add "cache-free" and "cache-used" properties + - OSX: the "coreaudio" AO spdif code is split into a separate AO + --- mpv 0.4.0 --- + 1.0 - the API is declared stable + diff --git a/DOCS/compatibility.rst b/DOCS/compatibility.rst new file mode 100644 index 0000000..3d6ec2c --- /dev/null +++ b/DOCS/compatibility.rst @@ -0,0 +1,177 @@ +CLI and API compatibility policy +================================ + +Human users and API users rely on the mpv/libmpv/scripting/IPC interface not +breaking their use case. On the other hand, active development occasionally +requires breaking things, such as removing old options or changing options in +a way that may break. + +This document lists rules when, what, and how incompatible changes can be made. +It's interesting both for mpv developers, who want to change user-visible parts, +and mpv users, who want to know what is guaranteed to remain stable. + +Any of the rules below may be overridden by statements in more specific +documentation (for example, if the manpage says that a particular option may be +removed any time, it means that, and the option probably won't even go through +deprecation). + +Additions +--------- + +Additions are basically always allowed. API users etc. are supposed to deal with +the possibility that for example new API functions are added. Some parts of the +API may document how they are extended. + +Options, commands, properties, events, hooks (command interface) +---------------------------------------------------------------- + +All of these are important for interfacing both with end users and API users +(which include Lua scripts, libmpv, and the JSON IPC). As such, they constitute +a large part of the user interface and APIs. + +All incompatible changes to this must be declared in interface-changes.rst. +(This may also list compatible additions, but it's not a requirement.) + +Degrees of importance and compatibility preservation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Critical and central parts of the command interface have the strictest +requirements. It may not be reasonable to break them, and other means to achieve +some change have to be found. For example, the "seek" command is a bit of a +mess, but since changing it would likely affect almost every user, it may be +impossible to break at least the commonly used syntax. If changed anyway, there +should be a deprecation period of at least 1 year, during which the command +still works, and possibly a warning should remain even after this. + +Important/often used parts must be deprecated for at least 2 releases before +they can be broken. There must be at least 1 release where the deprecated +functionality still works, and a replacement is available (if technically +reasonable). For example, a feature deprecated in mpv 0.30.0 may be removed in +mpv 0.32.0. Minor releases do not count towards this. + +Less useful parts can be broken immediately, but must come with some sort of +removal warning- + +Parts for debugging and testing may be removed any time, potentially even +without any sort of documentation. + +Currently, the importance of a part is not documented and not even well-defined, +which is probably a mistake. + +Renaming or removing options +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Typically, renaming an option can be done in a compatible way with OPT_REPLACED. +You may need to check whether the corresponding properties still work (including +messy details like observing properties for changes). + +OPT_REMOVED can be used to inform the user of alternatives or reasons for the +removal, which is better than an option not found error. Likewise, +m_option.deprecation_message should be set to something helpful. + +Both OPT_REPLACED and OPT_REMOVED can remain in the code for a long time, since +they're unintrusive and hopefully make incompatible changes less painful for +users. + +Scripting APIs +-------------- + +This affects internal scripting APIs (currently Lua and JavaScript). + +Vaguely the same rules as with the command interface apply. Since there is a +large number of scripts, an effort should be made to provide compatibility +for old scripts, but it does not need to be stronger than that of the command +interface. + +Undocumented parts of the scripting APIs are _not_ guaranteed for compatibility. +This applies especially for internals. Languages like Lua do not have strict +access control (nor does the mpv code try to emulate any), so if a script +accesses private parts, and breaks on the next mpv release, it's not mpv's +problem. + +JSON IPC +-------- + +The JSON IPC is a thin protocol wrapping the libmpv API and the command +interface. Compatibility-wise, it's about the same as the scripting APIs. +The JSON protocol commands should remain as compatible as possible, and it +should probably accept the current way commands are delimited (line breaks) +forever. + +The protocol may accept non-standard JSON extensions, but only standard JSON +(possibly with restrictions) is guaranteed for compatibility. Clients which want +to remain compatible should not use any extensions. + +CLI +--- + +Things such as default key bindings do not necessarily require compatibility. +However, the release notes should be extremely clear on changes to "important" +key bindings. Bindings which restore the old behavior should be added to +restore-old-bindings.conf. + +Some option parsing is CLI-only and not available from libmpv or scripting. No +compatibility guarantees come with them. However, the rules which mpv uses to +distinguish between options and filenames must remain consistent (if the +non-deprecated options syntax is used). + +Terminal and log output +----------------------- + +There are no compatibility guarantees for the terminal output, or the text +logged via ``MPV_EVENT_LOG_MESSAGE`` and similar APIs. In particular, scripts +invoking mpv CLI are extremely discouraged from trying to parse text output, +and should use other mechanisms such as the JSON IPC. + +Protocols, filters, demuxers, etc. +---------------------------------- + +Which of these are present is generally not guaranteed, and can even depend +on compile time settings. + +The filter list and their sub-options are considered part of the +command-interface. + +libmpv C API +------------ + +The libmpv client API (such as ````) mostly gives access to +the command interface. The API itself (if looked at as a component separate +from the command interface) is intended to be extremely stable. + +All API changes are documented in client-api-changes.rst. + +API compatibility +^^^^^^^^^^^^^^^^^ + +The API is *always* compatible. Incompatible changes are only allowed on major +API version changes (see ``MPV_CLIENT_API_VERSION``). A major version change is +an extremely rare event, which means usually no API symbols are ever removed. + +Essentially removing API functions by making them always return an error, or +making it do nothing is allowed in cases where it is unlikely to break most +clients, but requires a deprecation period of 2 releases. (This has happened to +``mpv_suspend()`` for example.) + +API symbols can be deprecated. This should be clearly marked in the doxygen +with ``@deprecated``, and if possible, the affected API symbols should not be +visible if the API user defines ``MPV_ENABLE_DEPRECATED`` to 0. + +ABI compatibility +^^^^^^^^^^^^^^^^^ + +The ABI must never be broken, except on major API version changes. For example, +constants don't change their values. + +Structs are tricky. If a struct can be allocated by a user (such as ``mpv_node``), +no fields can be added. (Unless it's an union, and the addition does not change +the offset or alignment of any of the fields or the struct itself. This has +happened to ``mpv_node`` in the past.) If a struct is allocated by libmpv only, +new fields can be appended to the end (for example ``mpv_event``). + +The ABI is only backward compatible. This means if a host application is linked +to an older libmpv, and libmpv is updated to a newer version, it will still +work (as in not causing any undefined behavior). + +Forward compatibility (an application would work with an older libmpv than it +was linked to) is not required. diff --git a/DOCS/compile-windows.md b/DOCS/compile-windows.md new file mode 100644 index 0000000..04bc200 --- /dev/null +++ b/DOCS/compile-windows.md @@ -0,0 +1,214 @@ +Compiling for Windows +===================== + +Compiling for Windows is supported with MinGW-w64. This can be used to produce +both 32-bit and 64-bit executables, and it works for building on Windows and +cross-compiling from Linux and Cygwin. MinGW-w64 is available from: +https://www.mingw-w64.org/ + +While building a complete MinGW-w64 toolchain yourself is possible, there are a +few build environments and scripts to help ease the process, such as MSYS2 and +MXE. Note that MinGW environments included in Linux distributions are often +broken, outdated and useless, and usually don't use MinGW-w64. + +**Warning**: the original MinGW (https://osdn.net/projects/mingw/) is unsupported. + +Cross-compilation +================= + +When cross-compiling, it is recommended to use a meson crossfile to setup +the cross compiling environment. A minimal example is included below: + +```ini +[binaries] +c = 'x86_64-w64-mingw32-gcc' +cpp = 'x86_64-w64-mingw32-g++' +ar = 'x86_64-w64-mingw32-ar' +strip = 'x86_64-w64-mingw32-strip' +exe_wrapper = 'wine64' + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' +``` + +See [meson's documentation](https://mesonbuild.com/Cross-compilation.html) for +more information. + +[MXE](https://mxe.cc) makes it very easy to bootstrap a complete MingGW-w64 +environment from a Linux machine. See a working example below. + +Alternatively, you can try [mpv-winbuild-cmake](https://github.com/shinchiro/mpv-winbuild-cmake), +which bootstraps a MinGW-w64 environment and builds mpv and dependencies. + +Example with MXE +---------------- + +```bash +# Before starting, make sure you install MXE prerequisites. MXE will download +# and build all target dependencies, but no host dependencies. For example, +# you need a working compiler, or MXE can't build the crosscompiler. +# +# Refer to +# +# https://mxe.cc/#requirements +# +# Scroll down for disto/OS-specific instructions to install them. + +# Download MXE. Note that compiling the required packages requires about 1.4 GB +# or more! + +cd /opt +git clone https://github.com/mxe/mxe mxe +cd mxe + +# Set build options. + +# The JOBS environment variable controls threads to use when building. DO NOT +# use the regular `make -j4` option with MXE as it will slow down the build. +# Alternatively, you can set this in the make command by appending "JOBS=4" +# to the end of command: +echo "JOBS := 4" >> settings.mk + +# The MXE_TARGET environment variable builds MinGW-w64 for 32 bit targets. +# Alternatively, you can specify this in the make command by appending +# "MXE_TARGETS=i686-w64-mingw32" to the end of command: +echo "MXE_TARGETS := i686-w64-mingw32.static" >> settings.mk + +# If you want to build 64 bit version, use this: +# echo "MXE_TARGETS := x86_64-w64-mingw32.static" >> settings.mk + +# Build required packages. The following provide a minimum required to build +# a reasonable mpv binary (though not an absolute minimum). + +make gcc ffmpeg libass jpeg lua luajit + +# Add MXE binaries to $PATH +export PATH=/opt/mxe/usr/bin/:$PATH + +# Build mpv. The target will be used to automatically select the name of the +# build tools involved (e.g. it will use i686-w64-mingw32.static-gcc). + +cd .. +git clone https://github.com/mpv-player/mpv.git +cd mpv +meson setup build --crossfile crossfile +meson compile -C build +``` + +Native compilation with MSYS2 +============================= + +For Windows developers looking to get started quickly, MSYS2 can be used to +compile mpv natively on a Windows machine. The MSYS2 repositories have binary +packages for most of mpv's dependencies, so the process should only involve +building mpv itself. + +To build 64-bit mpv on Windows: + +Installing MSYS2 +---------------- + +1. Download an installer from https://www.msys2.org/ + + Both the i686 and the x86_64 version of MSYS2 can build 32-bit and 64-bit + mpv binaries when running on a 64-bit version of Windows, but the x86_64 + version is preferred since the larger address space makes it less prone to + fork() errors. + +2. Start a MinGW-w64 shell (``mingw64.exe``). **Note:** This is different from + the MSYS2 shell that is started from the final installation dialog. You must + close that shell and open a new one. + + For a 32-bit build, use ``mingw32.exe``. + +Updating MSYS2 +-------------- + +To prevent errors during post-install, the MSYS2 core runtime must be updated +separately. + +```bash +# Check for core updates. If instructed, close the shell window and reopen it +# before continuing. +pacman -Syu + +# Update everything else +pacman -Su +``` + +Installing mpv dependencies +--------------------------- + +```bash +# Install MSYS2 build dependencies and a MinGW-w64 compiler +pacman -S git $MINGW_PACKAGE_PREFIX-{python,pkgconf,gcc,meson} + +# Install the most important MinGW-w64 dependencies. libass and lcms2 are also +# pulled in as dependencies of ffmpeg. +pacman -S $MINGW_PACKAGE_PREFIX-{ffmpeg,libjpeg-turbo,luajit} +``` + +Building mpv +------------ + +Finally, compile and install mpv. Binaries will be installed to +``/mingw64/bin`` or ``/mingw32/bin``. + +```bash +meson setup build --prefix=$MSYSTEM_PREFIX +meson compile -C build +``` + +Or, compile and install both libmpv and mpv: + +```bash +meson setup build -Dlibmpv=true --prefix=$MSYSTEM_PREFIX +meson compile -C build +meson install -C build +``` + +Linking libmpv with MSVC programs +--------------------------------- + +mpv/libmpv cannot be built with Visual Studio (Microsoft is too incompetent to +support C99/C11 properly and/or hates open source and Linux too much to +seriously do it). But you can build C++ programs in Visual Studio and link them +with a libmpv built with MinGW. + +To do this, you need a Visual Studio which supports ``stdint.h`` (recent ones do), +and you need to create a import library for the mpv DLL: + +```bash +lib /name:mpv-1.dll /out:mpv.lib /MACHINE:X64 +``` + +The string in the ``/name:`` parameter must match the filename of the DLL (this +is simply the filename the MSVC linker will use). + +Static linking is not possible. + +Running mpv +----------- + +If you want to run mpv from the MinGW-w64 shell, you will find the experience +much more pleasant if you use the ``winpty`` utility + +```bash +pacman -S winpty +winpty mpv.com ToS-4k-1920.mov +``` + +If you want to move / copy ``mpv.exe`` and ``mpv.com`` to somewhere other than +``/mingw64/bin/`` for use outside the MinGW-w64 shell, they will still depend on +DLLs in that folder. The simplest solution is to add ``C:\msys64\mingw64\bin`` +to the windows system ``%PATH%``. Beware though that this can cause problems or +confusion in Cygwin if that is also installed on the machine. + +Use of the ANGLE OpenGL backend requires a copy of the D3D compiler DLL that +matches the version of the D3D SDK that ANGLE was built with +(``d3dcompiler_43.dll`` in case of MinGW-built ANGLE) in the path or in the +same folder as mpv. It must be of the same architecture (x86_64 / i686) as the +mpv you compiled. diff --git a/DOCS/contribute.md b/DOCS/contribute.md new file mode 100644 index 0000000..91422a7 --- /dev/null +++ b/DOCS/contribute.md @@ -0,0 +1,281 @@ +How to contribute +================= + +General +------- + +The main contact for mpv development is IRC, specifically #mpv +and #mpv-devel on Libera.chat. Github is used for code review and +long term discussions. + +Sending patches +--------------- + +- Make a github pull request, or send a link to a plaintext patch created with + ``git format-patch``. +- Plain diffs posted as pastebins are not acceptable! (Especially if the http + link returns HTML.) They only cause extra work for everyone, because they lack + commit message and authorship information. +- Never send patches to any of the developers email addresses. +- If your changes are not supposed to be merged immediately, mark them as + "[RFC]" in the commit message or the pull request title. +- Be sure to test your changes. If you didn't, please say so in the commit + message and the pull request text. + +Copyright of contributions +-------------------------- + +- The copyright belongs to contributors. The project is a collaborative work. By + sending your changes, you agree to license your contributions according to the + requirements of this project. +- All new code must be LGPLv2.1+ licensed, or come with the implicit agreement + that it will be relicensed to LGPLv2.1+ later (see ``Copyright`` in the + repository root directory). +- 100% compatible licenses are allowed too. +- Changes in files with more liberal licenses (such as BSD, MIT, or ISC) are + assumed to be dual-licensed under LGPLv2.1+ and the license indicated in the + file header. +- You must be either the exclusive author of the patch, or acknowledge all + authors involved in the commit message. If you take 3rd party code, authorship + and copyright must be properly acknowledged. If you're making changes on + behalf of your employer, and the employer owns the copyright, you must mention + this. If the license of the code is not LGPLv2.1+, you must mention this. +- These license statements are legally binding. +- Don't use fake names (something that looks like an actual name, and may be + someone else's name, but is not your legal name). Using a pseudonyms is + allowed if it can be used to identify or contact you, even if whatever + account you used to submit the patch dies. +- Do not add your name to the license header. This convention is not used by + this project, and neither copyright law nor any of the used licenses require + it. + +Write good commit messages +-------------------------- + +- Write informative commit messages. Use present tense to describe the + situation with the patch applied, and past tense for the situation before + the change. +- The subject line (the first line in a commit message) must contain a + prefix identifying the sub system, followed by a short description what + impact this commit has. This subject line and the commit message body + must not be longer than 72 characters per line, because it messes up the + output of many git tools otherwise. + + For example, you fixed a crash in af_volume.c: + + - Bad: ``fixed the bug (wtf?)`` + - Good: ``af_volume: fix crash due to null pointer access`` + + Having a prefix gives context, and is especially useful when trying to find + a specific change by looking at the history, or when running ``git blame``. + + Sample prefixes: ``vo_gpu: ...``, ``command: ...``, ``DOCS/input: ...``, + ``TOOLS/osxbundle: ...``, ``osc.lua: ...``, etc. You can always check the git + log for commits which modify specific files to see which prefixes are used. + +- The first word after the ``:`` is lower case. +- Don't end the subject line with a ``.``. +- Put an empty line between the subject line and the commit message. + If this is missing, it will break display in common git tools. +- The body of the commit message (everything else after the subject line) must + be as informative as possible and contain everything that isn't obvious. Don't + hesitate to dump as much information as you can - it doesn't cost you + anything. Put some effort into it. If someone finds a bug months or years + later, and finds that it's caused by your commit (even though your commit was + supposed to fix another bug), it would be bad if there wasn't enough + information to test the original bug. The old bug might be reintroduced while + fixing the new bug. + + The commit message must be wrapped on 72 characters per line, because git + tools usually do not break text automatically. On the other hand, you do not + need to break text that would be unnatural to break (like data for test cases, + or long URLs). +- Another summary of good conventions: https://chris.beams.io/posts/git-commit/ + +Split changes into multiple commits +----------------------------------- + +- Follow git good practices, and split independent changes into several commits. + It's usually OK to put them into a single pull request. +- Try to separate cosmetic and functional changes. It's ok to make a few + additional cosmetic changes in the same file you're working on. But don't do + something like reformatting a whole file, and hiding an actual functional + change in the same commit. +- Splitting changes does _not_ mean that you should make them as fine-grained + as possible. Commits should form logical steps in development. The way you + split changes is important for code review and analyzing bugs. + +Always squash fixup commits when making changes to pull requests +---------------------------------------------------------------- + +- If you make fixup commits to your pull request, you should generally squash + them with "git rebase -i". We prefer to have pull requests in a merge + ready state. +- We don't squash-merge (nor do we use github's feature that does this) because + pull requests with multiple commits are perfectly legitimate, and the only + thing that makes sense in non-trivial cases. +- With complex pull requests, it *may* make sense to keep them separate, but + they should be clearly marked as such. Reviewing commits is generally easier + with fixups squashed. +- Reviewers are encouraged to look at individual commits instead of github's + "changes from all commits" view (which just encourages bad git and review + practices). + +Touching user-visible parts may require updating the mpv docs +------------------------------------------------------------- + +- Most user-visible things are normally documented in DOCS/man/. If your commit + touches documented behavior, list of sub-options, etc., you need to adjust the + documentation. +- These changes usually go into the same commit that changes the code. +- Changes to command line options (addition/modification/removal) must be + documented in options.rst. +- Changes to input properties or input commands must be documented in input.rst. +- All incompatible changes to the user interface (options, properties, commands) + must be documented with a small note in interface-changes.rst. (Additions may + be documented there as well, but this isn't required.) +- Changes to the libmpv API must be reflected in the libmpv's headers doxygen, + and in client-api-changes.rst. + +Code formatting +--------------- + +mpv uses C11 with K&R formatting, with some exceptions. + +- Use the K&R indent style. +- Use 4 spaces of indentation, never use tabs (except in Makefiles). +- Add a single space between keywords and binary operators. There are some other + cases where spaces must be added. Example: + + ```C + if ((a * b) > c) { + // code + some_function(a, b, c); + } + ``` +- Break lines on 80 columns. There is a hard limit of 100 columns. You may ignore + this limit if there's a strong case that not breaking the line will increase + readability. Going over 100 columns might provoke endless discussions about + whether such a limit is needed or not, so avoid it. +- If the body of an if/for/while statement has more than 1 physical lines, then + always add braces, even if they're technically redundant. + + Bad: + + ```C + if (a) + // do something if b + if (b) + do_something(); + ``` + + Good: + + ```C + if (a) { + // do something if b + if (b) + do_something(); + } + ``` +- If the if has an else branch, both branches must use braces, even if they're + technically redundant. + + Example: + + ```C + if (a) { + one_line(); + } else { + one_other_line(); + } + ``` +- If an if condition spans multiple physical lines, then put the opening brace + for the if body on the next physical line. (Also, preferably always add a + brace, even if technically none is needed.) + + Example: + + ```C + if (very_long_condition_a && + very_long_condition_b) + { + code(); + } else { + ... + } + ``` + + (If the if body is simple enough, this rule can be skipped.) +- Remove any trailing whitespace. +- Do not make stray whitespaces changes. + +Header #include statement order +------------------------------- + +The order of ``#include`` statements in the source code is not very consistent. +New code must follow the following conventions: + +- Put standard includes (``#include `` etc.) on the top, +- then after a blank line, add library includes (``#include `` etc.) +- then after a blank line, add internal includes (``#include "player/core.h"``) +- sort them alphabetically within these sections + +General coding +-------------- + +- Use C11. Also freely make use of C11 features if it's appropriate, but do not + use VLA and complex number types. +- Don't use non-standard language (such as GNU C-only features). In some cases + they may be warranted, if they are optional (such as attributes enabling + printf-like format string checks). "#pragma once" is allowed as an exception. + But in general, standard C11 must be used. +- The same applies to libc functions. We have to be Windows-compatible too. Use + functions guaranteed by C11 or POSIX only, unless your use is guarded by a + configure check. Be mindful of MinGW-specifics since C11 support is not always + guaranteed. +- Prefer fusing declaration and initialization, rather than putting declarations + on the top of a block. Obvious data flow is more important than avoiding + mixing declarations and statements, which is just a C90 artifact. +- If you add features that require intrusive changes, discuss them on the dev + channel first. There might be a better way to add a feature and it can avoid + wasted work. + +Code of Conduct +--------------- + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. +The Contributor Code of Conduct can be found here: +https://www.contributor-covenant.org/version/2/0/code_of_conduct/ + +Rules for git push access +------------------------- + +Push access to the main git repository is handed out on an arbitrary basis. If +you got access, the following rules must be followed: + +- You are expected to follow the general development rules as outlined in this + whole document. +- You must be present on the IRC dev channel when you push something. +- Anyone can push small fixes: typo corrections, small/obvious/uncontroversial + bug fixes, edits to the user documentation or code comments, and so on. +- You can freely make changes to parts of the code which you maintain. For + larger changes, it's recommended to let others review the changes first. +- You automatically maintain code if you wrote or modified most of it before + (e.g. you made larger changes to it before, did partial or full rewrites, did + major bug fixes, or you're the original author of the code). If there is more + than one maintainer, you may need to come to an agreement with the others how + to handle this to avoid conflict. +- If you make a pull requests (especially if it's to code you maintain), and you + want reviews, explicitly ping the people from which you expect reviews. +- As a maintainer, you can approve pull requests by others to "your" code. +- If you approve or merge 3rd party changes, make sure they follow the general + development rules. +- Changes to user interface and public API must always be approved by the + project leader. +- Seasoned project members are allowed to revert commits that broke the build, + or broke basic functionality in a catastrophic way, and the developer who + broke it is unavailable. (Depending on severity.) +- Adhere to the CoC. +- The project leader is not bound by these rules. diff --git a/DOCS/edl-mpv.rst b/DOCS/edl-mpv.rst new file mode 100644 index 0000000..0e4d2b4 --- /dev/null +++ b/DOCS/edl-mpv.rst @@ -0,0 +1,396 @@ +EDL files +========= + +EDL files basically concatenate ranges of video/audio from multiple source +files into a single continuous virtual file. Each such range is called a +segment, and consists of source file, source offset, and segment length. + +For example:: + + # mpv EDL v0 + f1.mkv,10,20 + f2.mkv + f1.mkv,40,10 + +This would skip the first 10 seconds of the file f1.mkv, then play the next +20 seconds, then switch to the file f2.mkv and play all of it, then switch +back to f1.mkv, skip to the 40 second mark, and play 10 seconds, and then +stop playback. The difference to specifying the files directly on command +line (and using ``--{ --start=10 --length=20 f1.mkv --}`` etc.) is that the +virtual EDL file appears as a virtual timeline (like a single file), instead +as a playlist. + +The general simplified syntax is:: + + # mpv EDL v0 + + ,, + +If the start time is omitted, 0 is used. If the length is omitted, the +estimated remaining duration of the source file is used. + +Note:: + + Usage of relative or absolute paths as well as any protocol prefixes may be + prevented for security reasons. + + +Syntax of mpv EDL files +======================= + +Generally, the format is relatively strict. No superfluous whitespace (except +empty lines and commented lines) are allowed. You must use UNIX line breaks. + +The first line in the file must be ``# mpv EDL v0``. This designates that the +file uses format version 0, which is not frozen yet and may change any time. +(If you need a stable EDL file format, make a feature request. Likewise, if +you have suggestions for improvements, it's not too late yet.) + +The rest of the lines belong to one of these classes: + +1) An empty or commented line. A comment starts with ``#``, which must be the + first character in the line. The rest of the line (up until the next line + break) is ignored. An empty line has 0 bytes between two line feed bytes. +2) A header entry if the line starts with ``!``. +3) A segment entry in all other cases. + +Each segment entry consists of a list of named or unnamed parameters. +Parameters are separated with ``,``. Named parameters consist of a name, +followed by ``=``, followed by the value. Unnamed parameters have only a +value, and the name is implicit from the parameter position. + +Syntax:: + + segment_entry ::= ( ',' )* + param ::= [ '=' ] ( | '%' '%' ) + +The ``name`` string can consist of any characters, except ``=%,;\n!``. The +``value`` string can consist of any characters except of ``,;\n!``. + +The construct starting with ``%`` allows defining any value with arbitrary +contents inline, where ``number`` is an integer giving the number of bytes in +``valuebytes``. If a parameter value contains disallowed characters, it has to +be guarded by a length specifier using this syntax. + +The parameter name defines the meaning of the parameter: + +1) ``file``, the source file to use for this segment. +2) ``start``, a time value that specifies the start offset into the source file. +3) ``length``, a time value that specifies the length of the segment. + +See the section below for the format of timestamps. + +Unnamed parameters carry implicit names. The parameter position determines +which of the parameters listed above is set. For example, the second parameter +implicitly uses the name ``start``. + +Example:: + + # mpv EDL v0 + %18%filename,with,.mkv,10,length=20,param3=%13%value,escaped,param4=value2 + +this sets ``file`` to ``filename,with,.mkv``, ``start`` to ``10``, ``length`` +to ``20``, ``param3`` to ``value,escaped``, ``param4`` to ``value2``. + +Instead of line breaks, the character ``;`` can be used. Line feed bytes and +``;`` are treated equally. + +Header entries start with ``!`` as first character after a line break. Header +entries affect all other file entries in the EDL file. Their format is highly +implementation specific. They should generally follow the file header, and come +before any file entries. + +Disabling chapter generation and copying +======================================== + +By default, chapters from the source ranges are copied to the virtual file's +chapters. Also, a chapter is inserted after each range. This can be disabled +with the ``no_chapters`` header. + +Example:: + + !no_chapters + + +MP4 DASH +======== + +This is a header that helps implementing DASH, although it only provides a low +level mechanism. + +If this header is set, the given url designates an mp4 init fragment. It's +downloaded, and every URL in the EDL is prefixed with the init fragment on the +byte stream level. This is mostly for use by mpv's internal ytdl support. The +ytdl script will call youtube-dl, which in turn actually processes DASH +manifests. It may work only for this very specific purpose and fail to be +useful in other scenarios. It can be removed or changed in incompatible ways +at any times. + +Example:: + + !mp4_dash,init=url + +The ``url`` is encoded as parameter value as defined in the general EDL syntax. +It's expected to point to an "initialization fragment", which will be prefixed +to every entry in the EDL on the byte stream level. + +The current implementation will + +- ignore stream start times +- use durations as hint for seeking only +- not adjust source timestamps +- open and close segments (i.e. fragments) as needed +- not add segment boundaries as chapter points +- require full compatibility between all segments (same codec etc.) + +Another header part of this mechanism is ``no_clip``. This header is similar +to ``mp4_dash``, but does not include on-demand opening/closing of segments, +and does not support init segments. It also exists solely to support internal +ytdl requirements. Using ``no_clip`` with segments is not recommended and +probably breaks. ``mp4_dash`` already implicitly does a variant of ``no_clip``. + +The ``mp4_dash`` and ``no_clip`` headers are not part of the core EDL format. +They may be changed or removed at any time, depending on mpv's internal +requirements. + +Separate files for tracks +========================= + +The special ``new_stream`` header lets you specify separate parts and time +offsets for separate tracks. This can for example be used to source audio and +video track from separate files. + +Example:: + + # mpv EDL v0 + video.mkv + !new_stream + audio.mkv + +This adds all tracks from both files to the virtual track list. Upon playback, +the tracks will be played at the same time, instead of appending them. The files +can contain more than 1 stream; the apparent effect is the same as if the second +part after the ``!new_stream`` part were in a separate ``.edl`` file and added +with ``--external-file``. + +Note that all metadata between the stream sets created by ``new_stream`` is +disjoint. Global metadata is taken from the first part only. + +In context of mpv, this is redundant to the ``--audio-file`` and +``--external-file`` options, but (as of this writing) has the advantage that +this will use a unified cache for all streams. + +The ``new_stream`` header is not part of the core EDL format. It may be changed +or removed at any time, depending on mpv's internal requirements. + +If the first ``!new_stream`` is redundant, it is ignored. This is the same +example as above:: + + # mpv EDL v0 + !new_stream + video.mkv + !new_stream + audio.mkv + +Note that ``!new_stream`` must be the first header. Whether the parser accepts +(i.e. ignores) or rejects other headers before that is implementation specific. + +Track metadata +============== + +The special ``track_meta`` header can set some specific metadata fields of the +current ``!new_stream`` partition. The tags are applied to all tracks within +the partition. It is not possible to set the metadata for individual tracks (the +feature was needed only for single-track media). + +It provides following parameters change track metadata: + +``lang`` + Set the language tag. + +``title`` + Set the title tag. + +``byterate`` + Number of bytes per second this stream uses. (Purely informational.) + +``index`` + The numeric index of the track this should map to (default: -1). This is + the 0-based index of the virtual stream as seen by the player, enumerating + all audio/video/subtitle streams. If nothing matches, this is silently + discarded. The special index -1 (the default) has two meanings: if there + was a previous meta data entry (either ``!track_meta`` or ``!delay_open`` + element since the last ``!new_stream``), then this element manipulates + the previous meta data entry. If there was no previous entry, a new meta + data entry that matches all streams is created. + +Example:: + + # mpv EDL v0 + !track_meta,lang=bla,title=blabla + file.mkv + !new_stream + !track_meta,title=ducks + sub.srt + +If ``file.mkv`` has an audio and a video stream, both will use ``blabla`` as +title. The subtitle stream will use ``ducks`` as title. + +The ``track_meta`` header is not part of the core EDL format. It may be changed +or removed at any time, depending on mpv's internal requirements. + +Global metadata +=============== + +The special ``global_tags`` header can set metadata fields (aka tags) of the EDL +file. This metadata is supposed to be informational, much like for example ID3 +tags in audio files. Due to lack of separation of different kinds of metadata it +is unspecified what names are allowed, how they are interpreted, and whether +some of them affect playback functionally. (Much of this is unfortunately +inherited from FFmpeg. Another consequence of this is that FFmpeg "normalized" +tags are recognized, or stuff like replaygain tags.) + +Example:: + + !global_tags,title=bla,something_arbitrary=even_more_arbitrary + +Any parameter names are allowed. Repeated use of this adds to the tag list. If +``!new_stream`` is used, the location doesn't matter. + +May possibly be ignored in some cases, such as delayed media opening. + +Delayed media opening +===================== + +The special ``delay_open`` header can be used to open the media URL of the +stream only when the track is selected for the first time. This is supposed to +be an optimization to speed up opening of a remote stream if there are many +tracks for whatever reasons. + +This has various tricky restrictions, and also will defer failure to open a +stream to "later". By design, it's supposed to be used for single-track streams. + +Using multiple segments requires you to specify all offsets and durations (also +it was never tested whether it works at all). Interaction with ``mp4_dash`` may +be strange. + +You can describe multiple sub-tracks by using multiple ``delay_open`` headers +before the same source URL. (If there are multiple sub-tracks of the same media +type, then the mapping to the real stream is probably rather arbitrary.) If the +source contains tracks not described, a warning is logged when the delayed +opening happens, and the track is hidden. + +This has the following parameters: + +``media_type`` + Required. Must be set to ``video``, ``audio``, or ``sub``. (Other tracks in + the opened URL are ignored.) + +``codec`` + The mpv codec name that is expected. Although mpv tries to initialize a + decoder with it currently (and will fail track selection if it does not + initialize successfully), it is not used for decoding - decoding still uses + the information retrieved from opening the actual media information, and may + be a different codec (you should try to avoid this, of course). Defaults to + ``null``. + + Above also applies for similar fields such as ``w``. These fields are + mostly to help with user track pre-selection. + +``flags`` + A ``+`` separated list of boolean flags. Currently defined flags: + + ``default`` + Set the default track flag. + + ``forced`` + Set the forced track flag. + + Other values are ignored after triggering a warning. + +``w``, ``h`` + For video codecs: expected video size. See ``codec`` for details. + +``fps`` + For video codecs: expected video framerate, as integer. (The rate is usually + only crudely reported, and it makes no sense to expect exact values.) + +``samplerate`` + For audio codecs: expected sample rate, as integer. + +The ``delay_open`` header is not part of the core EDL format. It may be changed +or removed at any time, depending on mpv's internal requirements. + +Timestamp format +================ + +Currently, time values are floating point values in seconds. + +As an extension, you can set the ``timestamps=chapters`` option. If this option +is set, timestamps have to be integers, and refer to chapter numbers, starting +with 0. The default value for this parameter is ``seconds``, which means the +time is as described in the previous paragraph. + +Example:: + + # mpv EDL v0 + file.mkv,2,4,timestamps=chapters + +Plays chapter 3 and ends with the start of chapter 7 (4 chapters later). + +Implicit chapters +================= + +mpv will add one chapter per segment entry to the virtual timeline. + +By default, the chapter's titles will match the entries' filenames. +You can override set the ``title`` option to override the chapter title for +that segment. + +Example:: + + # mpv EDL v0 + cap.ts,5,240 + OP.mkv,0,90,title=Show Opening + +The virtual timeline will have two chapters, one called "cap.ts" from 0-240s +and a second one called "Show Opening" from 240-330s. + +Entry which defines the track layout +==================================== + +Normally, you're supposed to put only files with compatible layouts into an EDL +file. However, at least the mpv implementation accepts entries that use +different codecs, or even have a different number of audio/video/subtitle +tracks. In this case, it's not obvious, which virtual tracks the EDL show should +expose when being played. + +Currently, mpv will apply an arbitrary heuristic which tracks the EDL file +should expose. (Before mpv 0.30.0, it always used the first source file in the +segment list.) + +You can set the ``layout`` option to ``this`` to make a specific entry define +the track layout. + +Example:: + + # mpv EDL v0 + file_with_2_streams.ts,5,240 + file_with_5_streams.mkv,0,90,layout=this + +The way the different virtual EDL tracks are associated with the per-segment +ones is highly implementation-defined, and uses a heuristic. If a segment is +missing a track, there will be a "hole", and bad behavior may result. Improving +this is subject to further development (due to being fringe cases, they don't +have a high priority). + +If future versions of mpv change this again, this option may be ignored. + +Syntax of EDL URIs +================== + +mpv accepts inline EDL data in form of ``edl://`` URIs. Other than the +header, the syntax is exactly the same. It's far more convenient to use ``;`` +instead of line breaks, but that is orthogonal. + +Example: ``edl://f1.mkv,length=5,start=10;f2.mkv,30,20;f3.mkv`` diff --git a/DOCS/encoding.rst b/DOCS/encoding.rst new file mode 100644 index 0000000..9c6c067 --- /dev/null +++ b/DOCS/encoding.rst @@ -0,0 +1,155 @@ +General usage +============= + +:: + + mpv infile --o=outfile [--of=outfileformat] [--ofopts=formatoptions] [--orawts] \ + [(any other mpv options)] \ + --ovc=outvideocodec [--ovcopts=outvideocodecoptions] \ + --oac=outaudiocodec [--oacopts=outaudiocodecoptions] + +Help for these options is provided if giving help as parameter, as in:: + + mpv --ovc=help + +The suboptions of these generally are identical to ffmpeg's (as option parsing +is simply delegated to ffmpeg). The option --ocopyts enables copying timestamps +from the source as-is, instead of fixing them to match audio playback time +(note: this doesn't work with all output container formats); --orawts even turns +off discontinuity fixing. + +Note that if neither --ofps nor --oautofps is specified, VFR encoding is assumed +and the time base is 24000fps. --oautofps sets --ofps to a guessed fps number +from the input video. Note that not all codecs and not all formats support VFR +encoding, and some which do have bugs when a target bitrate is specified - use +--ofps or --oautofps to force CFR encoding in these cases. + +Of course, the options can be stored in a profile, like this .config/mpv/mpv.conf +section:: + + [myencprofile] + vf-add = scale=480:-2 + ovc = libx264 + ovcopts-add = preset=medium + ovcopts-add = tune=fastdecode + ovcopts-add = crf=23 + ovcopts-add = maxrate=1500k + ovcopts-add = bufsize=1000k + ovcopts-add = rc_init_occupancy=900k + ovcopts-add = refs=2 + ovcopts-add = profile=baseline + oac = aac + oacopts-add = b=96k + +It's also possible to define default encoding options by putting them into +the section named ``[encoding]``. (This behavior changed after mpv 0.3.x. In +mpv 0.3.x, config options in the default section / no section were applied +to encoding. This is not the case anymore.) + +One can then encode using this profile using the command:: + + mpv infile --o=outfile.mp4 --profile=myencprofile + +Some example profiles are provided in a file +etc/encoding-profiles.conf; as for this, see below. + + +Encoding examples +================= + +These are some examples of encoding targets this code has been used and tested +for. + +Typical MPEG-4 Part 2 ("ASP", "DivX") encoding, AVI container:: + + mpv infile --o=outfile.avi \ + --vf=fps=25 \ + --ovc=mpeg4 --ovcopts=qscale=4 \ + --oac=libmp3lame --oacopts=b=128k + +Note: AVI does not support variable frame rate, so the fps filter must be used. +The frame rate should ideally match the input (25 for PAL, 24000/1001 or +30000/1001 for NTSC) + +Typical MPEG-4 Part 10 ("AVC", "H.264") encoding, Matroska (MKV) container:: + + mpv infile --o=outfile.mkv \ + --ovc=libx264 --ovcopts=preset=medium,crf=23,profile=baseline \ + --oac=libopus --oacopts=qscale=3 + +Typical MPEG-4 Part 10 ("AVC", "H.264") encoding, MPEG-4 (MP4) container:: + + mpv infile --o=outfile.mp4 \ + --ovc=libx264 --ovcopts=preset=medium,crf=23,profile=baseline \ + --oac=aac --oacopts=b=128k + +Typical VP8 encoding, WebM (restricted Matroska) container:: + + mpv infile -o outfile.mkv \ + --of=webm \ + --ovc=libvpx --ovcopts=qmin=6,b=1000000k \ + --oac=libopus --oacopts=qscale=3 + + +Device targets +============== + +As the options for various devices can get complex, profiles can be used. + +An example profile file for encoding is provided in +etc/encoding-profiles.conf in the source tree. This file is installed and loaded +by default. If you want to modify it, you can replace and it with your own copy +by doing:: + + mkdir -p ~/.mpv + cp /etc/mpv/encoding-profiles.conf ~/.mpv/encoding-profiles.conf + +Keep in mind that the default profile is the playback one. If you want to add +options that apply only in encoding mode, put them into a ``[encoding]`` +section. + +Refer to the top of that file for more comments - in a nutshell, the following +options are added by it:: + + --profile=enc-to-dvdpal # DVD-Video PAL, use dvdauthor -v pal+4:3 -a ac3+en + --profile=enc-to-dvdntsc # DVD-Video NTSC, use dvdauthor -v ntsc+4:3 -a ac3+en + --profile=enc-to-bb-9000 # MP4 for Blackberry Bold 9000 + --profile=enc-to-nok-6300 # 3GP for Nokia 6300 + --profile=enc-to-psp # MP4 for PlayStation Portable + --profile=enc-to-iphone # MP4 for iPhone + --profile=enc-to-iphone-4 # MP4 for iPhone 4 (double res) + --profile=enc-to-iphone-5 # MP4 for iPhone 5 (even larger res) + +You can encode using these with a command line like:: + + mpv infile --o=outfile.mp4 --profile=enc-to-bb-9000 + +Of course, you are free to override options set by these profiles by specifying +them after the -profile option. + + +What works +========== + +* Encoding at variable frame rate (default) +* Encoding at constant frame rate using --vf=fps=RATE +* 2-pass encoding (specify flags=+pass1 in the first pass's --ovcopts, specify + flags=+pass2 in the second pass) +* Hardcoding subtitles using vobsub, ass or srt subtitle rendering (just + configure mpv for the subtitles as usual) +* Hardcoding any other mpv OSD (e.g. time codes, using --osdlevel=3 and + --vf=expand=::::1) +* Encoding directly from a DVD, network stream, webcam, or any other source + mpv supports +* Using x264 presets/tunings/profiles (by using profile=, tune=, preset= in the + --ovcopts) +* Deinterlacing/Inverse Telecine with any of mpv's filters for that +* Audio file converting: mpv --o=outfile.m4a infile.flac --no-video + --oac=aac --oacopts=b=320k + +What does not work yet +====================== + +* 3-pass encoding (ensuring constant total size and bitrate constraints while + having VBR audio; mencoder calls this "frameno") +* Direct stream copy diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst new file mode 100644 index 0000000..f59f890 --- /dev/null +++ b/DOCS/interface-changes.rst @@ -0,0 +1,982 @@ +Introduction +============ + +mpv provides access to its internals via the following means: + +- options +- commands +- properties +- events +- hooks + +The sum of these mechanisms is sometimes called command interface. + +All of these are important for interfacing both with end users and API users +(which include Lua scripts, libmpv, and the JSON IPC). As such, they constitute +a large part of the user interface and APIs. + +Also see compatibility.rst. + +This document lists changes to them. New changes are added to the top. Usually, +only incompatible or important changes are mentioned. New options/commands/etc. +are not always listed. + +Interface changes +================= + +:: + + --- mpv 0.37.0 --- + - `--save-position-on-quit` and its associated commands now store state files + in %LOCALAPPDATA% instead of %APPDATA% directory by default on Windows. + - change `--subs-with-matching-audio` default from `no` to `yes` + - change `--subs-fallback` default from `no` to `default` + - add the `--hdr-peak-percentile` option + - include `--hdr-peak-percentile` in the `gpu-hq` profile + - change `--audiotrack-pcm-float` default from `no` to `yes` + - add video-params/aspect-name + - change type of `--sub-pos` to float + - The remaining time printed in the terminal is now adjusted for speed by default. + You can disable this with `--no-term-remaining-playtime`. + - add `playlist-path` and `playlist/N/playlist-path` properties + - add `--x11-wid-title` option + - add `--libplacebo-opts` option + - add `--audio-file-exts`, `--cover-art-auto-exts`, and `--sub-auto-exts` + - change `slang` default back to NULL + - remove special handling of the `auto` value from `--alang/slang/vlang` options + - add `--subs-match-os-language` as a replacement for `--slang=auto` + - add `always` option to `--subs-fallback-forced` + - remove `auto` choice from `--sub-forced-only` + - remove `auto-forced-only` property + - rename `--sub-forced-only` to `--sub-forced-events-only` + - remove `sub-forced-only-cur` property (`--sub-forced-events-only` is a replacement) + - remove deprecated `video-aspect` property + - add `--video-crop` + - add `video-params/crop-[w,h,x,y]` + - remove `--tone-mapping-mode` + - change `--subs-fallback-forced` so that it works alongside `--slang` + - add `--icc-3dlut-size=auto` and make it the default + - add `--scale=ewa_lanczos4sharpest` + - remove `--scale-wblur`, `--cscale-wblur`, `--dscale-wblur`, `--tscale-wblur` + - remove `bcspline` filter (`bicubic` is now the same as `bcspline`) + - rename `--cache-dir` and `--cache-unlink-files` to `--demuxer-cache-dir` and + `--demuxer-cache-unlink-files` + - enable `--correct-downscaling`, `--linear-downscaling`, `--sigmoid-upscaling` + - `--cscale` defaults to `--scale` if not defined + - change `--tscale` default to `oversample` + - change `--dither-depth` to `auto` + - deprecate `--profile=gpu-hq`, add `--profile=` + - change `--dscale` default to `hermite` + - update defaults to `--hdr-peak-decay-rate=20`, `--hdr-scene-threshold-low=1.0`, + `--hdr-scene-threshold-high=3.0` + - update defaults to `--deband-threshold=48`, `--deband-grain=32` + - add `--directory-mode=auto` and make it the default + - remove deprecated `--profile=opengl-hq` + - remove several legacy fallbacks for old deprecated options (now they will just + error out like normal) + - remove deprecated `drop-frame-count` and `vo-drop-frame-count` property aliases + - remove the ability to write to the `display-fps` property (use `override-display-fps` + instead) + - writing the current value to playlist-pos will no longer restart playback (use + `playlist-play-index` instead) + - remove deprecated `--oaoffset`, `--oafirst`, `--ovoffset`, `--ovfirst`, + `--demuxer-force-retry-on-eof`, `--fit-border` options + - remove deprecated `--record-file` option + - remove deprecated `--vf-defaults` and `--af-defaults` options + - `--drm-connector` no longer allows selecting the card number (use `--drm-device` + instead) + - add `--title-bar` option + - add `--window-corners` option + - rename `--cdrom-device` to `--cdda-device` + - remove `--scale-cutoff`, `--cscale-cutoff`, `--dscale-cutoff`, `--tscale-cutoff` + - remove `--scaler-lut-size` + - deprecate shared-script-properties (user-data is a replacement) + - add `--backdrop-type` option + - add `--window-affinity` option + - `--config-dir` no longer forces cache and state files to also reside in there + - deprecate `--demuxer-cue-codepage` in favor of `--metadata-codepage` + - change the default of `metadata-codepage` to `auto` + - add `playlist-next-playlist` and `playlist-prev-playlist` commands + - change `video-codec` to show description or name, not both + - deprecate `--cdda-toc-bias` option, offsets are always checked now + - disable `--allow-delayed-peak-detect` by default + - rename `--fps` to `--container-fps-override` + - rename `--override-display-fps` to `--display-fps-override` + - rename `--sub-ass-force-style` to `--sub-ass-style-overrides` + - alias `--screenshot-directory` to `--screenshot-dir` + - alias `--watch-later-directory` to `--watch-later-dir` + - rename `--play-dir` to `--play-direction` + - `--js-memory-report` is now used for enabling memory reporting for javascript + scripts + - drop support for `-del` syntax for list options + - `--demuxer-hysteresis-secs` now respects `--cache-secs` and/or + `--demuxer-readahead-secs` as well + - add hdr metadata to `video-params` property + - add `--target-gamut` + - change the way display names are retrieved on macOS, usage of options and properties + `--fs-screen-name`, `--screen-name` and `display-names` needs to be adjusted + - remove OpenGL cocoa backend that was deprecated in 0.29 + - remove `border`, `fullscreen`, `ontop`, `osd-level` and `pause` + from default `--watch-later-options` + - add `video-*` and `secondary-sub-visibility` to default `--watch-later-options` + --- mpv 0.36.0 --- + - add `--target-contrast` + - Target luminance value is now also applied when ICC profile is used. + `--icc-use-luma` has been added to use ICC profile luminance value. + If target luminance and ICC luminance is not used, old behavior apply, + defaulting to 203 nits. (Only applies for `--vo=gpu-next`) + - `playlist/N/title` gets set upon opening the file if it wasn't already set + and a title is available. + - add the `--vo=kitty` video output driver, as well as the options + `--vo-kitty-cols`, `--vo-kitty-rows`, `--vo-kitty-width`, + `--vo-kitty-height`, `--vo-kitty-left`, `--vo-kitty-top`, + `--vo-kitty-config-clear`, `--vo-kitty-alt-screen` and + `--vo-kitty-use-shm` + - add `--force-render` + - add `--vo-sixel-config-clear`, `--vo-sixel-alt-screen` and + `--vo-sixel-buffered` + - add `--wayland-content-type` + - deprecate `--vo-sixel-exit-clear` and alias it to + `--vo-sixel-alt-screen` + - deprecate `--drm-atomic` + - add `--demuxer-hysteresis-secs` + - add `--video-sync=display-tempo` + - the `start` option is no longer unconditionally written by + watch-later. It is still written by default but you may + need to explicitly add `start` depending on how you have + `--watch-later-options` configured. + - add `--vd-lavc-dr=auto` and make it the default + - add support for the fractional scale protocol in wayland + - in wayland, hidpi window scaling now scales the window by the compositor's + dpi scale factor by default (can be disabled with --no-hidpi-window-scale + if fractional scaling support exists). + - change --screenshot-tag-colorspace default value from `no` to `yes` + - undeprecate vf_sub + - add `--tone-mapping=st2094-40` and `--tone-mapping=st2094-10` + - change `--screenshot-jxl-effort` default from `3` to `4`. + - add `--tone-mapping-visualize` + - change type of `--brightness`, `--saturation`, `--contrast`, `--hue` and + `--gamma` to float. + - add `platform` property + - add `--auto-window-resize` + - `--save-position-on-quit` and its associated commands now store state files in + the XDG_STATE_HOME directory by default. This only has an effect on linux/bsd + systems. + - mpv now implictly saves cache files in XDG_CACHE_HOME by default. This only has + an effect if the user enables options that would lead to cache being stored and + only makes a difference on linux/bsd systems. + - `--cache-on-disk` no longer requires explictly setting the `--cache-dir` option + - add `--icc-cache` and `--gpu-shader-cache` options to control whether or not to + save cache files for these features; explictly setting `--icc-cache-dir` and + `--gpu-shader-cache` is no longer required + - remove the `--tone-mapping-crosstalk` option + - add `--gamut-mapping-mode=perceptual|relative|saturation|absolute|linear` + - add `--corner-rounding` option + - change `--subs-with-matching-audio` default from `yes` to `no` + - change `--slang` default from blank to `auto` + - add `--input-cursor-passthrough` option to allow pointer events to completely + passthrough the mpv window + - icc and gpu-shader cache are now saved by default (use --no-icc-shader-cache and + --no-gpu-shader-cache to disable) + - add `--directory-mode=recursive|lazy|ignore` + - `--hwdec=yes` is now mapped to `auto-safe` rather than `auto` (also used + by ctrl+h keybind) + - add `--hdr-contrast-recovery` and `--hdr-contrast-smoothness` + - include `--hdr-contrast-recovery` in the `gpu-hq` profile + --- mpv 0.35.0 --- + - add the `--vo=gpu-next` video output driver, as well as the options + `--allow-delayed-peak-detect`, `--builtin-scalers`, + `--interpolation-preserve` `--lut`, `--lut-type`, `--image-lut`, + `--image-lut-type` and `--target-lut` along with it. + - add `--target-colorspace-hint` + - add `--tone-mapping-crosstalk` + - add `--tone-mapping` options `auto`, `spline` and `bt.2446a` + - add `--inverse-tone-mapping` + - add `--gamut-mapping-mode`, replacing `--gamut-clipping` and `--gamut-warning` + - add `--tone-mapping-mode`, replacing `--tone-mapping-desaturate` and + `--tone-mapping-desaturate-exponent`. + - add `dolbyvision` sub-parameter to `format` video filter + - `--sub-visibility` no longer has any effect on secondary subtitles + - add `film-grain` sub-parameter to `format` video filter + - add experimental `--vo=dmabuf-wayland` video output driver + - add `--x11-present` for controlling whether to use xorg's present extension + - add `engine` option to the `rubberband` audio filter to support the new + engine introduced in rubberband 3.0.0. Defaults to `finer` (new engine). + - add `--wayland-configure-bounds` option + - deprecate `--gamma-factor` + - deprecate `--gamma-auto` + - remove `--vulkan-disable-events` + - add `--glsl-shader-opts` + --- mpv 0.34.0 --- + - deprecate selecting by card number with `--drm-connector`, add + `--drm-device` which can be used instead + - add `--screen-name` and `--fs-screen-name` flags to allow selecting the + screen by its name instead of the index + - add `--macos-geometry-calculation` to change the rectangle used for screen + position and size calculation. the old behavior used the whole screen, + which didn't take the menu bar and Dock into account. The new default + behaviour includes both. To revert to the old behavior set this to + `whole`. + - add an additional optional `albumart` argument to the `video-add` command, + which tells mpv to load the given video as album art. + - undeprecate `--cache-secs` option + - remove `--icc-contrast` and introduce `--icc-force-contrast`. The latter + defaults to the equivalent of the old `--icc-contrast=inf`, and can + instead be used to specifically set the contrast to any value. + - add a `--watch-later-options` option to allow configuring which + options quit-watch-later saves + - make `current-window-scale` writeable and use it in the default input.conf + - add `--input-builtin-bindings` flag to control loading of built-in key + bindings during start-up (default: yes). + - add ``track-list/N/image`` sub-property + - remove `--opengl-restrict` option + - js custom-init: use filename ~~/init.js instead of ~~/.init.js (dot) + --- mpv 0.33.0 --- + - add `--d3d11-exclusive-fs` flag to enable D3D11 exclusive fullscreen mode + when the player enters fullscreen. + - directories in ~/.mpv/scripts/ (or equivalent) now have special semantics + (see mpv Lua scripting docs) + - names starting with "." in ~/.mpv/scripts/ (or equivalent) are now ignored + - js modules: ~~/scripts/modules.js/ is no longer used, global paths can be + set with custom init (see docs), dir-scripts first look at /modules/ + - the OSX bundle now logs to "~/Library/Logs/mpv.log" by default + - deprecate the --cache-secs option (once removed, the cache cannot be + limited by time anymore) + - remove deprecated legacy hook API ("hook-add", "hook-ack"). Use either the + libmpv API (mpv_hook_add(), mpv_hook_continue()), or the Lua scripting + wrappers (mp.add_hook()). + - improve how property change notifications are delivered on events and on + hooks. In particular, a hook event is only returned to a client after all + changes initiated before the hook point were delivered to the same client. + In addition, it should no longer happen that events and property change + notifications were interleaved in bad ways (it could happen that a + property notification delivered after an event contained a value that was + valid only before the event happened). + - the playlist-pos and playlist-pos-1 properties now can return and accept + -1, and are never unavailable. Out of range indexes are now accepted, but + behave like writing -1. + - the playlist-pos and playlist-pos-1 properties deprecate the current + behavior when writing back the current value to the property: currently, + this restarts playback, but in the future, it will do nothing. + Using the "playlist-play-index" command is recommended instead. + - add "playlist-play-index" command + - add playlist-current-pos, playlist-playing-pos properties + - Lua end-file events set the "error" field; this is deprecated; use the + "file_error" instead for this specific event. Scripts relying on the + "error" field for end-file will silently break at some point in the + future. + - remove deprecated --input-file option, add --input-ipc-client, which is + vaguely a replacement of the removed option, but not the same + - change another detail for track selection options (see --aid manpage + entry) + - reading loop-file property as native property or mpv_node will now return + "inf" instead of boolean true (also affects loop option) + - remove some --vo-direct3d-... options (it got dumbed down; use --vo=gpu) + - remove video-params/plane-depth property (was too vaguely defined) + - remove --video-sync-adrop-size option (implementation was changed, no + replacement for what this option did) + - undeprecate --video-sync=display-adrop + - deprecate legacy auto profiles (profiles starting with "extension." and + "protocol."). Use conditional auto profiles instead. + - the "subprocess" command does not connect spawned processes' stdin to + mpv's stdin anymore. Instead, stdin is connected to /dev/null by default. + To get the old behavior, set the "passthrough_stdin" argument to true. + - key/value list options do not accept ":" as item separator anymore, + only ",". This means ":" is always considered part of the value. + - remove deprecated --vo-vdpau-deint option + - add `delete-watch-later-config` command to complement + `write-watch-later-config` + --- mpv 0.32.0 --- + - change behavior when using legacy option syntax with options that start + with two dashes (``--`` instead of a ``-``). Now, using the recommended + syntax is required for options starting with ``--``, which means an option + value must be strictly passed after a ``=``, instead of as separate + argument. For example, ``--log-file f.txt`` was previously accepted and + behaved like ``--log-file=f.txt``, but now causes an error. Use of legacy + syntax that is still supported now prints a deprecation warning. + --- mpv 0.31.0 --- + - add `--resume-playback-check-mtime` to check consistent mtime when + restoring playback state. + - add `--d3d11-output-csp` to enable explicit selection of a D3D11 + swap chain color space. + - the --sws- options and similar now affect vo_image and screenshot + conversion (does not matter as much for vo_gpu, which does most of this + with shaders) + - add a builtin "sw-fast" profile, which restores performance settings + for software video conversion. These were switched to higher quality since + mpv 0.30.0 (related to the previous changelog entry). This affects video + outputs like vo_x11 and vo_drm, and screenshots, but not much else. + - deprecate --input-file (there are no plans to remove this short-term, + but it will probably eventually go away <- that was a lie) + - deprecate --video-sync=display-adrop (might be removed if it's in the way; + undeprecated or readded if it's not too much of a problem) + - deprecate all input section commands (these will be changed/removed, as + soon as mpv internals do not require them anymore) + - remove deprecated --playlist-pos alias (use --playlist-start) + - deprecate --display-fps, introduce --override-display-fps. The display-fps + property now is unavailable if no VO exists (or the VO did not return a + display FPS), instead of returning the option value in this case. The + property will keep existing, but writing to it is deprecated. + - the vf/af properties now do not reject the set value anymore, even if + filter chain initialization fails. Instead, the vf/af options are always + set to the user's value, even if it does not reflect the "runtime" vf/af + chain. + - the vid/aid/sid/secondary-sid properties (and their aliases: "audio", + "video", "sub") will now allow setting any track ID; before this change, + only IDs of actually existing tracks could be set (the restriction was + active the MPV_EVENT_FILE_LOADED/"file-loaded" event was sent). Setting + an ID for which no track exists is equivalent to disabling it. Note that + setting the properties to non-existing tracks may report it as selected + track for a small time window, until it's forced back to "no". The exact + details how this is handled may change in the future. + - remove old Apple Remote support, including --input-appleremote + - add MediaPlayer support and remove the old Media Key event tap on macOS. + this possibly also re-adds the Apple Remote support + - the "edition" property now strictly returns the value of the option, + instead of the runtime value. The new "current-edition" property needs to + be queried to read the runtime-chosen edition. This is a breaking change + for any users which expected "edition" to return the runtime-chosen + edition at default settings (--edition=auto). + - the "window-scale" property now strictly returns the value of the option, + instead of the actual size of the window. The new "current-window-scale" + property needs to be queried to read the value as indicated by the current + window size. This is a breaking change. + - explicitly deprecate passing more than 1 item to "-add" suffix in key/value + options (for example --script-opts-add). This was actually always + deprecated, like with other list options, but the option parser did not + print a warning in this particular case. + - deprecate -del for list options (use -remove instead, which is by content + instead of by integer index) + - if `--fs` is used but `--fs-screen` is not set, mpv will now use `--screen` + instead. + - change the default of --hwdec to "no" on RPI. The default used to be "mmal" + specifically if 'Raspberry Pi support' was enabled at configure time + (equivalent to --enable-rpi). Use --hwdec=mmal to get the old behavior. + --- mpv 0.30.0 --- + - add `--d3d11-output-format` to enable explicit selection of a D3D11 + swap chain format. + - rewrite DVB channel switching to use an integer value + `--dvbin-channel-switch-offset` for switching instead of the old + stream controls which are now gone. Cycling this property up or down will + change the offset to the channel which was initially tuned to. + Example for `input.conf`: `H cycle dvbin-channel-switch-offset up`, + `K cycle dvbin-channel-switch-offset down`. + - adapt `stream_dvb` to support writing to `dvbin-prog` at runtime + and also to consistently use dvbin-configuration over URI parameters + when provided + - add `--d3d11-adapter` to enable explicit selection of a D3D11 rendering + adapter by name. + - rename `--drm-osd-plane-id` to `--drm-draw-plane`, `--drm-video-plane-id` to + `--drm-drmprime-video-plane` and `--drm-osd-size` to `--drm-draw-surface-size` + to better reflect what the options actually control, that the values they + accept aren't actually internal DRM ID's (like with similar options in + ffmpeg's KMS support), and that the video plane is only used when the drmprime + overlay hwdec interop is active, with the video being drawn to the draw plane + otherwise. + - in addition to the above, the `--drm-draw-plane` and `--drm-drmprime-video-plane` + options now accept either an integer index, or the values primary or overlay. + `--drm-draw-plane` now defaults to primary and `--drm-drmprime-video-plane` + defaults to overlay. This should be similar to previous behavior on most drivers + due to how planes are usually sorted. + - rename --opensles-frames-per-buffer to --opensles-frames-per-enqueue to + better reflect its purpose. In the past it overrides the buffer size the AO + requests (but not the default/value of the generic --audio-buffer option). + Now it only guarantees that the soft buffer size will not be smaller than + itself while setting the size per Enqueue. + - add --opensles-buffer-size-in-ms, allowing user to tune the soft buffer size. + It overrides the --audio-buffer option unless it's set to 0 (with the default + being 250). + - remove `--linear-scaling`, replaced by `--linear-upscaling` and + `--linear-downscaling`. This means that `--sigmoid-upscaling` no longer + implies linear light downscaling as well, which was confusing. + - the built-in `gpu-hq` profile now includes` --linear-downscaling`. + - support for `--spirv-compiler=nvidia` has been removed, leaving `shaderc` + as the only option. The `--spirv-compiler` option itself has been marked + as deprecated, and may be removed in the future. + - split up `--tone-mapping-desaturate`` into strength + exponent, instead of + only using a single value (which previously just controlled the exponent). + The strength now linearly blends between the linear and nonlinear tone + mapped versions of a color. + - add --hdr-peak-decay-rate and --hdr-scene-threshold-low/high + - add --tone-mapping-max-boost + - ipc: require that "request_id" fields are integers. Other types are still + accepted for compatibility, but this will stop in the future. Also, if no + request_id is provided, 0 will be assumed. + - mpv_command_node() and mp.command_native() now support named arguments + (see manpage). If you want to use them, use a new version of the manpage + as reference, which lists the definitive names. + - edition and disc title switching will now fully reload playback (may have + consequences for scripts, client API, or when using file-local options) + - with the removal of the stream cache, the following properties and options were + dropped: `cache`, `cache-size`, `cache-free`, `cache-used`, `--cache-default`, + `--cache-initial`, `--cache-seek-min`, `--cache-backbuffer`, `--cache-file`, + `--cache-file-size` + - the --cache option does not take a number value anymore + - remove async playback abort hack. This may make it impossible to abort + playback if --demuxer-thread=no is forced. + - remove `--macos-title-bar-style`, replaced by `--macos-title-bar-material` + and `--macos-title-bar-appearance`. + - The default for `--vulkan-async-compute` has changed to `yes` from `no` + with the move to libplacebo as the back-end for vulkan rendering. + - Remove "disc-titles", "disc-title", "disc-title-list", and "angle" + properties. dvd:// does not support title ranges anymore. + - Remove all "tv-..." options and properties, along with the classic Linux + analog TV support. + - remove "program" property (no replacement) + - always prefer EGL over GLX, which helps with AMD/vaapi, but will break + vdpau with --vo=gpu - use --gpu-context=x11 to be able to use vdpau. This + does not affect --vo=vdpau or --hwdec=vdpau-copy. + - remove deprecated --chapter option + - deprecate --record-file + - add `--demuxer-cue-codepage` + - add ``track-list/N/demux-bitrate``, ``track-list/N/demux-rotation`` and + ``track-list/N/demux-par`` property + - Deprecate ``--video-aspect`` and add ``--video-aspect-override`` to + replace it. (The `video-aspect` option remains unchanged.) + --- mpv 0.29.0 --- + - drop --opensles-sample-rate, as --audio-samplerate should be used if desired + - drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid, + --ad-spdif-dtshd, --softvol options + - fix --external-files: strictly never select any tracks from them, unless + explicitly selected (this may or may not be expected) + - --ytdl is now always enabled, even for libmpv + - add a number of --audio-resample-* options, which should from now on be + used instead of --af-defaults=lavrresample:... + - deprecate --vf-defaults and --af-defaults. These didn't work with the + lavfi bridge, so they have very little use left. The only potential use + is with af_lavrresample (going to be deprecated, --audio-resample-... set + its defaults), and various hw deinterlacing filters (like vf_vavpp), for + which you will have to stop using --deinterlace=yes, and instead use the + vf toggle commands and the filter enable/disable flag to customize it. + - deprecate --af=lavrresample. Use the ``--audio-resample-...`` options to + customize resampling, or the libavfilter ``--af=aresample`` filter. + - add --osd-on-seek + - remove outfmt sub-parameter from "format" video filter (no replacement) + - some behavior changes in the video filter chain, including: + - before, using an incompatible filter with hwdec would disable hwdec; + now it disables the filter at runtime instead + - inserting an incompatible filter with hwdec at runtime would refuse + to insert the filter; now it will add it successfully, but disables + the filter slightly later + - some behavior changes in the audio filter chain, including: + - a manually inserted lavrresample filter is not necessarily used for + sample format conversion anymore, so it's pretty useless + - changing playback speed will not respect --af-defaults anymore + - having libavfilter based filters after the scaletempo or rubberband + filters is not supported anymore, and may desync if playback speed is + changed (libavfilter does not support the metadata for playback speed) + - the lavcac3enc filter does not auto detach itself anymore; instead it + passes through the data after converting it to the sample rate and + channel configuration the ac3 encoder expects; also, if the audio + format changes midstream in a way that causes the filter to switch + between PCM and AC3 output, the audio output won't be reconfigured, + and audio playback will fail due to libswresample being unable to + convert between PCM and AC3 (Note: the responsible developer didn't + give a shit. Later changes might have improved or worsened this.) + - inserting a filter that changes the output sample format will not + reconfigure the AO - you need to run an additional "ao-reload" + command to force this if you want that + - using "strong" gapless audio (--gapless-audio=yes) can fail if the + audio formats are not convertible (such as switching between PCM and + AC3 passthrough) + - if filters do not pass through PTS values correctly, A/V sync can + result over time. Some libavfilter filters are known to be affected by + this, such as af_loudnorm, which can desync over time, depending on + how the audio track was muxed (af_lavfi's fix-pts suboption can help). + - remove out-format sub-parameter from "format" audio filter (no replacement) + - --lavfi-complex now requires uniquely named filter pads. In addition, + unconnected filter pads are not allowed anymore (that means every filter + pad must be connected either to another filter, or to a video/audio track + or video/audio output). If they are disconnected at runtime, the stream + will probably stall. + - rename --vo=opengl-cb to --vo=libmpv (goes in hand with the opengl-cb + API deprecation, see client-api-changes.rst) + - deprecate the OpenGL cocoa backend, option choice --gpu-context=cocoa + when used with --gpu-api=opengl (use --vo=libmpv) + - make --deinterlace=yes always deinterlace, instead of trying to check + certain unreliable video metadata. Also flip the defaults of all builtin + HW deinterlace filters to always deinterlace. + - change vf_vavpp default to use the best deinterlace algorithm by default + - remove a compatibility hack that allowed CLI aliases to be set as property + (such as "sub-file"), deprecated in mpv 0.26.0 + - deprecate the old command based hook API, and introduce a proper C API + (the high level Lua API for this does not change) + - rename the the lua-settings/ config directory to script-opts/ + - the way the player waits for scripts getting loaded changes slightly. Now + scripts are loaded in parallel, and block the player from continuing + playback only in the player initialization phase. It could change again in + the future. (This kind of waiting was always a feature to prevent that + playback is started while scripts are only half-loaded.) + - deprecate --ovoffset, --oaoffset, --ovfirst, --oafirst + - remove the following encoding options: --ocopyts (now the default, old + timestamp handling is gone), --oneverdrop (now default), --oharddup (you + need to use --vf=fps=VALUE), --ofps, --oautofps, --omaxfps + - remove --video-stereo-mode. This option was broken out of laziness, and + nobody wants to fix it. Automatic 3D down-conversion to 2D is also broken, + although you can just insert the stereo3d filter manually. The obscurity + of 3D content doesn't justify such an option anyway. + - change cycle-values command to use the current value, instead of an + internal counter that remembered the current position. + - remove deprecated ao/vo auto profiles. Consider using scripts like + auto-profiles.lua instead. + - --[c]scale-[w]param[1|2] and --tone-mapping-param now accept "default", + and if set to that value, reading them as property will also return + "default", instead of float nan as in previous versions + --- mpv 0.28.0 --- + - rename --hwdec=mediacodec option to mediacodec-copy, to reflect + conventions followed by other hardware video decoding APIs + - drop previously deprecated --heartbeat-cmd and --heartbeat--interval + options + - rename --vo=opengl to --vo=gpu + - rename --opengl-backend to --gpu-context + - rename --opengl-shaders to --glsl-shaders + - rename --opengl-shader-cache-dir to --gpu-shader-cache-dir + - rename --opengl-tex-pad-x/y to --gpu-tex-pad-x/y + - rename --opengl-fbo-format to --fbo-format + - rename --opengl-gamma to --gamma-factor + - rename --opengl-debug to --gpu-debug + - rename --opengl-sw to --gpu-sw + - rename --opengl-vsync-fences to --swapchain-depth, and the interpretation + slightly changed. Now defaults to 3. + - rename the built-in profile `opengl-hq` to `gpu-hq` + - the semantics of --opengl-es=yes are slightly changed -> now requires GLES + - remove the (deprecated) alias --gpu-context=drm-egl + - remove the (deprecated) --vo=opengl-hq + - remove --opengl-es=force2 (use --opengl-es=yes --opengl-restrict=300) + - the --msg-level option now affects --log-file + - drop "audio-out-detected-device" property - this was unavailable on all + audio output drivers for quite a while (coreaudio used to provide it) + - deprecate --videotoolbox-format (use --hwdec-image-format, which affects + most other hwaccels) + - remove deprecated --demuxer-max-packets + - remove most of the deprecated audio and video filters + - remove the deprecated --balance option/property + - rename the --opengl-hwdec-interop option to --gpu-hwdec-interop, and + change some of its semantics: extend it take the strings "auto" and + "all". "all" loads all backends. "auto" behaves like "all" for + vo_opengl_cb, while on vo_gpu it loads nothing, but allows on demand + loading by the decoder. The empty string as option value behaves like + "auto". Old --hwdec values do not work anymore. + This option is hereby declared as unstable and may change any time - its + old use is deprecated, and it has very little use outside of debugging + now. + - change the --hwdec option from a choice to a plain string (affects + introspection of the option/property), also affects some properties + - rename --hwdec=rpi to --hwdec=mmal, same for the -copy variant (no + backwards compatibility) + - deprecate the --ff-aid, --ff-vid, --ff-sid options and properties (there is + no replacement, but you can manually query the track property and use the + "ff-index" field to find the mpv track ID to imitate this behavior) + - rename --no-ometadata to --no-ocopy-metadata + --- mpv 0.27.0 --- + - drop previously deprecated --field-dominance option + - drop previously deprecated "osd" command + - remove client API compatibility handling for "script", "sub-file", + "audio-file", "external-file" (these cases used to log a deprecation + warning) + - drop deprecated --video-aspect-method=hybrid option choice + - rename --hdr-tone-mapping to --tone-mapping (and generalize it) + - --opengl-fbo-format changes from a choice to a string. Also, its value + will be checked only on renderer initialization, rather than when the + option is set. + - Using opengl-cb now always assumes 8 bit per component depth, and dithers + to this size. Before, it tried to figure out the depth of the first + framebuffer that was ever passed to the renderer. Having GL framebuffers + with a size larger than 8 bit per component is quite rare. If you need + it, set the --dither-depth option instead. + - --lavfi-complex can now be set during runtime. If you set this in + expectation it would be applied only after a reload, you might observe + weird behavior. + - add --track-auto-selection to help with scripts/applications that + make exclusive use of --lavfi-complex. + - undeprecate --loop, and map it from --loop-playlist to --loop-file (the + deprecation was to make sure no API user gets broken by a sudden behavior + change) + - remove previously deprecated vf_eq + - remove that hardware deinterlace filters (vavpp, d3d11vpp, vdpaupp) + changed their deinterlacing-enabled setting depending on what the + --deinterlace option or property was set to. Now, a filter always does + what its filter options and defaults imply. The --deinterlace option and + property strictly add/remove its own filters. For example, if you run + "mpv --vf=vavpp --deinterlace=yes", this will insert another, redundant + filter, which is probably not what you want. For toggling a deinterlace + filter manually, use the "vf toggle" command, and do not set the + deinterlace option/property. To customize the filter that will be + inserted automatically, use --vf-defaults. Details how this works will + probably change in the future. + - remove deinterlace=auto (this was not deprecated, but had only a very + obscure use that stopped working with the change above. It was also + prone to be confused with a feature not implemented by it: auto did _not_ + mean that deinterlacing was enabled on demand.) + - add shortened mnemonic names for mouse button bindings, eg. mbtn_left + the old numeric names (mouse_btn0) are deprecated + - remove mouse_btn3_dbl and up, since they are only generated for buttons + 0-2 (these now print an error when sent from the 'mouse' command) + - rename the axis bindings to wheel_up/down/etc. axis scrolling and mouse + wheel scrolling are now conceptually the same thing + the old axis_up/down names remain as deprecated aliases + --- mpv 0.26.0 --- + - remove remaining deprecated audio device options, like --alsa-device + Some of them were removed in earlier releases. + - introduce --replaygain... options, which replace the same functionality + provided by the deprecated --af=volume:replaygain... mechanism. + - drop the internal "mp-rawvideo" codec (used by --demuxer=rawvideo) + - rename --sub-ass-style-override to --sub-ass-override, and rename the + `--sub-ass-override=signfs` setting to `--sub-ass-override=scale`. + - change default of --video-aspect-method to "bitstream". The "hybrid" + method (old default) is deprecated. + - remove property "video-params/nom-peak" + - remove option --target-brightness + - replace vf_format's `peak` suboption by `sig-peak`, which is relative to + the reference white level instead of in cd/m^2 + - renamed the TRCs `st2084` and `std-b67` to `pq` and `hlg` respectively + - the "osd" command is deprecated (use "cycle osd-level") + - --field-dominance is deprecated (use --vf=setfield=bff or tff) + - --really-quiet subtle behavior change + - the deprecated handling of setting "no-" options via client API is dropped + - the following options change to append-by-default (and possibly separator): + --script + also, the following options are deprecated: + --sub-paths => --sub-file-paths + the following options are deprecated for setting via API: + "script" (use "scripts") + "sub-file" (use "sub-files") + "audio-file" (use "audio-files") + "external-file" (use "external-files") + (the compatibility hacks for this will be removed after this release) + - remove property `vo-performance`, and add `vo-passes` as a more general + replacement + - deprecate passing multiple arguments to -add/-pre options (affects the + vf/af commands too) + - remove --demuxer-lavf-cryptokey. Use --demux-lavf-o=cryptokey= or + --demux-lavf-o=decryption_key= instead (whatever fits your situation). + - rename --opengl-dumb-mode=no to --opengl-dumb-mode=auto, and make `no` + always disable it (unless forced on by hardware limitation). + - generalize --scale-clamp, --cscale-clamp etc. to accept a float between + 0.0 and 1.0 instead of just being a flag. A value of 1.0 corresponds to + the old `yes`, and a value of 0.0 corresponds to the old `no`. + --- mpv 0.25.0 --- + - remove opengl-cb dxva2 dummy hwdec interop + (see git "vo_opengl: remove dxva2 dummy hwdec backend") + - remove ppm, pgm, pgmyuv, tga choices from the --screenshot-format and + --vo-image-format options + - the "jpeg" choice in the option above now leads to a ".jpg" file extension + - --af=drc is gone (you can use e.g. lavfi/acompressor instead) + - remove image_size predefined uniform from OpenGL user shaders. Use + input_size instead + - add --sub-filter-sdh + - add --sub-filter-sdh-harder + - remove --input-app-events option (macOS) + - deprecate most --vf and --af filters. Only some filters not in libavfilter + will be kept. + Also, you can use libavfilter filters directly (e.g. you can use + --vf=name=opts instead of --vf=lavfi=[name=opts]), as long as the + libavfilter filter's name doesn't clash with a mpv builtin filter. + In the long term, --vf/--af syntax might change again, but if it does, it + will switch to libavfilter's native syntax. (The above mentioned direct + support for lavfi filters still has some differences, such as how strings + are escaped.) If this happens, the non-deprecated builtin filters might be + moved to "somewhere else" syntax-wise. + - deprecate --loop - after a deprecation period, it will be undeprecated, + but changed to alias --loop-file + - add --keep-open-pause=no + - deprecate --demuxer-max-packets + - change --audio-file-auto default from "exact" to "no" (mpv won't load + files with the same filename as the video, but different extension, as + audio track anymore) + --- mpv 0.24.0 --- + - deprecate --hwdec-api and replace it with --opengl-hwdec-interop. + The new option accepts both --hwdec values, as well as named backends. + A minor difference is that --hwdec-api=no (which used to be the default) + now actually does not preload any interop layer, while the new default + ("") uses the value of --hwdec. + - drop deprecated --ad/--vd features + - drop deprecated --sub-codepage syntax + - rename properties: + - "drop-frame-count" to "decoder-frame-drop-count" + - "vo-drop-frame-count" to "frame-drop-count" + The old names still work, but are deprecated. + - remove the --stream-capture option and property. No replacement. + (--record-file might serve as alternative) + - add --sub-justify + - add --sub-ass-justify + - internally there's a different way to enable the demuxer cache now + it can be auto-enabled even if the stream cache remains disabled + --- mpv 0.23.0 --- + - remove deprecated vf_vdpaurb (use "--hwdec=vdpau-copy" instead) + - the following properties now have new semantics: + - "demuxer" (use "current-demuxer") + - "fps" (use "container-fps") + - "idle" (use "idle-active") + - "cache" (use "cache-percent") + - "audio-samplerate" (use "audio-params/samplerate") + - "audio-channels" (use "audio-params/channel-count") + - "audio-format" (use "audio-codec-name") + (the properties equivalent to the old semantics are in parentheses) + - remove deprecated --vo and --ao sub-options (like --vo=opengl:...), and + replace them with global options. A somewhat complete list can be found + here: https://github.com/mpv-player/mpv/wiki/Option-replacement-list#mpv-0210 + - remove --vo-defaults and --ao-defaults as well + - remove deprecated global sub-options (like -demuxer-rawaudio format=...), + use flat options (like --demuxer-rawaudio-format=...) + - the --sub-codepage option changes in incompatible ways: + - detector-selection and fallback syntax is deprecated + - enca/libguess are removed and deprecated (behaves as if they hadn't + been compiled-in) + - --sub-codepage= does not force the codepage anymore + (this requires different and new syntax) + - remove --fs-black-out-screens option for macOS + - change how spdif codecs are selected. You can't enable spdif passthrough + with --ad anymore. This was deprecated; use --audio-spdif instead. + - deprecate the "family" selection with --ad/--vd + forcing/excluding codecs with "+", "-", "-" is deprecated as well + - explicitly mark --ad-spdif-dtshd as deprecated (it was done so a long time + ago, but it didn't complain when using the option) + --- mpv 0.22.0 --- + - the "audio-device-list" property now sets empty device description to the + device name as a fallback + - add --hidpi-window-scale option for macOS + - add audiounit audio output for iOS + - make --start-time work with --rebase-start-time=no + - add --opengl-early-flush=auto mode + - add --hwdec=vdpau-copy, deprecate vf_vdpaurb + - add tct video output for true-color and 256-color terminals + --- mpv 0.21.0 --- + - unlike in older versions, setting options at runtime will now take effect + immediately (see for example issue #3281). On the other hand, it will also + do runtime verification and reject option changes that do not work + (example: setting the "vf" option to a filter during playback, which fails + to initialize - the option value will remain at its old value). In general, + "set name value" should be mostly equivalent to "set options/name value" + in cases where the "name" property is not deprecated and "options/name" + exists - deviations from this are either bugs, or documented as caveats + in the "Inconsistencies between options and properties" manpage section. + - deprecate _all_ --vo and --ao suboptions. Generally, all suboptions are + replaced by global options, which do exactly the same. For example, + "--vo=opengl:scale=nearest" turns into "--scale=nearest". In some cases, + the global option is prefixed, e.g. "--vo=opengl:pbo" turns into + "--opengl-pbo". + Most of the exact replacements are documented here: + https://github.com/mpv-player/mpv/wiki/Option-replacement-list + - remove --vo=opengl-hq. Set --profile=opengl-hq instead. Note that this + profile does not force the VO. This means if you use the --vo option to + set another VO, it won't work. But this also means it can be used with + opengl-cb. + - remove the --vo=opengl "pre-shaders", "post-shaders" and "scale-shader" + sub-options: they were deprecated in favor of "user-shaders" + - deprecate --vo-defaults (no replacement) + - remove the vo-cmdline command. You can set OpenGL renderer options + directly via properties instead. + - deprecate the device/sink options on all AOs. Use --audio-device instead. + - deprecate "--ao=wasapi:exclusive" and "--ao=coreaudio:exclusive", + use --audio-exclusive instead. + - subtle changes in how "--no-..." options are treated mean that they are + not accessible under "options/..." anymore (instead, these are resolved + at parsing time). This does not affect options which start with "--no-", + but do not use the mechanism for negation options. + (Also see client API change for API version 1.23.) + - rename the following properties + - "demuxer" -> "current-demuxer" + - "fps" -> "container-fps" + - "idle" -> "idle-active" + - "cache" -> "cache-percent" + the old names are deprecated and will change behavior in mpv 0.23.0. + - remove deprecated "hwdec-active" and "hwdec-detected" properties + - deprecate the ao and vo auto-profiles (they never made any sense) + - deprecate "--vo=direct3d_shaders" - use "--vo=direct3d" instead. + Change "--vo=direct3d" to always use shaders by default. + - deprecate --playlist-pos option, renamed to --playlist-start + - deprecate the --chapter option, as it is redundant with --start/--end, + and conflicts with the semantics of the "chapter" property + - rename --sub-text-* to --sub-* and --ass-* to --sub-ass-* (old options + deprecated) + - incompatible change to cdda:// protocol options: the part after cdda:// + now always sets the device, not the span or speed to be played. No + separating extra "/" is needed. The hidden --cdda-device options is also + deleted (it was redundant with the documented --cdrom-device). + - deprecate --vo=rpi. It will be removed in mpv 0.23.0. Its functionality + was folded into --vo=opengl, which now uses RPI hardware decoding by + treating it as a hardware overlay (without applying GL filtering). Also + to be changed in 0.23.0: the --fs flag will be reset to "no" by default + (like on the other platforms). + - deprecate --mute=auto (informally has been since 0.18.1) + - deprecate "resume" and "suspend" IPC commands. They will be completely + removed in 0.23.0. + - deprecate mp.suspend(), mp.resume(), mp.resume_all() Lua scripting + commands, as well as setting mp.use_suspend. They will be completely + removed in 0.23.0. + - the "seek" command's absolute seek mode will now interpret negative + seek times as relative from the end of the file (and clamps seeks that + still go before 0) + - add almost all options to the property list, meaning you can change + options without adding "options/" to the property name (a new section + has been added to the manpage describing some conflicting behavior + between options and properties) + - implement changing sub-speed during playback + - make many previously fixed options changeable at runtime (for example + --terminal, --osc, --ytdl, can all be enable/disabled after + mpv_initialize() - this can be extended to other still fixed options + on user requests) + --- mpv 0.20.0 --- + - add --image-display-duration option - this also means that image duration + is not influenced by --mf-fps anymore in the general case (this is an + incompatible change) + --- mpv 0.19.0 --- + - deprecate "balance" option/property (no replacement) + --- mpv 0.18.1 --- + - deprecate --heartbeat-cmd + - remove --softvol=no capability: + - deprecate --softvol, it now does nothing + - --volume, --mute, and the corresponding properties now always control + softvol, and behave as expected without surprises (e.g. you can set + them normally while no audio is initialized) + - rename --softvol-max to --volume-max (deprecated alias is added) + - the --volume-restore-data option and property are removed without + replacement. They were _always_ internal, and used for watch-later + resume/restore. Now --volume/--mute are saved directly instead. + - the previous point means resuming files with older watch-later configs + will print an error about missing --volume-restore-data (which you can + ignore), and will not restore the previous value + - as a consequence, volume controls will no longer control PulseAudio + per-application value, or use the system mixer's per-application + volume processing + - system or per-application volume can still be controlled with the + ao-volume and ao-mute properties (there are no command line options) + --- mpv 0.18.0 --- + - now ab-loops are active even if one of the "ab-loop-a"/"-b" properties is + unset ("no"), in which case the start of the file is used if the A loop + point is unset, and the end of the file for an unset B loop point + - deprecate --sub-ass=no option by --ass-style-override=strip + (also needs --embeddedfonts=no) + - add "hwdec-interop" and "hwdec-current" properties + - deprecated "hwdec-active" and "hwdec-detected" properties (to be removed + in mpv 0.20.0) + - choice option/property values that are "yes" or "no" will now be returned + as booleans when using the mpv_node functions in the client API, the + "native" property accessors in Lua, and the JSON API. They can be set as + such as well. + - the VO opengl fbo-format sub-option does not accept "rgb" or "rgba" + anymore + - all VO opengl prescalers have been removed (replaced by user scripts) + --- mpv 0.17.0 --- + - deprecate "track-list/N/audio-channels" property (use + "track-list/N/demux-channel-count" instead) + - remove write access to "stream-pos", and change semantics for read access + - Lua scripts now don't suspend mpv by default while script code is run + - add "cache-speed" property + - rename --input-unix-socket to --input-ipc-server, and make it work on + Windows too + - change the exact behavior of the "video-zoom" property + - --video-unscaled no longer disables --video-zoom and --video-aspect + To force the old behavior, set --video-zoom=0 and --video-aspect=0 + --- mpv 0.16.0 --- + - change --audio-channels default to stereo (use --audio-channels=auto to + get the old default) + - add --audio-normalize-downmix + - change the default downmix behavior (--audio-normalize-downmix=yes to get + the old default) + - VO opengl custom shaders must now use "sample_pixel" as function name, + instead of "sample" + - change VO opengl scaler-resizes-only default to enabled + - add VO opengl "interpolation-threshold" suboption (introduces new default + behavior, which can change e.g. ``--video-sync=display-vdrop`` to the + worse, but is usually what you want) + - make "volume" and "mute" properties changeable even if no audio output is + active (this gives not-ideal behavior if --softvol=no is used) + - add "volume-max" and "mixer-active" properties + - ignore --input-cursor option for events injected by input commands like + "mouse", "keydown", etc. + --- mpv 0.15.0 --- + - change "yadif" video filter defaults + --- mpv 0.14.0 --- + - vo_opengl interpolation now requires --video-sync=display-... to be set + - change some vo_opengl defaults (including changing tscale) + - add "vsync-ratio", "estimated-display-fps" properties + - add --rebase-start-time option + This is a breaking change to start time handling. Instead of making start + time handling an aspect of different options and properties (like + "time-pos" vs. "playback-time"), make it dependent on the new option. For + compatibility, the "time-start" property now always returns 0, so code + which attempted to handle rebasing manually will not break. + --- mpv 0.13.0 --- + - remove VO opengl-cb frame queue suboptions (no replacement) + --- mpv 0.12.0 --- + - remove --use-text-osd (useless; fontconfig isn't a requirement anymore, + and text rendering is also lazily initialized) + - some time properties (at least "playback-time", "time-pos", + "time-remaining", "playtime-remaining") now are unavailable if the time + is unknown, instead of just assuming that the internal playback position + is 0 + - add --audio-fallback-to-null option + - replace vf_format outputlevels suboption with "video-output-levels" global + property/option; also remove "colormatrix-output-range" property + - vo_opengl: remove sharpen3/sharpen5 scale filters, add sharpen sub-option + --- mpv 0.11.0 --- + - add "af-metadata" property + --- mpv 0.10.0 --- + - add --video-aspect-method option + - add --playlist-pos option + - add --video-sync* options + "display-sync-active" property + "vo-missed-frame-count" property + "audio-speed-correction" and "video-speed-correction" properties + - remove --demuxer-readahead-packets and --demuxer-readahead-bytes + add --demuxer-max-packets and --demuxer-max-bytes + (the new options are not replacement and have very different semantics) + - change "video-aspect" property: always settable, even if no video is + running; always return the override - if no override is set, return + the video's aspect ratio + - remove disc-nav (DVD, BD) related properties and commands + - add "option-info//set-locally" property + - add --cache-backbuffer; change --cache-default default to 75MB + the new total cache size is the sum of backbuffer and the cache size + specified by --cache-default or --cache + - add ``track-list/N/audio-channels`` property + - change --screenshot-tag-colorspace default value + - add --stretch-image-subs-to-screen + - add "playlist/N/title" property + - add --video-stereo-mode=no to disable auto-conversions + - add --force-seekable, and change default seekability in some cases + - add vf yadif/vavpp/vdpaupp interlaced-only suboptions + Also, the option is enabled by default (Except vf_yadif, which has + it enabled only if it's inserted by the deinterlace property.) + - add --hwdec-preload + - add ao coreaudio exclusive suboption + - add ``track-list/N/forced`` property + - add audio-params/channel-count and ``audio-params-out/channel-count props. + - add af volume replaygain-fallback suboption + - add video-params/stereo-in property + - add "keypress", "keydown", and "keyup" commands + - deprecate --ad-spdif-dtshd and enabling passthrough via --ad + add --audio-spdif as replacement + - remove "get_property" command + - remove --slave-broken + - add vo opengl custom shader suboptions (source-shader, scale-shader, + pre-shaders, post-shaders) + - completely change how the hwdec properties work: + - "hwdec" now reflects the --hwdec option + - "hwdec-detected" does partially what the old "hwdec" property did + (and also, "detected-hwdec" is removed) + - "hwdec-active" is added + - add protocol-list property + - deprecate audio-samplerate and audio-channels properties + (audio-params sub-properties are the replacement) + - add audio-params and audio-out-params properties + - deprecate "audio-format" property, replaced with "audio-codec-name" + - deprecate --media-title, replaced with --force-media-title + - deprecate "length" property, replaced with "duration" + - change volume property: + - the value 100 is now always "unchanged volume" - with softvol, the + range is 0 to --softvol-max, without it is 0-100 + - the minimum value of --softvol-max is raised to 100 + - remove vo opengl npot suboption + - add relative seeking by percentage to "seek" command + - add playlist_shuffle command + - add --force-window=immediate + - add ao coreaudio change-physical-format suboption + - remove vo opengl icc-cache suboption, add icc-cache-dir suboption + - add --screenshot-directory + - add --screenshot-high-bit-depth + - add --screenshot-jpeg-source-chroma + - default action for "rescan_external_files" command changes + --- mpv 0.9.0 --- diff --git a/DOCS/man/af.rst b/DOCS/man/af.rst new file mode 100644 index 0000000..98f9a95 --- /dev/null +++ b/DOCS/man/af.rst @@ -0,0 +1,267 @@ +AUDIO FILTERS +============= + +Audio filters allow you to modify the audio stream and its properties. The +syntax is: + +``--af=...`` + Setup a chain of audio filters. See ``--vf`` (`VIDEO FILTERS`_) for the + full syntax. + +.. note:: + + To get a full list of available audio filters, see ``--af=help``. + + Also, keep in mind that most actual filters are available via the ``lavfi`` + wrapper, which gives you access to most of libavfilter's filters. This + includes all filters that have been ported from MPlayer to libavfilter. + + The ``--vf`` description describes how libavfilter can be used and how to + workaround deprecated mpv filters. + +See ``--vf`` group of options for info on how ``--af-add``, ``--af-pre``, +``--af-clr``, and possibly others work. + +Available filters are: + +``lavcac3enc[=options]`` + Encode multi-channel audio to AC-3 at runtime using libavcodec. Supports + 16-bit native-endian input format, maximum 6 channels. The output is + big-endian when outputting a raw AC-3 stream, native-endian when + outputting to S/PDIF. If the input sample rate is not 48 kHz, 44.1 kHz or + 32 kHz, it will be resampled to 48 kHz. + + ``tospdif=`` + Output raw AC-3 stream if ``no``, output to S/PDIF for + pass-through if ``yes`` (default). + + ``bitrate=`` + The bitrate use for the AC-3 stream. Set it to 384 to get 384 kbps. + + The default is 640. Some receivers might not be able to handle this. + + Valid values: 32, 40, 48, 56, 64, 80, 96, 112, 128, + 160, 192, 224, 256, 320, 384, 448, 512, 576, 640. + + The special value ``auto`` selects a default bitrate based on the + input channel number: + + :1ch: 96 + :2ch: 192 + :3ch: 224 + :4ch: 384 + :5ch: 448 + :6ch: 448 + + ``minch=`` + If the input channel number is less than ````, the filter will + detach itself (default: 3). + + ``encoder=`` + Select the libavcodec encoder used. Currently, this should be an AC-3 + encoder, and using another codec will fail horribly. + +``format=format:srate:channels:out-srate:out-channels`` + Does not do any format conversion itself. Rather, it may cause the + filter system to insert necessary conversion filters before or after this + filter if needed. It is primarily useful for controlling the audio format + going into other filters. To specify the format for audio output, see + ``--audio-format``, ``--audio-samplerate``, and ``--audio-channels``. This + filter is able to force a particular format, whereas ``--audio-*`` + may be overridden by the ao based on output compatibility. + + All parameters are optional. The first 3 parameters restrict what the filter + accepts as input. They will therefore cause conversion filters to be + inserted before this one. The ``out-`` parameters tell the filters or audio + outputs following this filter how to interpret the data without actually + doing a conversion. Setting these will probably just break things unless you + really know you want this for some reason, such as testing or dealing with + broken media. + + ```` + Force conversion to this format. Use ``--af=format=format=help`` to get + a list of valid formats. + + ```` + Force conversion to a specific sample rate. The rate is an integer, + 48000 for example. + + ```` + Force mixing to a specific channel layout. See ``--audio-channels`` option + for possible values. + + ```` + + ```` + + *NOTE*: this filter used to be named ``force``. The old ``format`` filter + used to do conversion itself, unlike this one which lets the filter system + handle the conversion. + +``scaletempo[=option1:option2:...]`` + Scales audio tempo without altering pitch, optionally synced to playback + speed. + + This works by playing 'stride' ms of audio at normal speed then consuming + 'stride*scale' ms of input audio. It pieces the strides together by + blending 'overlap'% of stride with audio following the previous stride. It + optionally performs a short statistical analysis on the next 'search' ms + of audio to determine the best overlap position. + + ``scale=`` + Nominal amount to scale tempo. Scales this amount in addition to + speed. (default: 1.0) + ``stride=`` + Length in milliseconds to output each stride. Too high of a value will + cause noticeable skips at high scale amounts and an echo at low scale + amounts. Very low values will alter pitch. Increasing improves + performance. (default: 60) + ``overlap=`` + Factor of stride to overlap. Decreasing improves performance. + (default: .20) + ``search=`` + Length in milliseconds to search for best overlap position. Decreasing + improves performance greatly. On slow systems, you will probably want + to set this very low. (default: 14) + ``speed=`` + Set response to speed change. + + tempo + Scale tempo in sync with speed (default). + pitch + Reverses effect of filter. Scales pitch without altering tempo. + Add this to your ``input.conf`` to step by musical semi-tones:: + + [ multiply speed 0.9438743126816935 + ] multiply speed 1.059463094352953 + + .. warning:: + + Loses sync with video. + both + Scale both tempo and pitch. + none + Ignore speed changes. + + .. admonition:: Examples + + ``mpv --af=scaletempo --speed=1.2 media.ogg`` + Would play media at 1.2x normal speed, with audio at normal + pitch. Changing playback speed would change audio tempo to match. + + ``mpv --af=scaletempo=scale=1.2:speed=none --speed=1.2 media.ogg`` + Would play media at 1.2x normal speed, with audio at normal + pitch, but changing playback speed would have no effect on audio + tempo. + + ``mpv --af=scaletempo=stride=30:overlap=.50:search=10 media.ogg`` + Would tweak the quality and performance parameters. + + ``mpv --af=scaletempo=scale=1.2:speed=pitch audio.ogg`` + Would play media at 1.2x normal speed, with audio at normal pitch. + Changing playback speed would change pitch, leaving audio tempo at + 1.2x. + +``scaletempo2[=option1:option2:...]`` + Scales audio tempo without altering pitch. + The algorithm is ported from chromium and uses the + Waveform Similarity Overlap-and-add (WSOLA) method. + It seems to achieves higher audio quality than scaletempo, and rubberband R2 + engine, or ``engine=faster``. This filter is inserted automatically if + ``audio-pitch-correction`` option is used (on by default) when the playback + speed is changed. + + By default, the ``search-interval`` and ``window-size`` parameters + have the same values as in chromium. + + ``min-speed=`` + Mute audio if the playback speed is below ````. (default: 0.25) + + ``max-speed=`` + Mute audio if the playback speed is above ```` + and `` != 0``. (default: 8.0) + + ``search-interval=`` + Length in milliseconds to search for best overlap position. (default: 40) + + ``window-size=`` + Length in milliseconds of the overlap-and-add window. (default: 12) + +``rubberband`` + High quality pitch correction with librubberband. This can be used in place + of ``scaletempo`` and ``scaletempo2``, and will be used to adjust audio pitch + when playing at speed different from normal. It can also be used to adjust + audio pitch without changing playback speed. + + ``pitch-scale=`` + Sets the pitch scaling factor. Frequencies are multiplied by this value. + (default: 1.0) + + ``engine=`` + Select the core Rubberband engine to be used. There are two available: + + :Faster: This is the Rubberband R2 engine. It uses significantly less + CPU than the Finer (R3) engine. + :Finer: This is the Rubberband R3 engine. This engine is only available + with librubberband version 3 or newer. This produces significantly + higher quality output, at the cost of higher CPU usage. (Default + if available) + + This filter has a number of additional sub-options. You can list them with + ``mpv --af=rubberband=help``. This will also show the default values + for each option. The options are not documented here, because they are + merely passed to librubberband. Look at the librubberband documentation + to learn what each option does: + https://breakfastquay.com/rubberband/code-doc/classRubberBand_1_1RubberBandStretcher.html + Do note that certain options are only applicable to one of R2 (faster) and + R3 (finer) engines. + (The mapping of the mpv rubberband filter sub-option names and values to + those of librubberband follows a simple pattern: ``"Option" + Name + Value``.) + + This filter supports the following ``af-command`` commands: + + ``set-pitch`` + Set the ```` argument dynamically. This can be used to + change the playback pitch at runtime. Note that speed is controlled + using the standard ``speed`` property, not ``af-command``. + + ``multiply-pitch `` + Multiply the current value of ```` dynamically. For + example: 0.5 to go down by an octave, 1.5 to go up by a perfect fifth. + If you want to go up or down by semi-tones, use 1.059463094352953 and + 0.9438743126816935 + +``lavfi=graph`` + Filter audio using FFmpeg's libavfilter. + + ```` + Libavfilter graph. See ``lavfi`` video filter for details - the graph + syntax is the same. + + .. warning:: + + Don't forget to quote libavfilter graphs as described in the lavfi + video filter section. + + ``o=`` + AVOptions. + + ``fix-pts=`` + Determine PTS based on sample count (default: no). If this is enabled, + the player won't rely on libavfilter passing through PTS accurately. + Instead, it pass a sample count as PTS to libavfilter, and compute the + PTS used by mpv based on that and the input PTS. This helps with filters + which output a recomputed PTS instead of the original PTS (including + filters which require the PTS to start at 0). mpv normally expects + filters to not touch the PTS (or only to the extent of changing frame + boundaries), so this is not the default, but it will be needed to use + broken filters. In practice, these broken filters will either cause slow + A/V desync over time (with some files), or break playback completely if + you seek or start playback from the middle of a file. + +``drop`` + This filter drops or repeats audio frames to adapt to playback speed. It + always operates on full audio frames, because it was made to handle SPDIF + (compressed audio passthrough). This is used automatically if the + ``--video-sync=display-adrop`` option is used. Do not use this filter (or + the given option); they are extremely low quality. diff --git a/DOCS/man/ao.rst b/DOCS/man/ao.rst new file mode 100644 index 0000000..4e4e454 --- /dev/null +++ b/DOCS/man/ao.rst @@ -0,0 +1,249 @@ +AUDIO OUTPUT DRIVERS +==================== + +Audio output drivers are interfaces to different audio output facilities. The +syntax is: + +``--ao=`` + Specify a priority list of audio output drivers to be used. + +If the list has a trailing ',', mpv will fall back on drivers not contained +in the list. + +.. note:: + + See ``--ao=help`` for a list of compiled-in audio output drivers. The + driver ``--ao=alsa`` is preferred. ``--ao=pulse`` is preferred on systems + where PulseAudio is used. On BSD systems, ``--ao=oss`` is preferred. + +Available audio output drivers are: + +``alsa`` (Linux only) + ALSA audio output driver + + See `ALSA audio output options`_ for options specific to this AO. + + .. warning:: + + To get multichannel/surround audio, use ``--audio-channels=auto``. The + default for this option is ``auto-safe``, which makes this audio output + explicitly reject multichannel output, as there is no way to detect + whether a certain channel layout is actually supported. + + You can also try `using the upmix plugin + `_. + This setup enables multichannel audio on the ``default`` device + with automatic upmixing with shared access, so playing stereo + and multichannel audio at the same time will work as expected. + +``oss`` + OSS audio output driver + +``jack`` + JACK (Jack Audio Connection Kit) audio output driver. + + The following global options are supported by this audio output: + + ``--jack-port=`` + Connects to the ports with the given name (default: physical ports). + ``--jack-name=`` + Client name that is passed to JACK (default: ``mpv``). Useful + if you want to have certain connections established automatically. + ``--jack-autostart=`` + Automatically start jackd if necessary (default: disabled). Note that + this tends to be unreliable and will flood stdout with server messages. + ``--jack-connect=`` + Automatically create connections to output ports (default: enabled). + When enabled, the maximum number of output channels will be limited to + the number of available output ports. + ``--jack-std-channel-layout=`` + Select the standard channel layout (default: waveext). JACK itself has no + notion of channel layouts (i.e. assigning which speaker a given + channel is supposed to map to) - it just takes whatever the application + outputs, and reroutes it to whatever the user defines. This means the + user and the application are in charge of dealing with the channel + layout. ``waveext`` uses WAVE_FORMAT_EXTENSIBLE order, which, even + though it was defined by Microsoft, is the standard on many systems. + The value ``any`` makes JACK accept whatever comes from the audio + filter chain, regardless of channel layout and without reordering. This + mode is probably not very useful, other than for debugging or when used + with fixed setups. + +``coreaudio`` (macOS only) + Native macOS audio output driver using AudioUnits and the CoreAudio + sound server. + + Automatically redirects to ``coreaudio_exclusive`` when playing compressed + formats. + + The following global options are supported by this audio output: + + ``--coreaudio-change-physical-format=`` + Change the physical format to one similar to the requested audio format + (default: no). This has the advantage that multichannel audio output + will actually work. The disadvantage is that it will change the + system-wide audio settings. This is equivalent to changing the ``Format`` + setting in the ``Audio Devices`` dialog in the ``Audio MIDI Setup`` + utility. Note that this does not affect the selected speaker setup. + + ``--coreaudio-spdif-hack=`` + Try to pass through AC3/DTS data as PCM. This is useful for drivers + which do not report AC3 support. It converts the AC3 data to float, + and assumes the driver will do the inverse conversion, which means + a typical A/V receiver will pick it up as compressed IEC framed AC3 + stream, ignoring that it's marked as PCM. This disables normal AC3 + passthrough (even if the device reports it as supported). Use with + extreme care. + + +``coreaudio_exclusive`` (macOS only) + Native macOS audio output driver using direct device access and + exclusive mode (bypasses the sound server). + +``openal`` + OpenAL audio output driver. + + ``--openal-num-buffers=<2-128>`` + Specify the number of audio buffers to use. Lower values are better for + lower CPU usage. Default: 4. + + ``--openal-num-samples=<256-32768>`` + Specify the number of complete samples to use for each buffer. Higher + values are better for lower CPU usage. Default: 8192. + + ``--openal-direct-channels=`` + Enable OpenAL Soft's direct channel extension when available to avoid + tinting the sound with ambisonics or HRTF. Default: yes. + +``pulse`` + PulseAudio audio output driver + + The following global options are supported by this audio output: + + ``--pulse-host=`` + Specify the host to use. An empty string uses a local connection, + "localhost" uses network transfer (most likely not what you want). + + ``--pulse-buffer=<1-2000|native>`` + Set the audio buffer size in milliseconds. A higher value buffers + more data, and has a lower probability of buffer underruns. A smaller + value makes the audio stream react faster, e.g. to playback speed + changes. "native" lets the sound server determine buffers. + + ``--pulse-latency-hacks=`` + Enable hacks to workaround PulseAudio timing bugs (default: no). If + enabled, mpv will do elaborate latency calculations on its own. If + disabled, it will use PulseAudio automatically updated timing + information. Disabling this might help with e.g. networked audio or + some plugins, while enabling it might help in some unknown situations + (it used to be required to get good behavior on old PulseAudio versions). + + If you have stuttering video when using pulse, try to enable this + option. (Or try to update PulseAudio.) + + ``--pulse-allow-suspended=`` + Allow mpv to use PulseAudio even if the sink is suspended (default: no). + Can be useful if PulseAudio is running as a bridge to jack and mpv has its sink-input set to the one jack is using. + +``pipewire`` + PipeWire audio output driver + + The following global options are supported by this audio output: + + ``--pipewire-buffer=<1-2000|native>`` + Set the audio buffer size in milliseconds. A higher value buffers + more data, and has a lower probability of buffer underruns. A smaller + value makes the audio stream react faster, e.g. to playback speed + changes. "native" lets the sound server determine buffers. + + ``--pipewire-remote=`` + Specify the PipeWire remote daemon name to connect to via local UNIX + sockets. + An empty string uses the default remote named ``pipewire-0``. + + ``--pipewire-volume-mode=`` + Specify if the ``ao-volume`` property should apply to the channel + volumes or the global volume. + By default the channel volumes are used. + +``sdl`` + SDL 1.2+ audio output driver. Should work on any platform supported by SDL + 1.2, but may require the ``SDL_AUDIODRIVER`` environment variable to be set + appropriately for your system. + + .. note:: This driver is for compatibility with extremely foreign + environments, such as systems where none of the other drivers + are available. + + The following global options are supported by this audio output: + + ``--sdl-buflen=`` + Sets the audio buffer length in seconds. Is used only as a hint by the + sound system. Playing a file with ``-v`` will show the requested and + obtained exact buffer size. A value of 0 selects the sound system + default. + +``null`` + Produces no audio output but maintains video playback speed. You can use + ``--ao=null --ao-null-untimed`` for benchmarking. + + The following global options are supported by this audio output: + + ``--ao-null-untimed`` + Do not simulate timing of a perfect audio device. This means audio + decoding will go as fast as possible, instead of timing it to the + system clock. + + ``--ao-null-buffer`` + Simulated buffer length in seconds. + + ``--ao-null-outburst`` + Simulated chunk size in samples. + + ``--ao-null-speed`` + Simulated audio playback speed as a multiplier. Usually, a real audio + device will not go exactly as fast as the system clock. It will deviate + just a little, and this option helps to simulate this. + + ``--ao-null-latency`` + Simulated device latency. This is additional to EOF. + + ``--ao-null-broken-eof`` + Simulate broken audio drivers, which always add the fixed device + latency to the reported audio playback position. + + ``--ao-null-broken-delay`` + Simulate broken audio drivers, which don't report latency correctly. + + ``--ao-null-channel-layouts`` + If not empty, this is a ``,`` separated list of channel layouts the + AO allows. This can be used to test channel layout selection. + + ``--ao-null-format`` + Force the audio output format the AO will accept. If unset accepts any. + +``pcm`` + Raw PCM/WAVE file writer audio output + + The following global options are supported by this audio output: + + ``--ao-pcm-waveheader=`` + Include or do not include the WAVE header (default: included). When + not included, raw PCM will be generated. + ``--ao-pcm-file=`` + Write the sound to ```` instead of the default + ``audiodump.wav``. If ``no-waveheader`` is specified, the default is + ``audiodump.pcm``. + ``--ao-pcm-append=`` + Append to the file, instead of overwriting it. Always use this with the + ``no-waveheader`` option - with ``waveheader`` it's broken, because + it will write a WAVE header every time the file is opened. + +``sndio`` + Audio output to the OpenBSD sndio sound system + + (Note: only supports mono, stereo, 4.0, 5.1 and 7.1 channel + layouts.) + +``wasapi`` + Audio output to the Windows Audio Session API. diff --git a/DOCS/man/changes.rst b/DOCS/man/changes.rst new file mode 100644 index 0000000..63de41c --- /dev/null +++ b/DOCS/man/changes.rst @@ -0,0 +1,20 @@ +CHANGELOG +========= + +There is no real changelog, but you can look at the following things: + +* The release changelog, which should contain most user-visible changes, + including new features and bug fixes: + + https://github.com/mpv-player/mpv/releases +* The git log, which is the "real" changelog +* The file https://github.com/mpv-player/mpv/blob/master/DOCS/interface-changes.rst + documents changes to the command and user interface, such as options and + properties. (It usually documents breaking changes only, additions and + enhancements are often not listed.) +* C API changes are listed in + https://github.com/mpv-player/mpv/blob/master/DOCS/client-api-changes.rst +* The file ``mplayer-changes.rst`` in the ``DOCS`` sub directory on the git + repository, which used to be in place of this section. It documents some + changes that happened since mplayer2 forked off MPlayer. (Not updated + anymore.) diff --git a/DOCS/man/console.rst b/DOCS/man/console.rst new file mode 100644 index 0000000..49502b3 --- /dev/null +++ b/DOCS/man/console.rst @@ -0,0 +1,167 @@ +CONSOLE +======= + +The console is a REPL for mpv input commands. It is displayed on the video +window. It also shows log messages. It can be disabled entirely using the +``--load-osd-console=no`` option. + +Keybindings +----------- + +\` + Show the console. + +ESC and Ctrl+[ + Hide the console. + +ENTER, Ctrl+j and Ctrl+m + Run the typed command. + +Shift+ENTER + Type a literal newline character. + +LEFT and Ctrl+b + Move the cursor to the previous character. + +RIGHT and Ctrl+f + Move the cursor to the next character. + +Ctrl+LEFT and Alt+b + Move the cursor to the beginning of the current word, or if between words, + to the beginning of the previous word. + +Ctrl+RIGHT and Alt+f + Move the cursor to the end of the current word, or if between words, to the + end of the next word. + +HOME and Ctrl+a + Move the cursor to the start of the current line. + +END and Ctrl+e + Move the cursor to the end of the current line. + +BACKSPACE and Ctrl+h + Delete the previous character. + +Ctrl+d + Hide the console if the current line is empty, otherwise delete the next + character. + +Ctrl+BACKSPACE and Ctrl+w + Delete text from the cursor to the beginning of the current word, or if + between words, to the beginning of the previous word. + +Ctrl+DEL and Alt+d + Delete text from the cursor to the end of the current word, or if between + words, to the end of the next word. + +Ctrl+u + Delete text from the cursor to the beginning of the current line. + +Ctrl+k + Delete text from the cursor to the end of the current line. + +Ctrl+c + Clear the current line. + +UP and Ctrl+p + Move back in the command history. + +DOWN and Ctrl+n + Move forward in the command history. + +PGUP + Go to the first command in the history. + +PGDN + Stop navigating the command history. + +INSERT + Toggle insert mode. + +Ctrl+v + Paste text (uses the clipboard on X11 and Wayland). + +Shift+INSERT + Paste text (uses the primary selection on X11 and Wayland). + +TAB and Ctrl+i + Complete the command or property name at the cursor. + +Ctrl+l + Clear all log messages from the console. + +Commands +-------- + +``script-message-to console type []`` + Show the console and pre-fill it with the provided text, optionally + specifying the initial cursor position as a positive integer starting from + 1. + + .. admonition:: Examples for input.conf + + ``% script-message-to console type "seek absolute-percent; keypress ESC" 6`` + Enter a percent position to seek to and close the console. + + ``Ctrl+o script-message-to console type "loadfile ''; keypress ESC" 11`` + Enter a file or URL to play. Tab completes paths in the filesystem. + +Known issues +------------ + +- Pasting text is slow on Windows +- Non-ASCII keyboard input has restrictions +- The cursor keys move between Unicode code-points, not grapheme clusters + +Configuration +------------- + +This script can be customized through a config file ``script-opts/console.conf`` +placed in mpv's user directory and through the ``--script-opts`` command-line +option. The configuration syntax is described in `ON SCREEN CONTROLLER`_. + +Key bindings can be changed in a standard way, see for example stats.lua +documentation. + +Configurable Options +~~~~~~~~~~~~~~~~~~~~ + +``scale`` + Default: 1 + + All drawing is scaled by this value, including the text borders and the + cursor. + + If the VO backend in use has HiDPI scale reporting implemented, the option + value is scaled with the reported HiDPI scale. + +``font`` + Default: unset (picks a hardcoded font depending on detected platform) + + Set the font used for the REPL and the console. + This has to be a monospaced font for the completion suggestions to be + aligned correctly. + +``font_size`` + Default: 16 + + Set the font size used for the REPL and the console. This will be + multiplied by "scale". + +``border_size`` + Default: 1 + + Set the font border size used for the REPL and the console. + +``history_dedup`` + Default: true + + Remove duplicate entries in history as to only keep the latest one. + multiplied by "scale." + +``font_hw_ratio`` + Default: 2.0 + + The ratio of font height to font width. + Adjusts table width of completion suggestions. diff --git a/DOCS/man/encode.rst b/DOCS/man/encode.rst new file mode 100644 index 0000000..399eba2 --- /dev/null +++ b/DOCS/man/encode.rst @@ -0,0 +1,107 @@ +ENCODING +======== + +You can encode files from one format/codec to another using this facility. + +``--o=`` + Enables encoding mode and specifies the output file name. + +``--of=`` + Specifies the output format (overrides autodetection by the file name + extension of the file specified by ``-o``). See ``--of=help`` for a full + list of supported formats. + +``--ofopts=`` + Specifies the output format options for libavformat. + See ``--ofopts=help`` for a full list of supported options. + + This is a key/value list option. See `List Options`_ for details. + + ``--ofopts-add=