Open LampPrinter opened 2 years ago
https://github.com/hooke007/MPV_lazy/discussions/288
simple answer for now u can't mpv don't allow until u make scirpt for it
I used this with an additional profile for every extension of required type, here's my config for all audio files, both [audio-only]
and the following profiles are in my mpv.conf
:
[extension.3ga]
profile=audio-only
[extension.3ga2]
profile=audio-only
[extension.669]
profile=audio-only
[extension.a52]
profile=audio-only
[extension.aa]
profile=audio-only
[extension.aac]
profile=audio-only
[extension.aax]
profile=audio-only
[extension.ac3]
profile=audio-only
[extension.adt]
profile=audio-only
[extension.adts]
profile=audio-only
[extension.aif]
profile=audio-only
[extension.aifc]
profile=audio-only
[extension.aiff]
profile=audio-only
[extension.amr]
profile=audio-only
[extension.aob]
profile=audio-only
[extension.ape]
profile=audio-only
[extension.au]
profile=audio-only
[extension.awb]
profile=audio-only
[extension.ay]
profile=audio-only
[extension.caf]
profile=audio-only
[extension.caff]
profile=audio-only
[extension.cda]
profile=audio-only
[extension.cdda]
profile=audio-only
[extension.dts]
profile=audio-only
[extension.dtshd]
profile=audio-only
[extension.dts-hd]
profile=audio-only
[extension.eac3]
profile=audio-only
[extension.f4a]
profile=audio-only
[extension.flac]
profile=audio-only
[extension.gbs]
profile=audio-only
[extension.gym]
profile=audio-only
[extension.hes]
profile=audio-only
[extension.it]
profile=audio-only
[extension.kss]
profile=audio-only
[extension.lpcm]
profile=audio-only
[extension.m1a]
profile=audio-only
[extension.m2a]
profile=audio-only
[extension.m4a]
profile=audio-only
[extension.m4b]
profile=audio-only
[extension.m4p]
profile=audio-only
[extension.m4r]
profile=audio-only
[extension.mid]
profile=audio-only
[extension.midi]
profile=audio-only
[extension.mka]
profile=audio-only
[extension.mlp]
profile=audio-only
[extension.mmm]
profile=audio-only
[extension.mp1]
profile=audio-only
[extension.mp2]
profile=audio-only
[extension.mp3]
profile=audio-only
[extension.mpa]
profile=audio-only
[extension.mpc]
profile=audio-only
[extension.mpga]
profile=audio-only
[extension.mus]
profile=audio-only
[extension.nsf]
profile=audio-only
[extension.nsfe]
profile=audio-only
[extension.oga]
profile=audio-only
[extension.ogg]
profile=audio-only
[extension.oma]
profile=audio-only
[extension.opus]
profile=audio-only
[extension.p16]
profile=audio-only
[extension.pcast]
profile=audio-only
[extension.pcm]
profile=audio-only
[extension.qcp]
profile=audio-only
[extension.ra]
profile=audio-only
[extension.ram]
profile=audio-only
[extension.rmi]
profile=audio-only
[extension.rmp]
profile=audio-only
[extension.s3m]
profile=audio-only
[extension.sap]
profile=audio-only
[extension.sdp]
profile=audio-only
[extension.shn]
profile=audio-only
[extension.snd]
profile=audio-only
[extension.sng]
profile=audio-only
[extension.spx]
profile=audio-only
[extension.thd]
profile=audio-only
[extension.thd+ac3]
profile=audio-only
[extension.truehd]
profile=audio-only
[extension.true-hd]
profile=audio-only
[extension.tsa]
profile=audio-only
[extension.tta]
profile=audio-only
[extension.uw]
profile=audio-only
[extension.vgm]
profile=audio-only
[extension.vgz]
profile=audio-only
[extension.voc]
profile=audio-only
[extension.vqf]
profile=audio-only
[extension.w64]
profile=audio-only
[extension.wav]
profile=audio-only
[extension.wave]
profile=audio-only
[extension.wax]
profile=audio-only
[extension.weba]
profile=audio-only
[extension.wma]
profile=audio-only
[extension.wv]
profile=audio-only
[extension.xm]
profile=audio-only
I believe you can do the same for images as well…
@bananakid show me your conf now what your profile audio-only
has?
@NormTurtle, there you go:
[audio-only]
geometry=1200x1200
autofit-larger=1200x1200
profile-cond=vid == false
profile-restore=copy-equal
script-opts-append=uosc-controls=command:<my-uosc-commands-string-without-some-buttons>
[extension.3ga]
profile=audio-only
...
[extension.xm]
profile=audio-only
There's a caveat with this approach: profile extension appears to be case-sensitive, i.e. you have to specify at least two profiles to get a more or less stable result (one in UPPERCASE and one in lowercase, i.e. [extension.mp3]
and [extension.mp3]
). I have tested it for images and it appears to be working fine.
The readme only states "You will need detect-image.lua and use input sections and profiles to make this work."
Can anybody explain a bit?
I have set up a auto-profile in mpv.conf [Image] profile-cond=string.match(p.filename, "%.jpg$") ~=nil or string.match(p.filename, "%.jpeg$") ~=nil or string.match(p.filename, "%.png$") ~=nil or string.match(p.filename, "%.tiff$") ~=nil
Can I selectively enable scripts for this profile?