ffmpeg vid.stab

raw

phork0.txt

stabilisierung mit vid.stab-Plugin für ffmpeg (auch für melt)
problem: verwackelte handyvideos

http://public.hronopik.de/vid.stab/
parameterdoku: http://public.hronopik.de/vid.stab/features.php


ubuntu 16.04 + vid.stab:
- https://askubuntu.com/a/405557/15110
- https://launchpad.net/~mc3man/+archive/ubuntu/ffmpeg-test
beispiel: https://wiki.archlinux.org/index.php/FFmpeg#x264_video_stabilization


v1:
$ ffmpeg2 -i 20170912_081401.mp4 -vf vidstabdetect=shakiness=5:show=1 dummy.mp4
$ ffmpeg2 -i 20170912_081401.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 stabilized-output.mp4
 -> war komisch, flackernd - bestimmt der unsharp-filter


v2: 5s mit Drehung
$ ffmpeg2 -ss 00:00:10 -t 00:00:20 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=5:show=1 -y dummy.mp4
$ ffmpeg2 -ss 00:00:10 -t 00:00:05 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform stabilized-output.v2.mp4


v3: 30s, drehung
$ ffmpeg2 -ss 00:00:10 -t 00:00:30 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=5:show=1 -y dummy.mp4

v4: 30s, drehung, 20f smoothing
$ ffmpeg2 -ss 00:00:10 -t 00:00:30 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=20 stabilized-output.v4.mp4


v5: shakiness=10 (statt std 5)
$ ffmpeg2 -ss 00:00:10 -t 00:00:30 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=10:show=1 -y dummy.mp4
$ ffmpeg2 -ss 00:00:10 -t 00:00:30 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=10 stabilized-output.v5.mp4


v6: resize 1280x720
$ ffmpeg2 -ss 00:00:10 -t 00:00:30 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=10,scale=1280:-1 stabilized-output.v6.mp4

v6.1: keine dummydatei
$ ffmpeg2 -i dvd1/20170609_142905.mp4 -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=10:show=1 -f null -
$ ffmpeg2 -i dvd1/20170609_142905.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=10,scale=1280:-1 dvd1/20170609_142905.stab.mp4

unsharp? ne, hilft nicht.

alle stabilisieren + drehen:
$ time for i in dvd?/2017*.mp4; do ffmpeg2 -i "$i" -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=10:show=1 -f null -; ffmpeg2 -i "$i" -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=10,scale=1280:-1 "stab-$i"; done


----

ffmpeg parameters:
 -ss position - seek to (begin at)
 -t duration - relative to -ss
 -to position - absolute

man ffmpeg-filters


drehen:
$ ffmpeg -ss 00:00:10 -t 00:00:05 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape rotated.mp4
Christian Weiske Christian Weiske
owner

History