home - plugins - tutorials - showcase - history - manual - design
mpv pluginplugin for the mpv media player
mpv plugin can remote control mpv media player using the JSON-based IPC protocol to open and play videos, apply video filters, pause video, slow down playback speed and so on
example (open ~/video.mp4 and apply chromahold filter)
#!mpv
loadfile ${HOME}/video.mp4
vf set "chromahold:color=green:blend=0.08"
when this code is evaluated by pressing "CTRL + e"
dublang sends it to mpv unix socket file by default located at
/tmp/dublang-mpv.sock
to see a list of available commands go to the mpv documentation
the ffmpeg documentation can also be useful
dublang plugin add synthatic sugar to mpv commands, specially for video filters, including also the ffmpeg filters supported by mpv
example
#!mpv
vf set "chromahold:color=green:blend=0.08"
the same code can also be expressed as
#!mpv
chromh $ col green $ ble 0.08
the function chromh and its arguments represented by
$ col green and $ ble 0.08 are translated to
vf set "chromahold:color=green:blend=0.08"
this feature is in a very experimental stage and might change in next versions
the list of available functions can be found at mpv plugin source code
videothe Lua global variable config.path.mpv can be used to
to tell mpv plugin where is the default path for videos
#!dublang
config.path.mpv = "/home/user/videos"
#!mpv
video "dune/01.mp4"
video command accept an optional argument to change the
time position to start the playback as a relative percent number
(example loading a movie on relative time of 50%)
#!mpv
video "dune/01.mp4" 50%
ablur $ x 10 $ y 10amp $ tol 3 $ rad 45 $ fac 4500 $ low 0.2 $ tol 0 $ thr 10amp [radius] [factor] [threshold] [tolerance] [low]backbblur $ lr 8 $ lp 8 $ cr [n] $ cp [n] $ ar [n] $ ap [n]bilat $ s 6 $ r 0.9cas 0.99chromh $ ble 0.08 $ col greenchromk $ col black $ ble 0.001cie $ system apple $ vie luv $ siz 0.5clr, clearcolorb $ rs 1 $ rm 0.5 $ rh 0.25 $ gs [n] $ gm [n] $ gh [n] $ bs [n] $ bm [n] $ bh [n]colorc $ rc 1 $ gm 1 $ rcw 1 $ pl 0colorch $ rr 0.3 $ rg 0.1 $ rb 0.3 $ ra 0 $ gr 0.6colorcor $ rl 0.1 $ bl 0.5colorh $ col blue $ sim 1 $ ble 0.3colorize $ hue 93 $ sat 0.2 $ lig 0 $ mix 1colork $ col blackcolort $ tem 1000 $ mix 0.8 $ pl 0.5crop $ w 500 $ h 100 $ x 20 $ y 10 $ asp 0curves $ pre negativedatas $ mode color2drawb $ x 100 $ y 50 $ w 50 $ h 50drawg $ wid 100 $ hei 100 $ thi 2 $ col red@0.5edge $ mod cannyeq $ con 20fade $ typ infps $ fps 2fps 2fre $ nam distort0r $ par 0.1|0.5hist $ str 0.5 $ int 10 $ ant 0.5histog $ lev 50 $ sca 10hsvh $ hue 200hue $ h 10 $ s 10limit $ min 10 $ max 100loop $ loo -1 $ siz 5 $ sta 0med $ rad 20mono $ cb 0.5negnoise $ alls 50 $ allf t+uoscipad $ w 640 $ h 480 $ x 20 $ y 40 $ col bluepausepixels $ mod block $ wid 640 $ hei 200 $ seed 10prewpseudo $ pre turborob $ pla 0xd $ sca 33 $ del 100rot $ ang 15rot 15scale $ siz 500x10scroll [v] [h]seek 0.5seek [f]shufflef $ map 0 2 1shufflep $ map 2:2:2:2stepstereo3d aybgstereo3d iclstereo3d sbsspeed [n], eg: speed 0.5thumb $ n 20tile $ lay 3x2 $ nb 5 $ pad 7 $ mar 2tmed $ rad 5trans $ dir 3 $ pass portraitvflip, hflipvideo "[video]"video "[video]" [n]%wave $ d stack $ mod columnhome - plugins - tutorials - showcase - history - manual - design