Commit Graph

60 Commits

Author SHA1 Message Date
wm4 b6af3db568 command: drop "audio-out-detected-device" property
Coreaudio stopped setting it a few releases ago (66a958bb4f). There is
not much of a user- or API-visible change, so remove it without
deprecation.
2017-10-09 15:48:47 +02:00
Ricardo Constantino 371000108a
TOOLS/lua/autodeint: update to lavfi-bridge
Also use lavfi setfield instead of removed field-dominance.
Remove missing remainder of field-dominance in docs.
2017-08-21 18:12:10 +01:00
Ricardo Constantino 1171f92beb
TOOLS/autocrop.lua: fix cropdetect black limit for 10-bit videos
Also update to use newer lavfi-bridges for the relevant filters to
shut up warnings about deprecated crop filter.
2017-08-17 20:43:25 +01:00
Ricardo Constantino 257dbdf06f
TOOLS/autoload.lua: implement natural sorting 2017-08-16 10:00:27 +01:00
Jan Janssen 207458c7a9 acompressor.lua: Convert to use mp.options and lavfi filter bridge 2017-08-07 11:42:20 +02:00
Rostislav Pehlivanov 5ea390c07f TOOLS/lua/status-line: improve and update
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.
2017-08-04 09:07:37 +01:00
Yue Zhu 8a7614a0fb TOOLS/lua/autoload.lua: ignores all files starting with "." 2017-05-20 11:44:11 +02:00
Ricardo Constantino 95d5fe1626
TOOLS/lua/autoload.lua: actually sort files case insensitive
Regression since 8996f79edb.
Closes #4398
2017-05-04 14:23:39 +01:00
Jan Janssen febeff8fee TOOLS: add lua script for runtime acompressor ffmpeg filter control 2017-03-25 12:57:10 +01:00
Jan Janssen 222899fbbe af_drc: remove
Remove low quality drc filter. Anyone whishing to have dynamic range
compression should use the much more powerful acompressor ffmpeg filter:

    mpv --af=lavfi=[acompressor] INPUT

Or with parameters:

    mpv --af=lavfi=[acompressor=threshold=-25dB:ratio=3:makeup=8dB] INPUT

Refer to https://ffmpeg.org/ffmpeg-filters.html#acompressor for a full
list of supported parameters.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 12:57:10 +01:00
Ricardo Constantino b60817f9dd
TOOLS/autoload: allow disabling through script-opts
This allows leaving autoload in auto-loaded scripts and to be used
in a special profile like "pseudo-gui" without being troublesome
to disable the behavior in profiles that get applied after
pseudo-gui.

Ex:
[someprofile]
script-opts=autoload-disabled=yes
2016-12-05 21:09:28 +00:00
wm4 b9153ee177 TOOLS/lua/observe-all: explicitly observe all options 2016-09-23 20:49:23 +02:00
Timotej Lazar 91a1b17104 Use - as command-name separator everywhere
Old-style commands using _ as separator (e.g. show_progress) were still
used in some places, including documentation and configuration files.
This commit updates all such instances to the new style (show-progress)
so that commands are easier to find in the manual.
2016-07-14 22:37:42 +02:00
wm4 4f699d0500 TOOLS/lua/README: link to list of user scripts on wiki 2016-03-18 22:07:30 +01:00
Ricardo Constantino 87ae215853 TOOLS/lua/zones.lua: Remove
Check wiki/User-Scripts for more up-to-date version.
2016-03-08 21:59:54 +01:00
Alexis Nootens 8996f79edb TOOLS/lua/autoload.lua: remove the extension prior to sort
When the directory contains files named such as xx-14.ext and
xx-14.5.ext, remove the extension to sort the table to load the
14 before the 14.5.
2016-02-02 19:58:51 +01:00
Kevin Mitchell 946ee29a7d TOOLS/lua/ao-null-reload.lua: send ao-reload on audio-device-list change
Only triggers if ao=null. This is required for ao=wasapi to recover from periods
with no available devices.

