summaryrefslogtreecommitdiffstats
path: root/TOOLS
Commit message (Collapse)AuthorAgeFilesLines
* vo_gpu, options: don't return NaN through APIwm42019-10-251-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Internally, vo_gpu uses NaN for some options to indicate a default value that is different depending on the context (e.g. different scalers). There are 2 problems with this: 1. you couldn't reset the options to their defaults 2. NaN is a damn mess and shouldn't be part of the API The option parser already rejected NaN explicitly, which is why 1. didn't work. Regarding 2., JSON might be a good example, and actually caused a bug report. Fix this by mapping NaN to the special value "default". I think I'd prefer other mechanisms (maybe just having every scaler expose separate options?), but for now this will do. See you in a future commit, which painfully deprecates this and replaces it with something else. I refrained from using "no" (my favorite magic value for "unset" etc.) because then I'd have e.g. make --no-scale-param1 work, which in addition to a lot of effort looks dumb and nobody will use it. Here's also an apology for the shitty added test script. Fixes: #6691
* skip-logo.lua: fix skipping in the first two frameswm42019-10-081-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mpv typically decodes and filters at least 2 frames before starting playback. This happens during seeks, as well as when playback starts from the beginning of the file. skip-logo.lua receives notifications for all filtered frames, even during seeking. It should interrupt during seeking, so as a crude heuristic, it ignored all frames while the player was seeking. This does not mean all these frames are skipped due to seeking (thus it's a "crude hueristic"). In particular, it means that the first 2 frames of a video cannot be skipped, since they're filtered within the playback restart phase (equivalent to "seeking"). Fix this by making the heuristic slightly less crude. Since we observe the property as "none", the property is not actually read until we do it explicitly. By not reading it during seeking, we can let the frames internally queue up (vf_fingerprint discards them in a ringbuffer-like fashion if they're too many). Then, if seeking ends, we get the current playback timestamp, and check queued up frames that are at or after that timestamp. (In some ways, this duplicates what the player's seeking logic does.) A disadvantage is that this is racy. While playback-time is guaranteed to be set when seeking changes from false to true, playback could already have progressed to the next frame (or more) before the script gets time to react. In theory, we could add a seek restart hook or so, but I don't want to. A property that returns the last playback restart time would also do it, but feels to special. Not an important problem in practice anyway.
* player: "subprocess" command should stop immediately in idle modewm42019-10-041-3/+13
| | | | | | | | | | | | The description of the "playback_only" field in the "subprocess" command says "you can't start it outside of playback". This did not work correctly: if the player was started in idle mode in the first place, the subprocess was allowed to run even with playback_only=yes. This is a bug, and this change fixes it. Add a test for this to command-test.lua. For #7025.
* autoload.lua: Configurable autoload typesMarek Sebera2019-10-021-4/+42
| | | | | | | | | | | Autoload script now suppports loading of not only video, but also image and audio files, in a manner, where one can configure which of the groups (audio, videos, images) is currently enabled. Use file script-opts/autoload.conf with key=value configuration keys disabled,images,videos,audio to configure autoload script. See documentation on top of the script
* zsh completion: move generation to runtime and improvePhilip Sequeira2019-09-271-283/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completion function itself now parses --list-options on the first tab press and caches the results. This does mean a slight delay on that first tab press, but it will only do this if the argument being completed looks like an option (i.e. starts with "-"), so there is never a delay when just completing a file name. I've also put some effort into making it reasonably fast; on my machine it's consistently under 100 ms, more than half of which is mpv itself. Installation of zsh completion is now done unconditionally because it's nothing more than copying a file. If you really don't want it installed, set zshdir to empty: `./waf configure --zshdir= ...` Improvements in functionality compared to the old script: * Produces the right results for mpv binaries other than the one it was installed with (like a dev build for testing changes). * Does not require running mpv at build time, so it won't cause problems with cross compilation. * Handles aliases. * Slightly nicer handling of options that take comma-separated values and/or sub-options: A space is now inserted at the end instead of a comma, allowing you to immediately start typing the next argument, but typing a comma will still remove the automatically added space, and = and : will now do that too, so you can immediately add a sub-option. * More general/flexible handling of values for options that print their possible values with --option=help. The code as is could handle quite a few more options (*scale, demuxers, decoders, ...), but nobody wants to maintain that list here so we'll just stick with what the old completion script already did.
* osxbundle: remove rpath definitions towards dev toolsder richter2019-09-221-1/+22
| | | | | | | | since the loading order of rpaths is system wide lib path, dev tool path and then bundle lib path it's possible for the xcode swift libs to be incompatible with the libs the bundle was build with. this leads to possible segfaults. if we distribute the bundle we don't want to load the libs from the dev tools anyway.
* build: fix swift linking with upcoming xcode 11der richter2019-09-221-0/+8
| | | | | | | in xcode 11 the dynamic swift libraries were moved to a separated versioned swift folder, which can't be used for linking and only for distribution. additional to the std dynamic swift lib folder the system wide folder is needed for linking too.
* video: add vf_fingerprint and a skip-logo scriptwm42019-09-191-0/+245
| | | | | | | | | | | | | | | | | | | | | | | | | skip-logo.lua is just what I wanted to have. Explanations are on the top of that file. As usual, all documentation threatens to remove this stuff all the time, since this stuff is just for me, and unlike a normal user I can afford the luxuary of hacking the shit directly into the player. vf_fingerprint is needed to support this script. It needs to scale down video frames as part of its operation. For that, it uses zimg. zimg is much faster than libswscale and generates more correct output. (The filter includes a runtime fallback, but it doesn't even work because libswscale fucks up and can't do YUV->Gray with range adjustment.) Note on the algorithm: seems almost too simple, but was suggested to me. It seems to be pretty effective, although long time experience with false positives is missing. At first I wanted to use dHash [1][2], which is also pretty simple and effective, but might actually be worse than the implemented mechanism. dHash has the advantage that the fingerprint is smaller. But exact matching is too unreliable, and you'd still need to determine the number of different bits for fuzzier comparison. So there wasn't really a reason to use it. [1] https://pypi.org/project/dhash/ [2] http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
* TOOLS/travis-rebuild-website: update condition after docker transitionRicardo Constantino2019-07-301-1/+1
| | | | Closes #6822
* osxbundle: bundle the dynamic swift std library when neededder richter2019-07-211-1/+20
|
* osxbundle: print the output of the dylib-unhell callder richter2019-07-211-2/+2
|
* appveyor: remove broken packages, install libplaceboJames Ross-Gowan2019-07-032-3/+1
| | | | | | | | Support for Ada and Objective-C was removed from MSYS2, which made pacman refuse to update GCC while the gcc-ada and gcc-objc packages were installed. Remove those packages before updating the others. Also remove ANGLE, which has been removed from MSYS2, and add libplacebo, which is now needed for the Vulkan VO.
* vo_gpu: d3d11: use the SPIRV-Cross C API directlyJames Ross-Gowan2019-06-122-5/+6
| | | | | | | | | | When the D3D11 backend was first written, SPIRV-Cross only had a C++ API and no guarantee of API or ABI stability, so instead of using SPIRV-Cross directly, mpv used an unofficial C wrapper called crossc. Now that KhronosGroup/SPIRV-Cross#611 is resolved, SPIRV-Cross has an official C API that can be used instead, so remove crossc and use SPIRV-Cross directly.
* appveyor: fix shaderc dependenciesJames Ross-Gowan2019-04-161-4/+3
| | | | | | Shaderc comes with a Python script that automatically fetches "known-good" versions of its dependencies. Use that instead of manually cloning dependencies to third-party.
* Merge commit '559a400ac36e75a8d73ba263fd7fa6736df1c2da' into ↵Anton Kindestam2018-12-051-0/+95
|\ | | | | | | | | | | wm4-commits--merge-edition This bumps libmpv version to 1.103
| * player: make various commands for managing external tracks abortablewm42018-05-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, they could be aborted only by ending playback, and calling mpv_abort_async_command didn't do anything. This requires furthering the mess how playback abort is done. The main reason why mp_cancel exists at all is to avoid that a "frozen" demuxer (blocked on network I/O or whatever) cannot freeze the core. The core should always get its way. Previously, there was a single mp_cancel handle, that could be signaled, and all demuxers would unfreeze. With external files, we might want to abort loading of a certain external file, which automatically means they need a separate mp_cancel. So give every demuxer its own mp_cancel, and "slave" it to whatever parent mp_cancel handles aborting. Since the mpv demuxer API conflates creating the demuxer and reading the file headers, mp_cancel strictly need to be created before the demuxer is created (or we couldn't abort loading). Although we give every demuxer its own mp_cancel (as "enforced" by cancel_and_free_demuxer), it's still rather messy to create/destroy it along with the demuxer.
| * client API: kill async commands on terminationwm42018-05-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | This affects async commands started by client API, commands with async capability run in a sync way by client API (think mpv_command_node() with "subprocess"), and detached async work. Since scripts might want to do some cleanup work (that might involve launching processes, don't ask), we don't unconditionally kill everything on exit, but apply an arbitrary timeout of 2 seconds until async commands are aborted.
| * lua: expose mpv_abort_async_command()wm42018-05-241-0/+9
| | | | | | | | Also somewhat cleans up mp.command_native_async() error handling.
| * command: add a subprocess commandwm42018-05-241-0/+5
| | | | | | | | | | | | | | This supports named arguments. It benefits from the infrastructure of async commands. The plan is to reimplement Lua's utils.subprocess() on top of it.
| * TOOLS: add a stupid test program for Lua async commandswm42018-05-241-0/+53
| |
* | TOOLS/autoload: Fixed broken "disabled" optionAndreas Wennerberg2018-06-231-0/+1
|/ | | | `--script-opts=autoload-disabled=yes` now properly stops the script from running.
* TOOLS/matroska.py: ignore some unused elementswm42018-04-291-1/+3
| | | | So that demux_mkv doesn't log them as unknown.
* TOOLS/autoload: be more robust with slow directory listingsRicardo Constantino2018-03-101-11/+24
| | | | | | | | | | Overall, just shuffled code around and added a few debugging messages for future issues. The issue could be reproduced easily by quickly navigating through the playlist inside a network mount. Closes #5618
* osxbundle: fix bundle creation with python3Akemi2018-03-081-6/+8
| | | | | | | | | | | | | | there were several problems that had to be fixed because of differences between python2 to python3: - subprocess.check_output returned an unicode instead of a string - filter() returns an iterator instead of a list - recursion limit was reached first two were fixed by explicitly converting to the needed type or using the proper function invocation. third was fixed by changing the recursive process_libraries function to an iterative one. Fixes #5600, #3316
* options: slightly improve filter help output for lavfi bridgewm42018-02-031-4/+4
| | | | | | | | | | | | | | --vf=help will now list libavfilter filters, and e.g. --vf=yadif=help will list libavfilter filter options. The latter is rather bare, because the AVOption API is really awful (holy shit how is it so bad), and would require us to handle _every_ option type manually. Alternatively we could call av_opt_show2(), which ffmpeg uses for help output in its CLI tools and which is much more detailed. But it's rather foreign and forces output through av_log(), so I don't really want to use it.
* travis: stop excluding ffmpeg-gitRicardo Constantino2017-12-221-1/+1
| | | | Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* appveyor: fix FFmpeg downloadJames Ross-Gowan2017-12-091-1/+1
| | | | | Broken in f19797dea62a. It seems like the Git server on git.ffmpeg.org doesn't like clone --depth=1, so use the GitHub mirror instead.
* Remove support for ffmpeg-mpvRostislav Pehlivanov2017-12-052-3/+3
|
* TOOLS/autoload.lua: update extensionsCkat2017-12-031-1/+1
| | | | | * duplicated 'ogv' renamed to 'ogm' * 'ogg' and 'opus' added as common audio file extensions
* appveyor: use git submodule update --initJames Ross-Gowan2017-11-131-2/+1
| | | | Thanks @jeeb.
* appveyor: update ffmpeg and test d3d11/vulkanJames Ross-Gowan2017-11-082-14/+57
| | | | | | | Build ffmpeg-mpv, shaderc and crossc from source, since they are not packaged in MSYS2. Also, add some more explicit --enable flags to the mpv build to make sure things like D3D11, D3D11VA hwaccels and Vulkan are auto-detected.
* travis: adjust ffmpeg URLwm42017-10-271-6/+2
| | | | No idea if this is correct.
* command: drop "audio-out-detected-device" propertywm42017-10-091-5/+0
| | | | | | Coreaudio stopped setting it a few releases ago (66a958bb4fa). There is not much of a user- or API-visible change, so remove it without deprecation.
* osx: fix bundle on macOS High Sierra (10.13)Akemi2017-10-034-14/+8
| | | | | | | | | | | | | | | | | | | | | | Apple slightly changed the App bundle mechanism which broke wrapper scripts that invoke the actual binary. it caused the bundle to always open a new instance of mpv instead of reusing the currently running one. just removing the wrapper script would lead to several regressions, so it was replaced with a symlink to the bundle binary. detection if mpv was started from the bundle was replaced by comparing the execution name of the binary, eg the name of the symlink "mpv-bundle". additionally, because we load a standard config from the Resources folder of the bundle again, we prevent that config from being loaded if mpv wasn't started via the bundle. the psn argument has to be removed manually again. the ability of loading your standard shell environment has been removed with the wrapper. a substitution will be added with another commit. as a side effect this fixes an issues when zsh was used with common NodeJS configuration scripts. Fixes #4926 #4866
* TOOLS/lua/autodeint: update to lavfi-bridgeRicardo Constantino2017-08-211-27/+38
| | | | | Also use lavfi setfield instead of removed field-dominance. Remove missing remainder of field-dominance in docs.
* video: add metadata handling for spherical videowm42017-08-211-0/+7
| | | | | | | | | | | | | | This adds handling of spherical video metadata: retrieving it from demux_lavf and demux_mkv, passing it through filters, and adjusting it with vf_format. This does not include support for rendering this type of video. We don't expect we need/want to support the other projection types like cube maps, so we don't include that for now. They can be added later as needed. Also raise the maximum sizes of stringified image params, since they can get really long.
* TOOLS/autocrop.lua: fix cropdetect black limit for 10-bit videosRicardo Constantino2017-08-171-3/+4
| | | | | Also update to use newer lavfi-bridges for the relevant filters to shut up warnings about deprecated crop filter.
* TOOLS/autoload.lua: implement natural sortingRicardo Constantino2017-08-161-9/+32
|
* travis: install missing x11 depsRicardo Constantino2017-08-071-1/+1
|
* acompressor.lua: Convert to use mp.options and lavfi filter bridgeJan Janssen2017-08-071-79/+108
|
* TOOLS/lua/status-line: improve and updateRostislav Pehlivanov2017-08-041-6/+27
| | | | | | | Updates the line once per second rather than once per frame, saving quite a bit of CPU. Also completely stops the script while paused. That aside, fixes the swapped checks for video and audio-only files and adds bitrate printing.
* travis: drop libav-stable supportwm42017-08-031-4/+0
| | | | | | | | | | | For libav-stable, we download the Libav tarball, which is failing, because their certificate is broken: ERROR: cannot verify libav.org's certificate, issued by `/C=US/O=Let\'s Encrypt/CN=Let\'s Encrypt Authority X3': Issued certificate has expired. I don't intend to support Libav's overly old releases anymore anyway, so if you want to use Libav, use its git master.
* osx: load the proper profiles and configs in the bundleAkemi2017-07-311-2/+11
| | | | | | | different shells need different args to load the expected profiles and configs, so we added a small heuristic to decide those args. also don't always load the profiles for a bash login shell and instead only use the standard shell without any args.
* osx: fix bundle for paths that need escapingAkemi2017-07-311-1/+2
| | | | | | this fixes the mpv binary call in our bundle wrapper script, in the case that the path to the binary needs escaping. examples are white spaces or special chars.
* travis: trigger website rebuild on VERSION changes tooRicardo Constantino2017-07-191-1/+1
| | | | Needed to update the stable manual if no DOCS were changed.
* x11: load icon differentlywm42017-07-011-15/+0
| | | | | | | | Now it's sourced from the etc/ PNG files directly, instead of preprocessing them with imagemagick. Add some ad-hoc code to decode PNG files with libavcodec. At least we can drop the zlib code in exchange.
* mpv_identify: replace deprecated fps propertyRicardo Constantino2017-06-251-1/+1
| | | | Closes #4550
* TOOLS: change license of some scripts involved in build to LGPLwm42017-06-243-10/+43
| | | | | wscript calls them directly, and thus are probably part of the build system. They seem to be fully covered by relicensing agreements.
* vf_dlopen: remove this filterwm42017-06-189-1417/+0
| | | | | | | | | | | | | | | | It was an attempt to move some MPlayer filters (which were removed from mpv) to external, loadable filters. That worked well, but then the MPlayer filters were ported to libavfilter (independently), so they're available again. Also there is a more widely supported and more advanced loadable filter system supported by mpv: vapoursynth. In conclusion, vf_dlopen is not useful anymore, confusing, and requires quite a bit of code (and probably wouldn't survive the rewrite of the mpv video filter chain, which has to come at some point). It has some implicit dependencies on internal conventions, like possibly the format names dropped in the previous commit. We also deprecated it last release. Drop it.
* TOOLS/lua/autoload.lua: ignores all files starting with "."Yue Zhu2017-05-201-0/+3
|
* TOOLS/lua/autoload.lua: actually sort files case insensitiveRicardo Constantino2017-05-041-1/+2
| | | | | Regression since 8996f79edbf. Closes #4398
* osx: fix mpv-wrapper.sh when used with csh or tcsh shelldownthomas2017-05-021-2/+2
| | | | | | | | If the default shell of the user is set to csh or tcsh, the use of "$SHELL -l -c" will fail to launch mpv because -l and -c cannot be used together with csh or tcsh. Signed-off-by: Akemi <der.richter@gmx.de>
* osd-font: make volume muted glyph slightly thickerRicardo Constantino2017-04-222-24/+21
|
* Add script to generate otf from sfdir using fontforgeRicardo Constantino2017-04-201-0/+9
| | | | | Uses python scripting on fontforge since native scripting is considered legacy and even Ubuntu Trusty seems to have python scripting.
* sub/osd_font.otf: replace triangle volume by speaker glyphRicardo Constantino2017-04-202-11/+12
| | | | | The triangle icon has potentially questionable copyright issues, see https://github.com/mpv-player/mpv/commit/a7e9bac13210834abd95380e89b5c3dae2336c52
*