mpv media player
https://mpv.io/
https://github.com/mpv-player/mpv
https://www.cheatography.com/someone/cheat-sheets/mpv-media-player/
MPlayer 와 mplayer2 를 기반해서 만든 media player
설치
최신버전 설치
sudo add-apt-repository ppa:mc3man/mpv-tests sudo apt update && sudo apt upgrade sudo apt install mpv
설정
https://github.com/mpv-player/mpv/blob/master/etc/mpv.conf
https://github.com/Argon-/mpv-config/blob/master/mpv.conf
/Users/onesixx/.config/mpv/
mpv.conf
MPV> Preferences…
|⇒ sudo subl ~/.config/mpv/mpv.conf
####################### mpv configuration file ################################ # ~/.config/mpv/mpv.conf profile=sixxProfile [sixxProfile] log-file=~~/mpv.log # Sets a location for writing a log file, ~~/ translates to ~/.config/mpv #-----------------------------------------------------------------------------# #### **** Window **** ######################################################### #-----------------------------------------------------------------------------# fullscreen=no title='${filename}' # 파일이름으로 창 이름 설정 #no-border # No top title bar stop-screensaver=yes #keep-open=yes # Do not close the window on exit. force-window=immediate #-- Always on top, Keep the player window on top of all other windows. ontop=yes #-- fullscreen에서만 마우스 커서 숨기기 cursor-autohide-fs-only=yes #-- force starting with centered window #-- If you want mpv to open centered on screen, (recommended) then - 50%:50% #geometry=100%:50% #-- don't allow a new window to have a size larger than 90% of the screen size #autofit-larger=50%x50% autofit = "50%" #-----------------------------------------------------------------------------# #### **** START **** ########################################################## #-----------------------------------------------------------------------------# #lua-opts='osc-layout=bottombar' script-opts='osc-layout=bottombar' # box, slimbox, bottombar and topbar. #-----------------------------------------------------------------------------# #### **** Playback Control **** ############################################### #-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------# #### **** Program Behavior **** ############################################### #-----------------------------------------------------------------------------# #-- save the current playback position on quit save-position-on-quit #-- wait idly instead of quitting when there is no file to play. #-- once will only idle at start and let the player close once the first playlist has finished playing back. idle=once ##-----------------------------------------------------------------------------# #### **** Video **** ########################################################## #-----------------------------------------------------------------------------# #-- Uses the VDPAU interface to display and optionally also decode video. #-- Hardware decoding is used with --hwdec=vdpau (X11 only) #hwdec=vdpau #-- Skip displaying some frames to maintain A/V sync on slow systems #framedrop=no #-- Enable or disable interlacing (default=no) never use it correct-pts=yes video-sync=display-resample #--vo=opengl #--vo=gpu vo=libmpv #-----------------------------------------------------------------------------# #### **** Audio **** ########################################################## #-----------------------------------------------------------------------------# #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 #ao=os #softvol="no" volume=36 #-----------------------------------------------------------------------------# #### **** Subtitles **** ## v ################################################# #-----------------------------------------------------------------------------# secondary-sid=auto sub-pos=88 # 자막 위치 설정 r/t sub-scale=0.9 # font size sub-auto=fuzzy # no, exact, fuzzy, all sub-codepage=cp949 sub-font="NanumGothic:style=Bold" sub-blur=0.3 sub-border-size=3 sub-color='#FAF4C0' sub-align-x=left #sub-text-align-x=left sub-file-paths="./Subs" #-----------------------------------------------------------------------------# #### **** Track Selection **** ################################################ #-----------------------------------------------------------------------------# #-- audio languages to use if available (fall back to English otherwise) -aid alang=kor,eng #-- subtitle languages to use if available. -sid slang=kor,eng #-- video tracks languages to use if available. -vid vlang=eng,kor #-----------------------------------------------------------------------------# #### **** Equalizer **** ###################################################### #-----------------------------------------------------------------------------# #brightness=<-100-100> #contrast=<-100-100> #saturation=<-100-100> #gamma=<-100-100> #hue=<-100-100> #-----------------------------------------------------------------------------# #### **** Demuxer **** ######################################################## #-----------------------------------------------------------------------------# demuxer-readahead-secs=20 # Read ahead about 5 seconds of audio and video packets. #demuxer-readahead-secs=5.0 #-----------------------------------------------------------------------------# #### **** Input **** ########################################################## #-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------# #### **** OSC (ON SCREEN CONTROLLER) **** ##################################### #-----------------------------------------------------------------------------# #no-osc #-- Disable the On Screen Controller (OSC) no-osd-bar osc=yes osd-playing-msg='${filename}' \t\t# display filename when video loads osd-duration=666 \t\t\t\t\t# default 1000 osd-blur=16 #-----------------------------------------------------------------------------# #### **** Screenshot **** ##################################################### #-----------------------------------------------------------------------------# screenshot-directory=~/Pictures/ #-----------------------------------------------------------------------------# #### **** Software Scaler **** ################################################ #-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------# #### **** Terminal **** ####################################################### #-----------------------------------------------------------------------------# terminal=no #-- Use quotes for text that can contain spaces: term-status-msg="Time: ${time-pos}" #-----------------------------------------------------------------------------# #### **** Cache **** ########################################################## #-----------------------------------------------------------------------------# #-- Use 150MB input cache for everything, even local files. cache=yes #-- Use 150MB input cache by default. The cache is enabled for network streams only. #cache-default=106954752 # size in KB 2147483647 demuxer-max-bytes=106954752 # ~1 GiB in bytes #-- Raise readahead from demuxer-readahead-secs to this value if a cache is active. cache-secs=66 #-- Disable the behavior that the player will pause if the cache goes below a #-- certain fill size. cache-pause=no #-----------------------------------------------------------------------------# #### **** Network **** ######################################################## #-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------# #### **** GPU renderer options **** ########################################### #-----------------------------------------------------------------------------# #sharpen=5 #-----------------------------------------------------------------------------# #### **** Miscellaneous **** ################################################## #-----------------------------------------------------------------------------# #user-agent="Mozilla/5.0"
Keyboard Shortcuts
mpv --input-cmdlist
단축키 설정 :: input.conf
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
MPV> Keyboard Shortcuts config…
|⇒ sudo subl ~/.config/mpv/input.conf
###################################################################### ####################### mpv mpv keybindings ####################### ###################################################################### # Location of user-defined bindings: ~/.config/mpv/input.conf ## Location of user-defined bindings: ~/Dropbox/dotconfig/mpv/input.conf # # Lines starting with # are comments. # 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 ` script-binding console/enable # Exit Ctrl+d \tMOUSE_BTN0 ignore # don't do anything MOUSE_BTN0_DBL cycle fullscreen # toggle fullscreen on/off MOUSE_BTN2 cycle pause # toggle pause on/off #MOUSE_BTN3 add volume -1 # Mouse 휠 위쪽 #MOUSE_BTN4 add volume 1 # Mouse 휠 아래쪽 #MOUSE_BTN5 no-osd seek -1 exact # Mouse 휠 왼쪽 #MOUSE_BTN6 no-osd seek 1 exact # Mouse 휠 오른쪽 #MBTN_LEFT ignore # don't do anything #MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off #MBTN_RIGHT cycle pause # toggle pause on/off #MBTN_BACK playlist-prev #MBTN_FORWARD playlist-next # 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 -1 WHEEL_DOWN add volume 1 WHEEL_LEFT no-osd seek -1 exact WHEEL_RIGHT no-osd seek 1 exact AXIS_UP add volume -1 AXIS_DOWN add volume 1 AXIS_LEFT no-osd seek -1 exact AXIS_RIGHT no-osd seek 1 exact ## Seek units are in seconds, but note that these are limited by keyframe UP add volume 1 DOWN add volume -1 LEFT no-osd seek -1 exact RIGHT no-osd seek 1 exact # Do smaller, always exact (non-keyframe-limited), seeks with shift. # Don't show them on the OSD (no-osd). #Shift+RIGHT seek 10 #Shift+LEFT seek -10 #Shift+UP no-osd seek 5 exact #Shift+DOWN no-osd seek -5 exact \t9 ignore # add volume -2 \t/ ignore # add volume -2 \t0 ignore # add volume 2 \t* ignore # add volume 2 # Adjust timing to previous/next subtitle #Ctrl+Shift+LEFT sub-step -1 #Ctrl+Shift+RIGHT sub-step 1 # Move video rectangle \tAlt+left ignore # add video-pan-x 0.1 \tAlt+right ignore # add video-pan-x -0.1 \tAlt+up ignore # add video-pan-y 0.1 \tAlt+down ignore # add video-pan-y -0.1 # Zoom/unzoom video \tAlt++ ignore # add video-zoom 0.1 Alt+= add video-zoom 0.1 Alt+- add video-zoom -0.1 Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 \tctrl++ ignore # add audio-delay 0.100 # this changes audio/video sync ctrl+= add audio-delay 0.100 ctrl+- add audio-delay -0.100 ctrl+BS set audio-delay 0 #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 1/1.1 # scale playback speed ] multiply speed 1.1 \\ set speed 1.0 { multiply speed 0.5 } multiply speed 2.0 #BS set speed 1.0 # reset speed to normal #Shift+BS revert-seek # undo previous (or marked) seek #Shift+Ctrl+BS revert-seek mark # mark position for revert-seek #q quit q quit-watch-later #Q quit-watch-later #q {encode} quit 4 #ESC set fullscreen no #ESC {encode} quit 4 \tp ignore # cycle pause # toggle pause/playback mode \tP ignore # show-progress p cycle_values video-rotate 90 180 270 0 . frame-step # advance one frame and pause , frame-back-step # go back by one frame and pause SPACE cycle pause ENTER cycle pause # Skip to previous/next subtitle \tCtrl+LEFT ignore # no-osd sub-seek -1 \tCtrl+RIGHT ignore # no-osd sub-seek 1 / no-osd sub-seek -1 ' no-osd sub-seek 1 #> 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 o no-osd cycle-values osd-level 3 1 i script-binding stats/display-stats \tI ignore # script-binding stats/display-stats-toggle #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 ###### subTitle ###### r add sub-pos -1 \t\t # move subtitles up t add sub-pos +1 \t\t # move subtitles down \tR ignore # add sub-pos +1 b cycle sub-visibility # stretch SSA/ASS subtitles with anamorphic videos to match historical v cycle sub V cycle sub down # 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 secondary-sid J cycle secondary-sid down #Ctrl+j cycle secondary-sid g \tcycle sub-ass-vsfilter-aspect-compat Alt+g \tcycle-values ass-force-margins "yes" "no" # does not work with :blend-subtitles z add sub-delay -0.1 # subtract 100 ms delay from subs \tZ ignore # add sub-delay +0.1 x add sub-delay +0.1 #SHARP cycle audio # switch audio streams #_ cycle video #T cycle ontop # toggle video window ontop of other windows f cycle fullscreen # toggle fullscreen s screenshot # take a screenshot #S screenshot video # ...without subtitles #Ctrl+s 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 #W add panscan +0.1 # zoom in #e add panscan +0.1 # zoom in # cycle video aspect ratios; "-1" is the container aspect #A cycle-values video-aspect-override "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 #DEL script-binding osc/visibility # cycle OSC display #ctrl+h cycle-values hwdec "auto" "no" # cycle hardware decoding #F8 show_text ${playlist} # show playlist #F9 show_text ${track-list} # show list of audio/sub streams ############################################################################### # 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 # ? cycle angle # switch DVD/Bluray angle # ? cycle sub-forced-only # toggle DVD forced subs # ? cycle program # cycle transport stream programs # ? stop # stop playback (quit or enter idle mode) # ? add balance -0.1 # adjust audio balance in favor of left # ? add balance 0.1 # right # ? sub-step -1 # immediately display next subtitle # ? sub-step +1 # previous # Apple Remote section # AR_PLAY \t\tcycle pause # AR_PLAY_HOLD \tquit # AR_CENTER \tcycle pause # AR_CENTER_HOLD quit # AR_NEXT \t\tseek 10 # AR_NEXT_HOLD \tseek 120 # AR_PREV \t\tseek -10 # AR_PREV_HOLD \tseek -120 # AR_MENU \t\tshow-progress # AR_MENU_HOLD \tcycle mute # AR_VUP \t\tadd volume 2 # AR_VUP_HOLD \tadd chapter 1 # AR_VDOWN \t\tadd volume -2 # AR_VDOWN_HOLD add chapter -1