mpv media player

Published by onesixx on

https://mpv.io/
https://github.com/mpv-player/mpv

MPlayer 와  mplayer2 를 기반해서 만든 media player

설치

최신버전 설치

sudo add-apt-repository ppa:mc3man/mpv-tests
sudo apt update && sudo apt upgrade
sudo apt install mpv

Keyboard Shortcuts

https://www.cheatography.com/someone/cheat-sheets/mpv-media-player/

  • 자막 상하 조절 : r/t
  • 자막 변경 : j/J                     Multi subtitle (Ctrl+J)
    mpv video.mp4 –sub-file first-subtitle.srt –sub-file second-subtitle.srt –secondary-sid 2
  • 자막 이동 : z/ x(0.1초씩)
  • 자막 보이기/숨기기 : v
  • ASS 자막 재정의 : u
  • Stay onTop : Shift+T
  • Info : Shift+I
  • A-V delay : Ctrl+ + (Shift+=) , Ctrl+ -

  • 끝내기 : Q
  • 볼륨 조절 : 9, 0
  • 콘트라스트 조절 : 1, 2
  • 밝기 조절 : 3, 4
  • 감마 조절 : 5, 6
  • 채도 조절 : 7, 8
  • 속도 재설정 : 백스페이스
  • 팬스캔 조절 : W, E
  • 현재 재생 진행율 표시 : O
  • 포즈 : P, Space
  • 재생 속도 조절 : [, ]
  • 스크린샷 : S
  • 디인터레이스 : D
  • 풀스크린 : F
  • TV 채널 : H, K
  • 루프 : L(시작, 끝, 반복재생)
  • 음소거 : M
  • 느리게 탐색 : <, >
  • 10초 앞으로 : 화살표 오른쪽
  • 10초 뒤로 : 화살표 왼쪽
  • 1분 앞으로 : 화살표 위
  • 1분 뒤로 : 활살표 아래
  • 챕터 : Page Up, Page Down
  • OSC 표시 : Delete
  • 음량 조절 : /, *

volumn”  9 0/
config 설정
speed player : [ ]
pause : p
quit : q
panscan : w e
subtitle delay: zx
sub position :: r t
subtitle display : v

ass subtitle style override : u
screenshot : s
deinterlace: d
full : f
subtitle : j
loop : l

설정

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

|⇒  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   # <no|yes|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

#-----------------------------------------------------------------------------#
#### **** 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=66

#-----------------------------------------------------------------------------#
#### **** 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

#-----------------------------------------------------------------------------#
#### **** 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}' 		# display filename when video loads
osd-duration=666 					# 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=66666
#-- Use 150MB input cache by default. The cache is enabled for network streams only.
cache-default=666666                   # size in KB
demuxer-max-bytes=1147483647            # ~1 GiB in bytes
#-- Raise readahead from demuxer-readahead-secs to this value if a cache is active.
cache-secs=66.6
#-- 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"

단축키 설정  :: input.conf

https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|⇒  sudo subl ~/.config/mpv/input.conf
######################################################################
####################### mpv mpv keybindings    #######################
######################################################################
# ~/.config/mpv/input.conf
F10  no-osd vf del rotate=1
F11  cycle_values video-rotate 90 180 270 0
F12  cycle_values !reverse video-rotate 90 180 270 0

#MOUSE_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 no-osd seek  1 exact         # 마우스 휠 위쪽
MOUSE_BTN4 no-osd seek -1 exact         # 마우스 휠 아래쪽
MOUSE_BTN5 add volume -2                # 마우스 휠 왼쪽
MOUSE_BTN6 add volume 2                 # 마우스 휠 오른쪽

# Mouse wheels, touchpad
#AXIS_UP    seek 10
#AXIS_DOWN  seek -10
#AXIS_LEFT  seek 5
#AXIS_RIGHT seek -5

## Seek units are in seconds, but note that these are limited by keyframes
RIGHT seek  1
LEFT  seek -1
UP    add volume 2
DOWN  add volume -2

# 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

# 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

#0 add volume 2
#9 add volume -2

#* 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

###### 자막 ######
#v cycle sub-visibility
#r add sub-pos -1                       # move subtitles up
#t add sub-pos +1                       #                down

# 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
Ctrl+j cycle secondary-sid
Alt+j  cycle-values ass-force-margins "yes" "no"  # does not work with :blend-subtitles


#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)
Categories: Ubuntu

onesixx

Blog Owner

Leave a Reply

Your email address will not be published.