19 lines
886 B
YAML
19 lines
886 B
YAML
preset:
|
|
name: Stabilize video clip (two-pass, ffmpeg)
|
|
group: video
|
|
plugin: executor
|
|
props:
|
|
set:
|
|
inputtrf: { value:"{%uinput}.trf", escape:true }
|
|
script:
|
|
analyze:
|
|
info: Getting stabilization vectors
|
|
exec: "ffmpeg -i {%input} -vf vidstabdetect=stepsize=6:shakiness=8:accuracy=9:result={%inputtrf} -f null -"
|
|
parse: { from: 'stderr', regex: '/^frame=[\s]*([0-9]+)\s/', frame:1 }
|
|
stabilize:
|
|
info: Stabilizing video
|
|
exec: "ffmpeg -i {%input} -vf vidstabtransform=input={%inputtrf}:zoom=1:smoothing=30,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -preset slow -tune film -crf 18 -acodec copy {%output}"
|
|
parse: { from: 'stderr', regex: '/^frame=[\s]*([0-9]+)\s/', frame:1 }
|
|
cleanup:
|
|
exec: "rm {%inputtrf}"
|