diff --git a/README.md b/README.md index 4c21633..07c57a8 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ List of my dot files and config files for my Arch Linux desktop setup. - [Alacritty](https://github.com/alacritty/alacritty): Terminal emulator - [Ly](https://github.com/fairyglade/ly): Lightweight TUI (ncurses-like) display manager - [Mako](https://github.com/emersion/mako): Wayland notification daemon +- [MPV](https://mpv.io/): MPV is a media player based on MPlayer - [Swappy](https://github.com/jtheoof/swappy): Wayland native snapshot editing tool - [Sway](https://github.com/swaywm/sway): i3-compatible Wayland compositor - [Waybar](https://github.com/Alexays/Waybar): Wayland bar for Sway diff --git a/mpv/input.conf b/mpv/input.conf new file mode 100644 index 0000000..63d29aa --- /dev/null +++ b/mpv/input.conf @@ -0,0 +1,157 @@ +# 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 +#MBTN_RIGHT cycle pause # toggle pause/playback mode +#MBTN_BACK playlist-prev # skip to the previous file +#MBTN_FORWARD playlist-next # skip to the next file + +# 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 add volume 2 +WHEEL_DOWN add volume -2 +WHEEL_LEFT seek -10 # seek 10 seconds backward +WHEEL_RIGHT seek 10 # seek 10 seconds forward + +## Seek units are in seconds, but note that these are limited by keyframes +RIGHT seek 5 # seek 5 seconds forward +LEFT seek -5 # seek 5 seconds backward +UP seek 60 # seek 1 minute forward +DOWN seek -60 # seek 1 minute backward +# 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 # seek exactly 1 second forward +#Shift+LEFT no-osd seek -1 exact # seek exactly 1 second backward +#Shift+UP no-osd seek 5 exact # seek exactly 5 seconds forward +#Shift+DOWN no-osd seek -5 exact # seek exactly 5 seconds backward +#Ctrl+LEFT no-osd sub-seek -1 # seek to the previous subtitle +#Ctrl+RIGHT no-osd sub-seek 1 # seek to the next subtitle +#Ctrl+Shift+LEFT sub-step -1 # change subtitle timing such that the previous subtitle is displayed +#Ctrl+Shift+RIGHT sub-step 1 # change subtitle timing such that the next subtitle is displayed +#Alt+left add video-pan-x 0.1 # move the video right +#Alt+right add video-pan-x -0.1 # move the video left +#Alt+up add video-pan-y 0.1 # move the video down +#Alt+down add video-pan-y -0.1 # move the video up +#Alt++ add video-zoom 0.1 # zoom in +#ZOOMIN add video-zoom 0.1 # zoom in +#Alt+- add video-zoom -0.1 # zoom out +#ZOOMOUT add video-zoom -0.1 # zoom out +#Ctrl+WHEEL_UP add video-zoom 0.1 # zoom in +#Ctrl+WHEEL_DOWN add video-zoom -0.1 # zoom out +#Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings +#PGUP add chapter 1 # seek to the next chapter +#PGDWN add chapter -1 # seek to the previous chapter +#Shift+PGUP seek 600 # seek 10 minutes forward +#Shift+PGDWN seek -600 # seek 10 minutes backward +#[ multiply speed 1/1.1 # decrease the playback speed +#] multiply speed 1.1 # increase the playback speed +#{ multiply speed 0.5 # halve the playback speed +#} multiply speed 2.0 # double the playback speed +#BS set speed 1.0 # reset the speed to normal +#Shift+BS revert-seek # undo the previous (or marked) seek +#Shift+Ctrl+BS revert-seek mark # mark the position for revert-seek +#q quit +#Q quit-watch-later # exit and remember the playback position +#q {encode} quit 4 +#ESC set fullscreen no # leave fullscreen +#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 # toggle pause/playback mode +#> playlist-next # skip to the next file +#ENTER playlist-next # skip to the next file +#< playlist-prev # skip to the previous file +#O no-osd cycle-values osd-level 3 1 # toggle displaying the OSD on user interaction or always +#o show-progress # show playback progress +#P show-progress # show playback progress +#i script-binding stats/display-stats # display information and statistics +#I script-binding stats/display-stats-toggle # toggle displaying information and statistics +#` script-binding console/enable # open the console +#z add sub-delay -0.1 # shift subtitles 100 ms earlier +#Z add sub-delay +0.1 # delay subtitles by 100 ms +#x add sub-delay +0.1 # delay subtitles by 100 ms +#ctrl++ add audio-delay 0.100 # change audio/video sync by delaying the audio +#ctrl+- add audio-delay -0.100 # change audio/video sync by shifting the audio earlier +#Shift+g add sub-scale +0.1 # increase the subtitle font size +#Shift+f add sub-scale -0.1 # decrease the subtitle font size +#9 add volume -2 +#/ add volume -2 +#0 add volume 2 +#* add volume 2 +#m cycle mute # toggle 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 current-window-scale 0.5 # halve the window size +#Alt+1 set current-window-scale 1.0 # reset the window size +#Alt+2 set current-window-scale 2.0 # double the window size +#b cycle deband # toggle the debanding filter +#d cycle deinterlace # cycle the deinterlacing filter +#r add sub-pos -1 # move subtitles up +#R add sub-pos +1 # move subtitles down +#t add sub-pos +1 # move subtitles down +#v cycle sub-visibility # hide or show the subtitles +#Alt+v cycle secondary-sub-visibility # hide or show the secondary subtitles +#V cycle sub-ass-vsfilter-aspect-compat # toggle stretching SSA/ASS subtitles with anamorphic videos to match the historical renderer +#u cycle-values sub-ass-override "force" "yes" # toggle overriding SSA/ASS subtitle styles with the normal styles +#j cycle sub # switch subtitle track +#J cycle sub down # switch subtitle track backwards +#SHARP cycle audio # switch audio track +#_ cycle video # switch video track +#T cycle ontop # toggle placing the video on top of other windows +#f cycle fullscreen # toggle fullscreen +#s screenshot # take a screenshot of the video in its original resolution with subtitles +#S screenshot video # take a screenshot of the video in its original resolution without subtitles +#Ctrl+s screenshot window # take a screenshot of the window with OSD and subtitles +#Alt+s screenshot each-frame # automatically screenshot every frame; issue this command again to stop taking screenshots +#w add panscan -0.1 # decrease panscan +#W add panscan +0.1 # shrink black bars by cropping the video +#e add panscan +0.1 # shrink black bars by cropping the video +#A cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" # cycle the video aspect ratio ("-1" is the container aspect) +#POWER quit +#PLAY cycle pause # toggle pause/playback mode +#PAUSE cycle pause # toggle pause/playback mode +#PLAYPAUSE cycle pause # toggle pause/playback mode +#PLAYONLY set pause no # unpause +#PAUSEONLY set pause yes # pause +#STOP quit +FORWARD seek 60 # seek 1 minute forward +REWIND seek -60 # seek 1 minute backward +NEXT playlist-next # skip to the next file +PREV playlist-prev # skip to the previous file +VOLUME_UP add volume 2 +VOLUME_DOWN add volume -2 +MUTE cycle mute # toggle mute +#CLOSE_WIN quit +#CLOSE_WIN {encode} quit 4 +ctrl+w quit +#E cycle edition # switch edition +#l ab-loop # set/clear A-B loop points +#L cycle-values loop-file "inf" "no" # toggle infinite looping +#ctrl+c quit 4 +#DEL script-binding osc/visibility # cycle OSC visibility between never, auto (mouse-move) and always +#ctrl+h cycle-values hwdec "auto-safe" "no" # toggle hardware decoding +#F8 show-text ${playlist} # show the playlist +#F9 show-text ${track-list} # show the list of video, audio and sub tracks + +# +# Legacy bindings (may or may not be removed in the future) +# +#! add chapter -1 # seek to the previous chapter +#@ add chapter 1 # seek to the next chapter + +# +# Not assigned by default +# (not an exhaustive list of unbound commands) +# + +# ? cycle sub-forced-events-only # display only DVD/PGS forced subtitle events +# ? stop # stop playback (quit or enter idle mode) diff --git a/mpv/mplayer-input.conf b/mpv/mplayer-input.conf new file mode 100644 index 0000000..99c6e8c --- /dev/null +++ b/mpv/mplayer-input.conf @@ -0,0 +1,85 @@ +RIGHT seek +10 +LEFT seek -10 +DOWN seek -60 +UP seek +60 +PGUP seek 600 +PGDWN seek -600 +m cycle mute +SHARP cycle audio # switch audio streams ++ add audio-delay 0.100 += add audio-delay 0.100 +- add audio-delay -0.100 +[ 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 +ESC quit +ENTER playlist-next force # skip to next file +p cycle pause +. frame-step # advance one frame and pause +SPACE cycle pause +HOME set playlist-pos 0 # not the same as MPlayer +#END pt_up_step -1 +> playlist-next # skip to next file +< playlist-prev # previous +#INS alt_src_step 1 +#DEL alt_src_step -1 +o osd +I show-text "${filename}" # display filename in osd +P show-progress +z add sub-delay -0.1 # subtract 100 ms delay from subs +x add sub-delay +0.1 # add +9 add volume -1 +/ add volume -1 +0 add volume 1 +* add volume 1 +1 add contrast -1 +2 add contrast 1 +3 add brightness -1 +4 add brightness 1 +5 add hue -1 +6 add hue 1 +7 add saturation -1 +8 add saturation 1 +( add balance -0.1 # adjust audio balance in favor of left +) add balance +0.1 # right +d cycle framedrop +D cycle deinterlace # toggle deinterlacer (auto-inserted filter) +r add sub-pos -1 # move subtitles up +t add sub-pos +1 # down +#? sub-step +1 # immediately display next subtitle +#? sub-step -1 # previous +#? add sub-scale +0.1 # increase subtitle font size +#? add sub-scale -0.1 # decrease subtitle font size +f cycle fullscreen +T cycle ontop # toggle video window ontop of other windows +w add panscan -0.1 # zoom out with -panscan 0 -fs +e add panscan +0.1 # in +c cycle stream-capture # save (and append) file/stream to stream.dump with -capture +s screenshot # take a screenshot (if you want PNG, use "--screenshot-format=png") +S screenshot - each-frame # S will take a png screenshot of every frame + +h cycle tv-channel 1 +l cycle tv-channel -1 +n cycle tv-norm +#b tv_step_chanlist + +#? add chapter -1 # skip to previous dvd chapter +#? add chapter +1 # next + +## +## Advanced seek +## Uncomment the following lines to be able to seek to n% of the media with +## the Fx keys. +## +#F1 seek 10 absolute-percent +#F2 seek 20 absolute-percent +#F3 seek 30 absolute-percent +#F4 seek 40 absolute-percent +#F5 seek 50 absolute-percent +#F6 seek 60 absolute-percent +#F7 seek 70 absolute-percent +#F8 seek 80 absolute-percent +#F9 seek 90 absolute-percent diff --git a/mpv/mpv.conf b/mpv/mpv.conf new file mode 100644 index 0000000..0ea9ed7 --- /dev/null +++ b/mpv/mpv.conf @@ -0,0 +1,112 @@ +# 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=yes + +# 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=no + +# Keep the player window on top of all other windows. +#ontop=yes + +# Specify fast video rendering preset (for --vo= only) +# Recommended for mobile devices or older hardware with limited processing power +#profile=fast + +# Specify high quality video rendering preset (for --vo= only) +# Offers superior image fidelity and visual quality for an enhanced viewing +# experience on capable hardware +#profile=high-quality + +# 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 + +################## +# 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 a large seekable RAM cache even for local input. +#cache=yes +# +# Use extra large RAM cache (needs cache=yes to make it useful). +#demuxer-max-bytes=500M +#demuxer-max-back-bytes=100M +# +# Disable the behavior that the player will pause if the cache goes below a +# certain fill size. +#cache-pause=no +# +# Store cache payload on the hard disk instead of in RAM. (This may negatively +# impact performance unless used for slow input such as network.) +#cache-dir=~/.cache/ +#cache-on-disk=yes + +# Display English subtitles if available. +#slang=en + +# Play Finnish audio if available, fall back to English otherwise. +#alang=fi,en + +# 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=cp1256 + +# 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