fixes #2738
2016-01-28 06:49:36 -08:00
bitingsock 0121d00478 TOOLS/autoload: avoid throwing an error when playing e.g. youtube
Signed-off-by: wm4 <wm4@nowhere>
2015-10-20 12:33:57 +02:00
Ricardo Constantino b144da63a8 TOOLS/lua/autoload: fix adding more files at end of auto-playlist
Fixes regression in dfd8a5f that made autoload not add more files
at the end of the current playlist if playlist was made by the
script.

This still prevents loading the script if more than one (media or
playlist) file was manually added.
2015-08-20 22:05:03 +02:00
wm4 9cd929bf79 TOOLS/lua/autoload: add all files on start
Or almost. I don't know or care.

Fixes #2219 (maybe, I don't know or care).
2015-08-20 22:04:36 +02:00
Ricardo Constantino dfd8a5ff06 TOOLS/lua/autoload: don't run if playlist is loaded 2015-08-10 00:07:31 +02:00
Ricardo Constantino 91b9dcf800 TOOLS/lua: Add zones.lua
Lua script that enables handling of certain commands depending on where
the mouse pointer is. Mostly useful for mouse-wheel handling via
input.conf.

Example:

MOUSE_BTN3 script-message-to zones commands "*-left: add volume +5"
"default: seek +10"
MOUSE_BTN4 script-message-to zones commands "*-left: add volume -5"
"default: seek -10"

Will changes behavior of Mouse Wheel Up/Down to alter volume if mouse is
in the left zone of the window, but re-adds the default to seek if wheel
is used on other parts.
2015-08-09 23:52:13 +02:00
wm4 c6b5645991 TOOLS: remove youtube-starttime.lua
Obsolete due to native youtube-dl start time support.
2015-07-29 13:23:12 +02:00
Kevin Mitchell ebdbb4f24c TOOLS: make autodeint detect telecine in parallel
This avoids having to rewind the video for a second telecine detection pass.
2015-07-16 16:14:58 -07:00
wm4 446a10020f TOOLS/lua/status-bar: update use of a deprecated property
Also mention that this code does not reflect the status line of current
mpv.
2015-05-25 22:01:34 +02:00
Michael Vetter 9251fa125f Remove trailing whitespaces 2015-05-15 11:02:44 +02:00
Marcin Kurczewski eb62d7ec40 TOOLS/autoload: load only files that make sense 2015-04-21 20:24:00 +02:00
Marcin Kurczewski eabd2ac9e4 TOOLS/autoload: add blank lines for readability 2015-04-21 20:23:55 +02:00
wm4 f51952441e TOOLS: autoload.lua: sort files case insensitive
Suggested by a user. The suggested code which was added her comes from
PIL.
2015-04-18 20:33:35 +02:00
Patrick Hipp dd08aa7364 TOOLS: add a lua scripts for extracting and setting starttime with ytdl
Signed-off-by: wm4 <wm4@nowhere>
2015-03-23 20:46:22 +01:00
Patrick Hipp c48de9e399 TOOLS: add a lua script for a -stay on top only during playback- mode
Signed-off-by: wm4 <wm4@nowhere>
2015-03-23 20:45:12 +01:00
James Ross-Gowan a26ea50694 w32_common: support the "window-minimized" property 2015-03-09 11:46:06 +01:00
Jaime Marquínez Ferrándiz d7f04e2085 cocoa: support the "window-minimized" property
Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
2015-03-08 22:00:47 +01:00
Stefano Pigozzi 70802d519f ao_coreaudio: add support for hotplug notifications
This commit adds notifications for hot plugging of devices. It also extends
the old behaviour of the `audio-out-detected-device` property which is now
backed by the hotplugging code. This allows clients to be notified when the
actual audio output device changes.

Maybe hotplugging should be supported for ao_coreaudio_exclusive too, but it's
device selection code is a bit fragile.
2015-02-14 12:51:15 +01:00
wm4 f061befb33 audio: add device change notification for hotplugging
Not very important for the command line player; but GUI applications
will want to know about this.

This only adds the internal API; support for specific audio outputs
comes later.

This reuses the ao struct as context for the hotplug event listener,
similar to how the "old" device listing API did. This is probably a bit
unclean and confusing. One argument got reusing it is that otherwise
rewriting parts of ao_pulse would be required (because the PulseAudio
API requires so damn much boilerplate). Another is that --ao-defaults is
applied to the hotplug dummy ao struct, which automatically applies such
defaults even to the hotplug context.

