Closed CrendKing closed 2 hours ago
I'm using shinchiro builds, and it definitely includes what mpv includes by default, in this case autoload
(and select
). I'm even on the weekly (Sourceforge), not the daily (GitHub).
Your issue might be that you're still relying on autoload.conf
.
For the built in autoload
starting v0.39.0, add the following to your mpv.conf
: (Adjust to your taste)
### Playlist
autocreate-playlist=filter
directory-filter-types=video,image
directory-mode=ignore
video-exts=3g2,3gp,avi,flv,m2ts,m4v,mj2,mkv,mov,mp4,mpeg,mpg,ogv,rmvb,ts,webm,wmv,y4m
image-exts=avif,bmp,gif,j2k,jp2,jpeg,jpg,jxl,png,svg,tga,tif,tiff,webp
audio-exts=aiff,ape,au,flac,m4a,mka,mp3,oga,ogg,ogm,opus,wav,wma
https://mpv.io/manual/master/#options-autocreate-playlist
Edit:
Forgot to mention that it also includes stats
and console
as well.
I didn't know the --autocreate_playlist
. Looks like it is a recently implemented native replacement of autoload.lua. I think this makes sense, judging by how popular autoload.lua is.
This news greatly alleviates the importance of this request, but the issue remains. All other scripts are still hard to access. stats
and console
don't apply though, as they are from the "player/lua" directory and meant to be part of the core player.
Oh, you meant the actual .lua
files to be included? mpv bundles them, so do most packagers in the binary. You don't actually need the .lua
files to be in scripts/
(console, select, stats, autoload)
If you're worried about missing an updated feature in one of the scripts, then if I may suggest using a daily or weekly git binary, that should keep you up-to-date with everything.
Can you elaborate how to use the scripts without having the .lua
files? What's the config syntax to access a .lua in the binary?
For example, if I download a shinchiro weekly build from Sourceforge, what's the command line I need to use autocrop.lua? I tried --scripts=autocrop.lua
but it complains "Cannot open file 'autocrop.lua': No such file or directory".
The scripts at TOOLS are samples or utilities which one might find useful with mpv, maybe as a starting point, or for other reasons.
They're not necessarily production quality, they're undocumented, and they're not intended to be shipped with mpv, which is why they're not shipped with mpv.
But they can still be useful in some cases, hence they're at the mpv repo.
I think this is OK.
If you really want to bundle them with in some package, then you should request that from whoever builds and packages it. In this case probably shinchiro's repo at github (but personally I don't think they should be bundled). The mpv team has no control over how it's packaged or distributed. mpv itself is only source code.
For example, if I download a shinchiro weekly build from Sourceforge, what's the command line I need to use autocrop.lua? I tried --scripts=autocrop.lua but it complains "Cannot open file 'autocrop.lua': No such file or directory".
As far as I know, only autoload
(the 0.39.0 built in), console
, select
and stats
are the only ones bundled in most mpv binaries, as I mentioned in my previous comments.
Any exceptions will depend on the packager/maintainer, mpv itself doesn't do that as explained by avih.
Understood. Thank you for your input. Closing.
Scripts in TOOLS are linked in https://github.com/mpv-player/mpv/wiki/User-Scripts so you can find them like any other script, autocrop is the only useful one anyway.
@Samillion mpv bundles the scripts in player/lua
, but not the ones in TOOLS/lua
.
Expected behavior of the wanted feature
Currently none of the Windows distributions from the Installation page include the scripts under the TOOLS directory, such as "autoload.lua". And I don't find any mentioning of these scripts in the manual. How do we expect people to find them in the first place, without scavenging through the repository? And even though they are not updated that often, there are occasional bug fix and new feature. Suppose user get them from the repo here the first time, do we expect them to regularly re-download, or even git clone the repo with sparse checkout?
Why not copy those user-facing ones (i.e. leaving out those like "test-hooks.lua") into the build output directory, and work with the build maintainers to distribute in the final archive? This way users get to have more tools to work with, and if they care to have them updated regularly all they need to do is to use a daily/weekly build.
This is mostly a Windows and Mac specific issue, since Linux distribute source code anyways, and indeed have the scripts. It wouldn't hurt if we move the strictly internal testing scripts into a different directory to avoid confusion.
Alternative behavior of the wanted feature
A lite version could be simply mention the existence of these scripts, and instruct users to read the comments in the file to understand the usage.
Log File
No response
Sample Files
No response