php-vfxapply/presets/executor/executor-vidstab-ffmpeg.yml

19 lines
886 B
YAML
Raw Normal View History

2017-01-13 01:18:46 +00:00
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}"