Notification works through the property observation mechanism in the
client API. The notification chain is a bit complicated: the AO notifies
the player, which in turn notifies the clients, which in turn will
actually retrieve the device list. (It still has the advantage that it's
slightly cleaner, since the AO stuff doesn't need to know about client
API issues.)

The weird handling of atomic flags in ao.c is because we still don't
require real atomics from the compiler. Otherwise we'd just use atomic
bitwise operations.
2015-02-12 17:17:41 +01:00
wm4 411109f484 TOOLS/lua/observe-all: add a warning
This is just natural, but it's also not that obvious.
2015-01-03 14:49:48 +01:00
wm4 44c0770247 TOOLS/lua/autoload: fix behavior with network URLs
readdir() fails if the directory is an URL, so just exit instead of
letting the Lua script fail.
2015-01-03 14:48:33 +01:00
Avi Halachmi (:avih) 39e04e9294 options: deprecate 'lua' based options/dirs for 'script'
- --lua and --lua-opts change to --script and --script-opts
- 'lua' default script dirs change to 'scripts'
- DOCS updated

- 'lua-settings' dir was _not_ modified

The old lua-based names/dirs still work, but display a warning.

Signed-off-by: wm4 <wm4@nowhere>
2014-12-15 04:39:56 +01:00
wm4 3295caca3d lua: add a function that formats Lua values as strings
Yep, Lua is so crappy that the stdlib doesn't provide anything like
this.

Repurposes the undocumented mp.format_table() function and moves it to
mp.utils.
2014-11-29 00:03:46 +01:00
wm4 9666d48aa3 TOOLS/lua: add script that pauses playback when minimizing the window
Uses functionality that was added a month ago for exactly this purpose.

Fixes #1237.
2014-11-29 00:03:46 +01:00
wm4 078f5f300d TOOLS/lua/autoload: fix operation outside of working dir
Fixes #1222. (This commit is based on a patch posted there.)
2014-10-26 14:34:46 +01:00
wm4 dd91c09a71 TOOLS/lua/autoload: don't shadow local variable
"dir" is already used somewhere above. This was ok, but not nice.
2014-10-26 14:34:37 +01:00
Kevin Mitchell bbf4a8aa5d TOOLS/lua: update README.md 2014-10-21 00:55:15 +02:00
Kevin Mitchell 3617399a46 TOOLS/lua: remove tabs from some lua scripts 2014-10-21 00:55:15 +02:00
Kevin Mitchell e68cc34c99 TOOLS/lua: add autodeint.lua
This isn't quite as robust as idet.sh as the default detection
interval is only 4 seconds vs 35 for idet.sh. idet.sh can have such a
large sample time since it turns off the vo and uses --untimed, which
is currently not possible from lua.
2014-10-21 00:55:15 +02:00
wm4 f9d2ad6c17 Move status-line.lua
Looks like TOOLS/lua/ is now established as dumping ground for random
Lua scripts, so DOCS/lua_examples/ is not needed anymore.
2014-08-11 17:08:32 +02:00
wm4 82a223e4e0 TOOLS: add test script for property change notifications 2014-08-02 01:53:21 +02:00
wm4 6f20d6b74e lua: fix compilation with lua 5.2
Commit e2e450f9 started making use of luaL_register(), but OF COURSE
this function disappeared in Lua 5.2, and was replaced with a 5.2-only
alternative, slightly different mechanism.

So just NIH our own function. This is actually slightly more correct,
since it forces the user to call "require" to actually make the module
visible for builtin C-only modules other than "mp". Fix autoload.lua
accordingly.
2014-05-26 21:59:29 +02:00
wm4 0e1ab2a8da autoload.lua: fix autoloading of files to prepend
This used the wrong index variable, and thus didn't work.
2014-05-25 20:17:03 +02:00
wm4 fea1bad856 TOOLS: add a Lua script to autoload playlist entries
This will load other files in the same directory when a single file is
played. It's an often requested feature, but we definitely don't want it
in the core.
2014-05-25 19:52:26 +02:00