initial commit for new repo
This commit is contained in:
182
.config/mpv/input.conf
Normal file
182
.config/mpv/input.conf
Normal file
@@ -0,0 +1,182 @@
|
||||
# mpv keybindings
|
||||
#
|
||||
# Location of user-defined bindings: ~/.config/mpv/input.conf
|
||||
#
|
||||
# Lines starting with # are comments. Use SHARP to assign the # key.
|
||||
# Copy this file and uncomment and edit the bindings you want to change.
|
||||
#
|
||||
# List of commands and further details: DOCS/man/input.rst
|
||||
# List of special keys: --input-keylist
|
||||
# Keybindings testing mode: mpv --input-test --force-window --idle
|
||||
#
|
||||
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
|
||||
#
|
||||
# Strings need to be quoted and escaped:
|
||||
# KEY show-text "This is a single backslash: \\ and a quote: \" !"
|
||||
#
|
||||
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
|
||||
# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
|
||||
#
|
||||
# The default keybindings are hardcoded into the mpv binary.
|
||||
# You can disable them completely with: --no-input-default-bindings
|
||||
|
||||
# Developer note:
|
||||
# On compilation, this file is baked into the mpv binary, and all lines are
|
||||
# uncommented (unless '#' is followed by a space) - thus this file defines the
|
||||
# default key bindings.
|
||||
|
||||
# If this is enabled, treat all the following bindings as default.
|
||||
#default-bindings start
|
||||
|
||||
#MBTN_LEFT ignore # don't do anything
|
||||
#MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off
|
||||
#MBTN_RIGHT cycle pause # toggle pause on/off
|
||||
|
||||
# Mouse wheels, touchpad or other input devices that have axes
|
||||
# if the input devices supports precise scrolling it will also scale the
|
||||
# numeric value accordingly
|
||||
#WHEEL_UP seek 10
|
||||
#WHEEL_DOWN seek -10
|
||||
#WHEEL_LEFT add volume -2
|
||||
#WHEEL_RIGHT add volume 2
|
||||
|
||||
## Seek units are in seconds, but note that these are limited by keyframes
|
||||
#RIGHT seek 5
|
||||
#LEFT seek -5
|
||||
#UP seek 60
|
||||
#DOWN seek -60
|
||||
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
|
||||
# Don't show them on the OSD (no-osd).
|
||||
#Shift+RIGHT no-osd seek 1 exact
|
||||
#Shift+LEFT no-osd seek -1 exact
|
||||
#Shift+UP no-osd seek 5 exact
|
||||
#Shift+DOWN no-osd seek -5 exact
|
||||
# Skip to previous/next subtitle (subject to some restrictions; see manpage)
|
||||
#Ctrl+LEFT no-osd sub-seek -1
|
||||
#Ctrl+RIGHT no-osd sub-seek 1
|
||||
#PGUP add chapter 1 # skip to next chapter
|
||||
#PGDWN add chapter -1 # skip to previous chapter
|
||||
#Shift+PGUP seek 600
|
||||
#Shift+PGDWN seek -600
|
||||
#[ multiply speed 0.9091 # scale playback speed
|
||||
#] multiply speed 1.1
|
||||
#{ multiply speed 0.5
|
||||
#} multiply speed 2.0
|
||||
#BS set speed 1.0 # reset speed to normal
|
||||
#q quit
|
||||
Q quit-watch-later
|
||||
#q {encode} quit 4
|
||||
#ESC set fullscreen no
|
||||
#ESC {encode} quit 4
|
||||
#p cycle pause # toggle pause/playback mode
|
||||
#. frame-step # advance one frame and pause
|
||||
#, frame-back-step # go back by one frame and pause
|
||||
#SPACE cycle pause
|
||||
#> playlist-next # skip to next file
|
||||
#ENTER playlist-next # skip to next file
|
||||
#< playlist-prev # skip to previous file
|
||||
#O no-osd cycle-values osd-level 3 1 # cycle through OSD mode
|
||||
#o show-progress
|
||||
P show-progress
|
||||
#z add sub-delay -0.1 # subtract 100 ms delay from subs
|
||||
#x add sub-delay +0.1 # add
|
||||
#ctrl++ add audio-delay 0.100 # this changes audio/video sync
|
||||
#ctrl+- add audio-delay -0.100
|
||||
#9 add volume -2
|
||||
/ add volume -2
|
||||
#0 add volume 2
|
||||
* add volume 2
|
||||
m cycle mute
|
||||
#1 add contrast -1
|
||||
#2 add contrast 1
|
||||
#3 add brightness -1
|
||||
#4 add brightness 1
|
||||
#5 add gamma -1
|
||||
#6 add gamma 1
|
||||
#7 add saturation -1
|
||||
#8 add saturation 1
|
||||
#Alt+0 set window-scale 0.5
|
||||
#Alt+1 set window-scale 1.0
|
||||
#Alt+2 set window-scale 2.0
|
||||
# toggle deinterlacer (automatically inserts or removes required filter)
|
||||
#d cycle deinterlace
|
||||
#r add sub-pos -1 # move subtitles up
|
||||
#t add sub-pos +1 # down
|
||||
#v cycle sub-visibility
|
||||
# stretch SSA/ASS subtitles with anamorphic videos to match historical
|
||||
#V cycle sub-ass-vsfilter-aspect-compat
|
||||
# switch between applying no style overrides to SSA/ASS subtitles, and
|
||||
# overriding them almost completely with the normal subtitle style
|
||||
#u cycle-values sub-ass-override "force" "no"
|
||||
#j cycle sub # cycle through subtitles
|
||||
#J cycle sub down # ...backwards
|
||||
#SHARP cycle audio # switch audio streams
|
||||
#_ cycle video
|
||||
#T cycle ontop # toggle video window ontop of other windows
|
||||
#f cycle fullscreen # toggle fullscreen
|
||||
#s async screenshot # take a screenshot
|
||||
#S async screenshot video # ...without subtitles
|
||||
#Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled
|
||||
#Alt+s screenshot each-frame # automatically screenshot every frame
|
||||
#w add panscan -0.1 # zoom out with -panscan 0 -fs
|
||||
#e add panscan +0.1 # in
|
||||
# cycle video aspect ratios; "-1" is the container aspect
|
||||
#A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
|
||||
#POWER quit
|
||||
#PLAY cycle pause
|
||||
#PAUSE cycle pause
|
||||
#PLAYPAUSE cycle pause
|
||||
#STOP quit
|
||||
#FORWARD seek 60
|
||||
#REWIND seek -60
|
||||
#NEXT playlist-next
|
||||
#PREV playlist-prev
|
||||
#VOLUME_UP add volume 2
|
||||
#VOLUME_DOWN add volume -2
|
||||
#MUTE cycle mute
|
||||
#CLOSE_WIN quit
|
||||
#CLOSE_WIN {encode} quit 4
|
||||
#E cycle edition # next edition
|
||||
#l ab-loop # Set/clear A-B loop points
|
||||
#L cycle-values loop-file "inf" "no" # toggle infinite looping
|
||||
#ctrl+c quit 4
|
||||
|
||||
# Apple Remote section
|
||||
#AR_PLAY cycle pause
|
||||
#AR_PLAY_HOLD quit
|
||||
#AR_CENTER cycle pause
|
||||
#AR_CENTER_HOLD quit
|
||||
#AR_NEXT seek 10
|
||||
#AR_NEXT_HOLD seek 120
|
||||
#AR_PREV seek -10
|
||||
#AR_PREV_HOLD seek -120
|
||||
#AR_MENU show-progress
|
||||
#AR_MENU_HOLD cycle mute
|
||||
#AR_VUP add volume 2
|
||||
#AR_VUP_HOLD add chapter 1
|
||||
#AR_VDOWN add volume -2
|
||||
#AR_VDOWN_HOLD add chapter -1
|
||||
|
||||
#
|
||||
# Legacy bindings (may or may not be removed in the future)
|
||||
#
|
||||
#! add chapter -1 # skip to previous chapter
|
||||
#@ add chapter 1 # next
|
||||
|
||||
#
|
||||
# Not assigned by default
|
||||
# (not an exhaustive list of unbound commands)
|
||||
#
|
||||
|
||||
# ? add sub-scale +0.1 # increase subtitle font size
|
||||
# ? add sub-scale -0.1 # decrease subtitle font size
|
||||
# ? sub-step -1 # immediately display next subtitle
|
||||
# ? sub-step +1 # previous
|
||||
# ? cycle angle # switch DVD/Bluray angle
|
||||
# ? add balance -0.1 # adjust audio balance in favor of left
|
||||
# ? add balance 0.1 # right
|
||||
# ? cycle sub-forced-only # toggle DVD forced subs
|
||||
# ? cycle program # cycle transport stream programs
|
||||
# ? stop # stop playback (quit or enter idle mode)
|
||||
I vf toggle format=yuv420p,vapoursynth=~~/motioninterpolation.vpy:4:4
|
||||
M vf toggle hflip
|
||||
74
.config/mpv/motioninterpolation.vpy
Normal file
74
.config/mpv/motioninterpolation.vpy
Normal file
@@ -0,0 +1,74 @@
|
||||
# vim: set ft=python:
|
||||
|
||||
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
|
||||
# source: https://github.com/mpv-player/mpv/issues/2149
|
||||
# source: https://github.com/mpv-player/mpv/issues/566
|
||||
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
|
||||
|
||||
import vapoursynth
|
||||
|
||||
core = vapoursynth.get_core()
|
||||
# ref: http://avisynth.org.ru/mvtools/mvtools2.html#functions
|
||||
# default is 400, less means interpolation will only happen when it will work well
|
||||
ignore_threshold=140
|
||||
# if n% of blocks change more than threshold then don't interpolate at all (default is 51%)
|
||||
scene_change_percentage=15
|
||||
|
||||
dst_fps = display_fps
|
||||
# Interpolating to fps higher than 60 is too CPU-expensive, smoothmotion can handle the rest.
|
||||
# while (dst_fps > 60):
|
||||
# dst_fps /= 2
|
||||
|
||||
if "video_in" in globals():
|
||||
# realtime
|
||||
clip = video_in
|
||||
# Needed because clip FPS is missing
|
||||
src_fps_num = int(container_fps * 1e8)
|
||||
src_fps_den = int(1e8)
|
||||
clip = core.std.AssumeFPS(clip, fpsnum = src_fps_num, fpsden = src_fps_den)
|
||||
else:
|
||||
# run with vspipe
|
||||
clip = core.ffms2.Source(source=in_filename)
|
||||
dst_fps=float(dst_fps)
|
||||
|
||||
# resolution in megapixels. 1080p ≈ 2MP, 720p ≈ 1MP
|
||||
mpix = clip.width * clip.height / 1000000
|
||||
|
||||
# Skip interpolation for >1080p or 60 Hz content due to performance
|
||||
if not (mpix > 2.5 or clip.fps_num/clip.fps_den > 59):
|
||||
analParams = {
|
||||
'overlap': 0,
|
||||
'search': 3,
|
||||
'truemotion': True,
|
||||
#'chrome': True,
|
||||
#'blksize':16,
|
||||
#'searchparam':1
|
||||
}
|
||||
blockParams = {
|
||||
'thscd1': ignore_threshold,
|
||||
'thscd2': int(scene_change_percentage*255/100),
|
||||
'mode': 3,
|
||||
}
|
||||
|
||||
if mpix > 1.5:
|
||||
# can't handle these on Full HD with Intel i5-2500k
|
||||
# see the description of these parameters in http://avisynth.org.ru/mvtools/mvtools2.html#functions
|
||||
analParams['search'] = 0
|
||||
blockParams['mode'] = 0
|
||||
quality = 'low'
|
||||
else:
|
||||
quality = 'high'
|
||||
|
||||
|
||||
dst_fps_num = int(dst_fps * 1e4)
|
||||
dst_fps_den = int(1e4)
|
||||
print("Reflowing from {} fps to {} fps (quality={})".format(clip.fps_num/clip.fps_den,dst_fps_num/dst_fps_den,quality))
|
||||
|
||||
sup = core.mv.Super(clip, pel=2)
|
||||
bvec = core.mv.Analyse(sup, isb=True, **analParams)
|
||||
fvec = core.mv.Analyse(sup, isb=False, **analParams)
|
||||
clip = core.mv.BlockFPS(clip, sup, bvec, fvec,
|
||||
num=dst_fps_num, den=dst_fps_den,
|
||||
**blockParams)
|
||||
|
||||
clip.set_output()
|
||||
153
.config/mpv/mpv.conf
Normal file
153
.config/mpv/mpv.conf
Normal file
@@ -0,0 +1,153 @@
|
||||
#
|
||||
# Example mpv configuration file
|
||||
#
|
||||
# Warning:
|
||||
#
|
||||
# The commented example options usually do _not_ set the default values. Call
|
||||
# mpv with --list-options to see the default values for most options. There is
|
||||
# no builtin or example mpv.conf with all the defaults.
|
||||
#
|
||||
#
|
||||
# Configuration files are read system-wide from /usr/local/etc/mpv.conf
|
||||
# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override
|
||||
# system-wide settings, all of which are overridden by the command line.
|
||||
#
|
||||
# Configuration file settings and the command line options use the same
|
||||
# underlying mechanisms. Most options can be put into the configuration file
|
||||
# by dropping the preceding '--'. See the man page for a complete list of
|
||||
# omeone explain to me how est of at least 10 milliptions.
|
||||
#
|
||||
# Lines starting with '#' are comments and are ignored.
|
||||
#
|
||||
# See the CONFIGURATION FILES section in the man page
|
||||
# for a detailed description of the syntax.
|
||||
#
|
||||
# Profiles should be placed at the bottom of the configuration file to ensure
|
||||
# that settings wanted as defaults are not restricted to specific profiles.
|
||||
|
||||
input-ipc-server=/tmp/mpvsocket
|
||||
|
||||
##################
|
||||
# video settings #
|
||||
##################
|
||||
|
||||
# Start in fullscreen mode by default.
|
||||
#fs=yes
|
||||
|
||||
# force starting with centered window
|
||||
geometry=50%:50%
|
||||
|
||||
# don't allow a new window to have a size larger than 90% of the screen size
|
||||
autofit-larger=90%x90%
|
||||
|
||||
# Do not close the window on exit.
|
||||
keep-open=no
|
||||
|
||||
# Do not wait with showing the video window until it has loaded. (This will
|
||||
# resize the window once video is loaded. Also always shows a window with
|
||||
# audio.)
|
||||
force-window=immediate
|
||||
|
||||
# Disable the On Screen Controller (OSC).
|
||||
osc=yes
|
||||
|
||||
# Keep the player window on top of all other windows.
|
||||
#ontop=yes
|
||||
|
||||
# Specify high quality video rendering preset (for OpenGL VO only)
|
||||
# Can cause performance problems with some drivers and GPUs.
|
||||
# profile=opengl-hq
|
||||
# scale=ewa_lanczossharp
|
||||
# cscale=ewa_lanczossharp
|
||||
# video-sync=display-resample
|
||||
# interpolation
|
||||
# tscale=oversample
|
||||
|
||||
# Force video to lock on the display's refresh rate, and change video and audio
|
||||
# speed to some degree to ensure synchronous playback - can cause problems
|
||||
# with some drivers and desktop environments.
|
||||
video-sync=display-resample
|
||||
|
||||
# Enable hardware decoding if available. Often, this does not work with all
|
||||
# video outputs, but should work well with default settings on most systems.
|
||||
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
|
||||
# may or may not help.
|
||||
hwdec=auto-copy
|
||||
|
||||
##################
|
||||
# audio settings #
|
||||
##################
|
||||
|
||||
# Specify default audio device. You can list devices with: --audio-device=help
|
||||
# The option takes the device string (the stuff between the '...').
|
||||
#audio-device=alsa/default
|
||||
|
||||
# Do not filter audio to keep pitch when changing playback speed.
|
||||
#audio-pitch-correction=no
|
||||
|
||||
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
|
||||
#audio-channels=5.1
|
||||
# Disable any automatic remix, _if_ the audio output accepts the audio format.
|
||||
# of the currently played file. See caveats mentioned in the manpage.
|
||||
# (The default is "auto-safe", see manpage.)
|
||||
#audio-channels=auto
|
||||
|
||||
##################
|
||||
# other settings #
|
||||
##################
|
||||
|
||||
# Pretend to be a web browser. Might fix playback with some streaming sites,
|
||||
# but also will break with shoutcast streams.
|
||||
#user-agent="Mozilla/5.0"
|
||||
|
||||
# cache settings
|
||||
#
|
||||
# Use 150MB input cache by default. The cache is enabled for network streams only.
|
||||
#cache-default=153600
|
||||
#
|
||||
# Use 150MB input cache for everything, even local files.
|
||||
#cache=153600
|
||||
#
|
||||
# Disable the behavior that the player will pause if the cache goes below a
|
||||
# certain fill size.
|
||||
#cache-pause=no
|
||||
#
|
||||
# Read ahead about 5 seconds of audio and video packets.
|
||||
#demuxer-readahead-secs=5.0
|
||||
#
|
||||
# Raise readahead from demuxer-readahead-secs to this value if a cache is active.
|
||||
#cache-secs=50.0
|
||||
|
||||
# Display English subtitles if available.
|
||||
slang=en,fr
|
||||
|
||||
# Play English audio if available, fall back to French otherwise.
|
||||
alang=en,fr
|
||||
|
||||
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
|
||||
# If the file seems to be valid UTF-8, prefer UTF-8.
|
||||
# (You can add '+' in front of the codepage to force it.)
|
||||
sub-codepage=UTF-8
|
||||
|
||||
# You can also include other configuration files.
|
||||
#include=/path/to/the/file/you/want/to/include
|
||||
|
||||
############
|
||||
# Profiles #
|
||||
############
|
||||
|
||||
# The options declared as part of profiles override global default settings,
|
||||
# but only take effect when the profile is active.
|
||||
|
||||
# The following profile can be enabled on the command line with: --profile=eye-cancer
|
||||
|
||||
[eye-cancer]
|
||||
sharpen=5
|
||||
|
||||
[qualitatif]
|
||||
profile=opengl-hq
|
||||
scale=ewa_lanczossharp
|
||||
cscale=ewa_lanczossharp
|
||||
video-sync=display-resample
|
||||
interpolation
|
||||
tscale=oversamplevf=format=yuv420p,vapoursynth=~~/motioninterpolation.vpy:4:4
|
||||
Reference in New Issue
Block a user