summaryrefslogtreecommitdiffstats
path: root/TOOLS
Commit message (Collapse)AuthorAgeFilesLines
* TOOLS/lua/autoload: bump the msg-level of some loggingDudemanguy2023-10-031-6/+6
| | | | | | | msg.info for when you're potentially adding hundreds of files is way too spammy and not really useful (autoload loads files, what?). Bump it up to msg.verbose. Also bump up the previously existing msg.verbose logs up to msg.debug to keep the difference in log levels. Fixes #12551.
* TOOLS/autocrop.lua: switch to auto-copy hwdec during cropdetectGuido Cella2023-09-211-0/+20
| | | | | | | I didn't set file-local-options/hwdec because you have to store the hwdec value to restore it after cropdetect anyway, and if the user manually changes hwdec after cropdetect, the new value isn't reset when changing file.
* TOOLS/autocrop.lua: cleanup timers correctlyGuido Cella2023-09-211-1/+1
| | | | | | | If you change file while cropdetect is active and you try to crop the next video, it fails with "Already cropdetecting!". This is because timers.detect_crop wasn't cleared correctly, only the timer variable local to the loop was being set to nil.
* TOOLS/autocrop.lua: use VO crop alwaysKacper Michajłow2023-09-201-47/+12
| | | | | There is no reason not to and this significantly reduces script complexity.
* options: make video-crop validation more strictKacper Michajłow2023-09-201-2/+2
|
* TOOLS/matroska.py: add PixelCrop* elementsKacper Michajłow2023-09-171-0/+4
|
* TOOLS/lua/autoload: rename local variable to lowercaseChristoph Heinrich2023-09-151-6/+6
|
* TOOLS/lua/autoload: pass extensions to recursive callChristoph Heinrich2023-09-151-1/+1
| | | | Closes #12400
* TOOLS/lua/autoload: change EXTENSIONS_TARGET to a local variabledyphire2023-09-141-3/+4
|
* TOOLS/lua/autoload: fix specify loading only one type of filesdyphire2023-09-141-1/+1
| | | | Fixes: https://github.com/mpv-player/mpv/commit/5100e7acbabd52b7ebc996e1c73df059e7664018
* TOOLS/lua/autoload: add directory_mode optionChristoph Heinrich2023-09-131-2/+14
| | | | | | This option behaves the same as the builtin one, and if it's value is anything other then recursive|lazy|ignore it will fall back on the builtin one as a sort of "auto" mode. It defaults to that auto mode.
* TOOLS/lua/autoload: add recursive directory loadingChristoph Heinrich2023-09-131-36/+63
| | | | Recursion depth has been limited to 20, the same depth the demuxer uses.
* TOOLS/lua/autoload: avoid adding entries to the playlist more then onceChristoph Heinrich2023-09-131-13/+15
| | | | | Playlist entries should be added at most once, independent of if they got added by autoload or not.
* TOOLS/lua/autoload: support directoriesChristoph Heinrich2023-09-131-8/+22
| | | | | | | | | Adds support for adding directories to the playlist in addition to files. The propertiy `directory-mode` controls if directories get added. Recursive directory loading will get added in a later commit. Directories get sorted after files to behave the same way mpv behaves when it loads directories directly.
* autocrop.lua: enable vo_crop mode by defaultKacper Michajłow2023-09-081-1/+1
| | | | | It is just better way of cropping things. Can be disabled with script-opts if needed.
* autocrop.lua: don't remove crop on startup/exitKacper Michajłow2023-09-081-1/+4
| | | | | No need to remove/clean crop unlike with filters. Allows using autocrop with auto=false and custom --video-crop.
* autocrop.lua: detect if crop is enabled based on propKacper Michajłow2023-09-081-3/+5
| | | | | Now we can have full frame crop, so to avoid checking that, just check property.
* autocrop.lua: use new --video-cropKacper Michajłow2023-08-311-0/+14
| | | | | | | Gated behind option for backward compatibility. Note that this will not magically start working with hwdec, as we do not have crop detection for hwdec.
* player/command: remove video-aspect propertyKacper Michajłow2023-08-311-1/+1
| | | | 4 years is enough of deprecation period.
* TOOLS/lua/autoload: Enable run-time updates of optionsChristoph Heinrich2023-08-191-12/+23
| | | | additional_*_exts get parsed and saved as sets in the options themselves
* TOOLS/lua/autoload: may specify loading only one type of filessunpenghao2023-08-191-3/+18
| | | | | | | | | | Under the current file loading logic, a video file and an external audio track next to it will both be added to the playlist, which most users don't wish to happen. Having an option that tells the script to load only one type of files (video, audio, or image) can avoid this problem. It may also come in handy for people who have different types of files mixed in a folder but wish to consume only one type of media at a time.
* build: remove outdated generated directoryDudemanguy2023-07-311-0/+8
| | | | | | | | | | | | | | | | This only existed as essentially a workaround for meson's behavior and to maintain compatibility with the waf build. Since waf put everything in a generated subdirectory, we had to put make a subdirectory called "generated" in the source for meson so stuff could go to the right place. Well now we don't need to do that anymore. Move the meson.build files around so they go in the appropriate place in the subdirectory of the source tree and change the paths of the headers accordingly. A couple of important things to note. 1. mpv.com now gets made in build/player/mpv.com (necessary because of a meson limitation) 2. The macos icon generation path is shortened to TOOLS/osxbundle/icon.icns.inc.
* waf: remove waf as a build systemLaserEyess2023-07-231-0/+0
| | | | | | Remove waf entirely in favor of meson as the only supported build system. Waf was officially deprecated in 0.36.0, and has not been preferred over meson since 0.35.0.
* TOOLS: remove obsolete travisCI-related scriptssfan52023-07-192-168/+0
|
* TOOLS/idet: fix some outdated cli syntaxDudemanguy2023-07-061-1/+1
| | | | | | | | d3cef97ad38fb027262a905bd82e1d3d2549aec7 changed the way the command line was parsed and syntax like "--foo value" stopped being considered valid. This old script still was using the old syntax and thus was broken. Update it to "--msg-level=ffmpeg=v" which is the recommended syntax. Fixes #11892.
* TOOLS/lua/autoload: allow extending ext sets from script-optsllyyr2023-07-061-0/+16
|
* TOOLS/lua/autoload: avoid unnecessary playlist manipulation, performanceEva2023-07-031-20/+29
| | | | | | | | | | | | | | We used to sort the playlist with playlist-move after every loadfile. Instead, append all files in order and call playlist-move once to move the only entry we don't control the position of. Don't fetch every playlist item separately, reuse native property. We used to pick up on new files added to the directory, but only when playing an entry at the edge of the playlist due to an early return. New files are now added to the playlist on every file change. This still works as expected and doesn't load duplicate files on shuffled playlists or playlists with files manually added after autoload 33% faster on average for my test directory with 1371 files.
* TOOLS/docutils-wrapper: handle commands without depfileThomas Weißschuh2023-03-241-2/+4
|
* TOOLS/docutils-wrapper: properly propagate failuresThomas Weißschuh2023-03-241-1/+4
|
* TOOLS/docutils-wrapper: gracefully remove non-existing filesThomas Weißschuh2023-03-241-2/+8
|
* TOOLS/autocrop.lua: log a more accurate warningGuido Cella2023-02-271-18/+12
| | | | | | | | | | | | | This reorders some code and checks the image track-list sub-property instead of the albumart one, so that when playing audio without enough playtime-remaining and images, the "autocrop only works for videos." warning is logged instead of the "Not enough time to detect crop." one. It also avoids repeating this warning twice in the code. As of e16d0dd15d current-tracks returns a video track even when lavfi-complex is used, so the track-list loop in is_cropable can be replaced with just checking current-tracks/video while still cropping videos with lavfi-complex.
* ci: migrate MSYS2 build to GitHub ActionsKacper Michajłow2023-01-282-78/+0
|
* TOOLS/lua/autoload: improve alphanumeric sortingChristoph Heinrich2023-01-151-4/+4
| | | | | | | | | | | | | | | Currently filenames like `EP.1.v0.1080p.mp4` do not get sorted correctly (e.g. episode 11 right after episode 1). That is caused by the `.` in front of the episode number, making it get sorted as if it were decimals. The solution is to match the whole real number or integer instead of matching the integer part and the fractional part separately. This will regress sorting of numbers with multiple commas where the length of the individual segments differs between filenames. Since those are rather uncommon, that is unlikely to be a problem (for anyone ever).
* TOOLS/docutils-wrapper: make executable + alphabetizeDudemanguy2023-01-131-0/+0
| | | | | | I should have caught this during review but the feature was too cool and I didn't really pay attention (sorry). For consistency with the rest of the scripts here.
* TOOLS/lua/autoload: optimize performance of natural sortingChristoph Heinrich2023-01-091-5/+10
| | | | | | Formatting the string on each comparison is wasteful. Formatting strings beforehand and then comparing the already formatted ones leads to a huge performance gain.
* TOOLS/lua/autoload: further optimize the natural sortingdyphire2023-01-091-35/+19
| | | | | | | | | | | | | Commits https://github.com/mpv-player/mpv/commit/257dbdf06feb366f9eb1f96ceb7026c9365dddaa uses a algorithm of splitting strings into a table of number and string values to achieve natural sorting. This approach works well in most cases, but it does not work well in some specific scenarios. Now let's implement natural sorting with a stronger algorithm. Also fixes indentation. Ref: https://github.com/jonniek/mpv-playlistmanager/commit/3cf323f3c419af77f4141119283c1ec2911491c5 Closes https://github.com/mpv-player/mpv/issues/8969
* meson: dynamically compute dependencies for manpage and html buildThomas Weißschuh2023-01-081-0/+56
| | | | | | | | | This allows us to rebuild the manpages and html documentation only when necessary. It is not necessary to manually keep the list of dependencies up to date. Unfortunately rst2pdf does not yet support this feature, see https://github.com/rst2pdf/rst2pdf/issues/1108
* TOOLS/umpv: support shell-quotes in $MPVsfan52023-01-071-1/+2
|
* TOOLS/umpv: prefer $XDG_RUNTIME_DIRSuperSamus2022-11-281-1/+1
|
* TOOLS/lua/autoload: fix incorrect duplicate file loading behaviordyphire2022-10-241-9/+14
| | | | | | | This will correctly avoid the duplicate file loading when the playlist changes due to shuffle playback or append new files. Fixes https://github.com/mpv-player/mpv/issues/8575
* TOOLS/lua/autoload: add various extra file extensionsLeo Izen2022-09-231-4/+6
| | | | | Add to autoload.lua several extra file extensions that are unambiguously for media files.
* TOOLS/lua/autoload: alphebatize auto-loaded file extensionsLeo Izen2022-09-231-3/+4
| | | | | | Alphabetizing the extensions cleans up the code and makes it less ambiguous where newer extensions should be added. The video line also was wrapped to 72 characters for cleanliness.
* TOOLS/lua/autoload: add `m2ts` extensionDeadNews2022-09-141-1/+1
| | | | * `.m2ts` used for the Blu-ray disc container file format
* osxbundle: add RIST protocol support to app metadataThe-head-obamid2022-08-181-0/+1
|
* various: remove trailing whitespaceGuido Cella2022-05-142-2/+2
|
* various: fix typosCœur2022-04-251-1/+1
|
* TOOLS/matroska.py: support outputting to fileDudemanguy2021-11-141-2/+7
| | | | | Like the previous commit, it's better to just output it to a file for meson.
* TOOLS/file2string.py: support outputting to fileDudemanguy2021-11-141-1/+6
| | | | | | | Another modification for the upcoming meson build. Meson can capture the stdout and redirect it to a file. However, this is considered a hack. It's better to just add a few lines to this script and write a file directly.
* TOOLS: add macos-swift-lib-directory.py scriptDudemanguy2021-11-141-0/+42
| | | | | | | Apple is great and forces us to do a lot of weird checks because they randomly move the location of the swift libraries around. Make a specific python script for checking various locations and write the output to stdout for meson.
* TOOLS: add macos-sdk-version.py scriptDudemanguy2021-11-141-0/+68
| | | | | | | | Building for macos requires us to check the macos sdk path as well as the sdk version that is on the system. To do this, let's steal the logic that's in the compiler_swift.py check from the waf build. This returns a comma-delinated string. The first entry is the absolute path to the sdk. The second entry is the detected macos sdk version.
* TOOLS/autocrop.lua: allow hiding OSD messagesGuido Cella2021-07-271-6/+12
| | | | | | Because having these on every video is annoying, and when you resume from watch later files, the filters are applied immediately so they hide your osd-playing-msg or equivalent show-text commands.
* osxbundle: use python3Kiracus2021-07-172-3/+2
|
* TOOLS/autocrop.lua: improve enable/disable conditionGuido Cella2021-07-141-5/+6
| | | | | | | | | | | | | | | | | | The previous code tried to disable autocrop for cover-art by testing that track-list/$vid/albumart is false, however, $vid is completely unrelated to the track-list index. It only sometimes succeeded to disable for albumart, by accident, e.g. with one audio track and one video track where $vid==1 and track-list/1 happens to be the video (cover art) track. The new code detects the currently-used video track by finding a track with type=="video" and selected==true. Unlike the previous code, it also works in scenarios with many audio/video/sub tracks. Additionally, autocrop is now enabled also with lavfi-complex, which should be considered an improvement. The previous code implicitly disabled it with lavfi-complex because $vid is nil on such case.
* TOOLS/lua/autoload: load files even if current file is hiddenLaserEyess2021-06-241-1/+3
| | | | | | | When the current file is hidden and `ignore_hidden` is true, autoload will skip loading other files in the current directory. Make sure that the current file is always counted for autoloading even if it is hidden.
* TOOLS/lua/autoload: add ignore_hidden optionLaserEyess2021-06-241-2/+4
| | | | | | | | | | | | | | | In 8a7614a0fb0d4f1073057049933972bb1113c14c files that start with a '.' were blacklisted from autoload.lua. Since then 35e8710b86545849484f6544a16047792fa75bb2 was introduced and explicitly whitelisted file extensions. With this change, there is no longer a reason to blacklist all files starting with '.', because it is valid to have a file called '.hidden.mkv', and there is no chance of hidden files such as '.bashrc', '.DS_STORE', '.gitignore', etc. being autoloaded by mpv. This commit tries to keep the same behavior as before, which is to by default not load hidden files, but allows the user to optionally allow hidden files to be autoloaded.
* osxbundle: fix slow and wasteful memory allocationder richter2021-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | when using the bundle with activated big enough cache, very slow and wasteful memory allocations lead to jittery playback and lot of dropped frames. the cache had to have a certain size so it would constantly allocate new memory to reproduce this. this never happens when started from the terminal. the source of the problem is a different malloc allocation policy, MALLOC_NANO, that allocated a huge amount of virtual memory without actually using it. the usage was between 0% to 25% of that virtual memory. the binaries allocation policy on the other hand used >80% of that allocated virtual memory and was a lot more efficient, it would use MALLOC_TINY instead. this is fixed by setting the MallocNanoZone environment variable to 0 to use the V1 of the allocation policy. when started from the bundle via launchd this is forced to 1 and V2 policy which causes this problem. some more info can be found in following file and its comments on the Apple open source site: https://opensource.apple.com/source/libmalloc/libmalloc-317.40.8/src/nano_malloc_common.c.auto.html Fixes #7405
* build: move website rebuild into Linux/clang travis jobsfan52021-05-161-1/+1
| | | | The mingw ones will be removed in the next commit.
* umpv: Use generator expression for filesjimman20032021-03-031-1/+1
| | | Instead of list. potential memory savings.
* appveyor: Use MSYS2's spirv-cross package instead of building itBiswapriyo Nath2021-02-231-9/+1
|
* umpv: remove unused importsJim Manos2021-01-191-2/+0
| | | | | | | * fcntl usage was replaced by socket usage in 518bd4c306d50e6772c39c5d7395b9d10b9386da * stat usage was removed in 51a3f13705f8b65b3bfcef5b991903d225759014 as the socket was created under the user's HOME.
* appveyor: use MSYS2 shaderc packageJames Ross-Gowan2020-12-191-11/+1
| | | | | There's a shaderc package in MSYS2 now. Using it should shave ten minutes off the appveyor build.
* matroska.py: remove python2 supportLaserEyess2020-11-271-6/+2
| | | | | | | | | | Since 0.33.0 mpv does not support python2. This commit removes python2 support from the file completely with the following changes: - __future__ import of print_function is python2 only - unicode literals are legacy in python3 - 'sys.version_info.major < 3' check is redundant
* file2string: remove question mark from safe charssfan52020-11-221-8/+3
| | | | | | | | | | Trigraphs such as "??=" (which are enabled by default with -std=c11) can mess up strings, so avoid them entirely by escaping question marks. This also drops Python 2 compatibility from file2string, making the change to the waf rule necessary. The input file is now opened in binary mode which is also more correct versus the old text mode which just happened to work even on binary files.
* stream_lavf: enable SRT protocol support through FFmpegAlexandre Iooss2020-10-151-0/+1
| | | | | Additionally, announce support for the protocol in Mac and Linux application metadata.
* command: extend subprocess command stdin, change behaviorwm42020-08-161-0/+19
| | | | | | | | | | | | | | | Make it possible to feed a string to stdin of a subprocess. Out of laziness, it can't be an arbitrary byte string. (Would require adding an option type that takes in a Lua byte string.) Do not set stdin of a subprocess to fd 0 (i.e. mpv's stdin) anymore, because it makes things more consistent. Enabling stdin didn't make too much sense in the first place, so this behavior change seems justifiable. win32 support missing. Fixes: #8003
* TOOLS/file2string: change to python3wm42020-08-121-1/+1
| | | | | | The same was done to matroska.py before, so at least it's consistent. Doesn't matter for waf, because it imports this script (rather than executing it).
* TOOLS/autocrop.lua: automatically crop at startupヒカリ2020-06-011-84/+292
|
* umpv: convert to python 3wm42020-04-031-2/+2
| | | | Sigh.
* umpv: change from legacy FIFO to socketwm42020-03-281-23/+14
| | | | --input-file is deprecated, and the JSON IPC is saner anyway.
* ci: remove libass enablementJan Ekström2020-03-221-1/+0
| | | | This is no longer a configurable option.
* client API: provide