home - plugins - tutorials - showcase - history - manual - design
plugin 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
video
the 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 10
amp $ tol 3 $ rad 45 $ fac 4500 $ low 0.2 $ tol 0 $ thr 10
amp [radius] [factor] [threshold] [tolerance] [low]
back
bblur $ lr 8 $ lp 8 $ cr [n] $ cp [n] $ ar [n] $ ap [n]
bilat $ s 6 $ r 0.9
cas 0.99
chromh $ ble 0.08 $ col green
chromk $ col black $ ble 0.001
cie $ system apple $ vie luv $ siz 0.5
clr, clear
colorb $ 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 0
colorch $ rr 0.3 $ rg 0.1 $ rb 0.3 $ ra 0 $ gr 0.6
colorcor $ rl 0.1 $ bl 0.5
colorh $ col blue $ sim 1 $ ble 0.3
colorize $ hue 93 $ sat 0.2 $ lig 0 $ mix 1
colork $ col black
colort $ tem 1000 $ mix 0.8 $ pl 0.5
crop $ w 500 $ h 100 $ x 20 $ y 10 $ asp 0
curves $ pre negative
datas $ mode color2
drawb $ x 100 $ y 50 $ w 50 $ h 50
drawg $ wid 100 $ hei 100 $ thi 2 $ col red@0.5
edge $ mod canny
eq $ con 20
fade $ typ in
fps $ fps 2
fps 2
fre $ nam distort0r $ par 0.1|0.5
hist $ str 0.5 $ int 10 $ ant 0.5
histog $ lev 50 $ sca 10
hsvh $ hue 200
hue $ h 10 $ s 10
limit $ min 10 $ max 100
loop $ loo -1 $ siz 5 $ sta 0
med $ rad 20
mono $ cb 0.5
neg
noise $ alls 50 $ allf t+u
osci
pad $ w 640 $ h 480 $ x 20 $ y 40 $ col blue
pause
pixels $ mod block $ wid 640 $ hei 200 $ seed 10
prew
pseudo $ pre turbo
rob $ pla 0xd $ sca 33 $ del 100
rot $ ang 15
rot 15
scale $ siz 500x10
scroll [v] [h]
seek 0.5
seek [f]
shufflef $ map 0 2 1
shufflep $ map 2:2:2:2
step
stereo3d aybg
stereo3d icl
stereo3d sbs
speed [n]
, eg: speed 0.5
thumb $ n 20
tile $ lay 3x2 $ nb 5 $ pad 7 $ mar 2
tmed $ rad 5
trans $ dir 3 $ pass portrait
vflip, hflip
video "[video]"
video "[video]" [n]%
wave $ d stack $ mod column
home - plugins - tutorials - showcase - history - manual - design