Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hdb/mpv-live-filters
add and remove ffmpeg video filters during mpv playback
https://github.com/hdb/mpv-live-filters
Last synced: 2 months ago
JSON representation
add and remove ffmpeg video filters during mpv playback
- Host: GitHub
- URL: https://github.com/hdb/mpv-live-filters
- Owner: hdb
- License: mit
- Created: 2018-08-02T14:36:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-23T05:35:14.000Z (about 4 years ago)
- Last Synced: 2024-08-05T14:16:16.117Z (6 months ago)
- Language: Lua
- Size: 11.7 MB
- Stars: 43
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-mpv - live-filters - Add, remove or toggle ffmpeg video filters during mpv playback. (Video)
README
# mpv-live-filters
A lua script for mpv that lets you add, remove, toggle and set shortcuts for ffmpeg video filters during mpv playback. Designed to easily test ffmpeg's command line filters without having to start and stop `ffplay` commands or use a bloated NLE.
This script is based on James Ross-Gowan's [mpv-repl](https://github.com/rossy/mpv-repl) and Olivier Perret's [mpv-scripts](https://github.com/occivink/mpv-scripts), tuned specifically for streamlined use of filters.
## Setup
Place lua file in mpv's scripts directory. In Linux this will be `/home/user/.config/mpv/scripts/` mpv loads all scripts in this directory when it starts.
Alternatively, specify the path to this script from the command line with `mpv video.mkv --script /path/to/live-filters.lua`.
## Usage
Default key-bindings:
- `` ` `` activate REPL for filter inputs (changes key-bindings)
- `ctrl+z` undo last filter
- `ctrl+shift+z` re-do filter
- `ctrl+x` toggle filters on/off
- `ctrl+shift+x` clear all filtersREPL mode key-bindings:
- `esc` exit REPL input mode
- `tab` autocomplete from list of ffmpeg filters
- `enter` add vf filter
- `alt+enter` set vf filter (removes current filters)With the REPL active, type the vf filter options with any parameters. Multiple filters can be entered either all at once or with separate commands in sequence.
Example:
> tblend=c0_mode=difference,eq=contrast=2
is equivalent to
> tblend=c0_mode=difference
> eq=contrast=2is equivalent to
mpv video.mp4 -vf tblend=c0_mode=difference,eq=contrast=2
See source for details on default text-entry key-bindings for REPL -- they should be straightforward (i.e., `home` to beginning of line, `up` to go to last entered text, etc.).
In REPL mode, most key-bindings that use alt/ctrl/super modifier keys continue to work (e.g., `ctrl+z` for undo filter), but key-bindings that do not are disabled so that it is possible to enter text.
## Shortcuts
mpv-live-filters supports shortcuts for commands. Simply copy the shortcut and the command into [live-filters.lua](https://github.com/hdbhdb/mpv-live-filters/blob/1d4f571ec68ab2a9d8667cbcedcdb8145f68baf0/live-filters.lua#L112-L121).
## License
MIT