<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>ffmpeg vid.stab</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/492 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="492"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  &lt;div class="code"&gt;&lt;pre class="txt"&gt;stabilisierung mit vid.stab-Plugin für ffmpeg (auch für melt)&#13;
problem: verwackelte handyvideos&#13;
&#13;
http://public.hronopik.de/vid.stab/&#13;
parameterdoku: http://public.hronopik.de/vid.stab/features.php&#13;
&#13;
&#13;
ubuntu 16.04 + vid.stab:&#13;
- https://askubuntu.com/a/405557/15110&#13;
- https://launchpad.net/~mc3man/+archive/ubuntu/ffmpeg-test&#13;
beispiel: https://wiki.archlinux.org/index.php/FFmpeg#x264_video_stabilization&#13;
&#13;
&#13;
v1:&#13;
$ ffmpeg2 -i 20170912_081401.mp4 -vf vidstabdetect=shakiness=5:show=1 dummy.mp4&#13;
$ ffmpeg2 -i 20170912_081401.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 stabilized-output.mp4&#13;
 -&amp;gt; war komisch, flackernd - bestimmt der unsharp-filter&#13;
&#13;
&#13;
v2: 5s mit Drehung&#13;
$ 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&#13;
$ ffmpeg2 -ss 00:00:10 -t 00:00:05 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform stabilized-output.v2.mp4&#13;
&#13;
&#13;
v3: 30s, drehung&#13;
$ 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&#13;
&#13;
v4: 30s, drehung, 20f smoothing&#13;
$ 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&#13;
&#13;
&#13;
v5: shakiness=10 (statt std 5)&#13;
$ 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&#13;
$ 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&#13;
&#13;
&#13;
v6: resize 1280x720&#13;
$ 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&#13;
&#13;
v6.1: keine dummydatei&#13;
$ ffmpeg2 -i dvd1/20170609_142905.mp4 -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=10:show=1 -f null -&#13;
$ ffmpeg2 -i dvd1/20170609_142905.mp4 -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=10,scale=1280:-1 dvd1/20170609_142905.stab.mp4&#13;
&#13;
unsharp? ne, hilft nicht.&#13;
&#13;
alle stabilisieren + drehen:&#13;
$ time for i in dvd?/2017*.mp4; do ffmpeg2 -i &amp;quot;$i&amp;quot; -filter:v transpose=2:passthrough=landscape,vidstabdetect=shakiness=10:show=1 -f null -; ffmpeg2 -i &amp;quot;$i&amp;quot; -filter:v transpose=2:passthrough=landscape,vidstabtransform=smoothing=10,scale=1280:-1 &amp;quot;stab-$i&amp;quot;; done&#13;
&#13;
&#13;
----&#13;
&#13;
ffmpeg parameters:&#13;
 -ss position - seek to (begin at)&#13;
 -t duration - relative to -ss&#13;
 -to position - absolute&#13;
&#13;
man ffmpeg-filters&#13;
&#13;
&#13;
drehen:&#13;
$ ffmpeg -ss 00:00:10 -t 00:00:05 -i 20170912_081401.mp4 -filter:v transpose=2:passthrough=landscape rotated.mp4&#13;
&lt;/pre&gt;&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/492/rev-raw/f2af5d042b7dea25de8769796050a7f96d3fea61/phork0.txt" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/492#phork0.txt"&gt;phork0.txt&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
