Video stabilization with vid.stab (libvidstab) under Max OSX Mojave

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Video stabilization with vid.stab (libvidstab) under Max OSX Mojave

diehl
Hello all,

I've been attempting to stabilize a number of videos with libvidstab through
ffmpeg 4.1 and after the two step process is complete, there's no observable
change in the output video. At this point, I'm baffled about what is causing
this. Below I list out what I've done and observed. Are there any hints in
there that suggest what might be wrong?

I'd appreciate any suggestions! Thanks!

Chris

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

First of all, I installed ffmpeg with libvidstab enabled by: brew install
ffmpeg --with-libvidstab

When executing the first pass on a particular file, I see the following:
ffmpeg -t 20 -i ../Raw/Flights\ 2\ and\ 3/DJI_0041.MOV -vf
vidstabdetect=stepsize=32:shakiness=10:accuracy=5:result=../Edits/Interim-MexicanHat-HighAltitudeLanding-Transform.trf
-f null -
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared
--enable-pthreads --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus
--enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma
--enable-libvidstab --enable-opencl --enable-videotoolbox
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../Raw/Flights 2 and
3/DJI_0041.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537986816
    compatible_brands: qt
    creation_time   : 2017-12-31T13:00:34.000000Z
    location        : +37.130096-109.877826+493.100
    location-{    : +37.130096-109.877826+493.100
    comment         : DE=None, Mode=A, DSW=0001
  Duration: 00:03:01.70, start: 0.000000, bitrate: 99910 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 4096x2160 [SAR 1:1 DAR 256:135], 99893 kb/s, 59.94 fps, 59.94 tbr,
60k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2017-12-31T13:00:34.000000Z
      handler_name    : DJI.AVC
      encoder         : AVC encoder
    Stream #0:1(eng): Data: none (priv / 0x76697270), 12 kb/s
    Metadata:
      creation_time   : 2017-12-31T13:00:34.000000Z
      handler_name    : DJI.Meta
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
[vidstabdetect @ 0x7ffeebacc038] Fieldsize: 224, Maximal translation: 308
pixel
[vidstabdetect @ 0x7ffeebacc038] Number of used measurement fields: 23 out
of 70
[vidstabdetect @ 0x7ffeebacc038] Fieldsize: 48, Maximal translation: 48
pixel
[vidstabdetect @ 0x7ffeebacc038] Number of used measurement fields: 266 out
of 800
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80] Video stabilization settings (pass
1/2):
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]      shakiness = 10
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]       accuracy = 5
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]       stepsize = 32
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]    mincontrast = 0.250000
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]         tripod = 0
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]           show = 0
[Parsed_vidstabdetect_0 @ 0x7ff648e06c80]         result =
../Edits/Interim-MexicanHat-HighAltitudeLanding-Transform.trf
Output #0, null, to 'pipe:':
  Metadata:
    major_brand     : qt
    minor_version   : 537986816
    compatible_brands: qt
    comment         : DE=None, Mode=A, DSW=0001
    location        : +37.130096-109.877826+493.100
    location-{    : +37.130096-109.877826+493.100
    encoder         : Lavf58.20.100
    Stream #0:0(eng): Video: wrapped_avframe, yuv420p, 4096x2160 [SAR 1:1
DAR 256:135], q=2-31, 200 kb/s, 59.94 fps, 59.94 tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2017-12-31T13:00:34.000000Z
      handler_name    : DJI.AVC
      encoder         : Lavc58.35.100 wrapped_avframe
frame= 1199 fps=3.8 q=-0.0 Lsize=N/A time=00:00:20.00 bitrate=N/A
speed=0.0636x
video:628kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown

When executing the second pass, I see the following:
ffmpeg -t 20 -i ../Raw/Flights\ 2\ and\ 3/DJI_0041.MOV -vf
vidstabtransform=input=../Edits/Interim-MexicanHat-HighAltitudeLanding-Transform.trf:smoothing=10
../Edits/MexicanHat-HighAltitudeLanding-4K.MOV # -filter:v
"setpts=0.1667*PTS" ../Edits/MexicanHat-HighAltitudeLanding-4K.MOV
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared
--enable-pthreads --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus
--enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma
--enable-libvidstab --enable-opencl --enable-videotoolbox
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../Raw/Flights 2 and
3/DJI_0041.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537986816
    compatible_brands: qt
    creation_time   : 2017-12-31T13:00:34.000000Z
    location        : +37.130096-109.877826+493.100
    location-{    : +37.130096-109.877826+493.100
    comment         : DE=None, Mode=A, DSW=0001
  Duration: 00:03:01.70, start: 0.000000, bitrate: 99910 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 4096x2160 [SAR 1:1 DAR 256:135], 99893 kb/s, 59.94 fps, 59.94 tbr,
60k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2017-12-31T13:00:34.000000Z
      handler_name    : DJI.AVC
      encoder         : AVC encoder
    Stream #0:1(eng): Data: none (priv / 0x76697270), 12 kb/s
    Metadata:
      creation_time   : 2017-12-31T13:00:34.000000Z
      handler_name    : DJI.Meta
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440] Video
transformation/stabilization settings (pass 2/2):
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     input     =
../Edits/Interim-MexicanHat-HighAltitudeLanding-Transform.trf
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     smoothing = 10
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     optalgo   = gauss
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     maxshift  = -1
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     maxangle  = -1.000000
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     crop      = Keep
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     relative  = True
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     invert    = False
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     zoom      = 0.000000
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     optzoom   = Static (1)
[Parsed_vidstabtransform_0 @ 0x7fd6fa704440]     interpol  = Bi-Linear (2)
[vidstabtransform @ 0x7ffee30adf98] Final zoom: 0.022728
[libx264 @ 0x7fd6fc001200] using SAR=1/1
[libx264 @ 0x7fd6fc001200] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fd6fc001200] profile High, level 5.2
[libx264 @ 0x7fd6fc001200] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0
direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mov, to '../Edits/MexicanHat-HighAltitudeLanding-4K.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 537986816
    compatible_brands: qt
    comment         : DE=None, Mode=A, DSW=0001
    location        : +37.130096-109.877826+493.100
    location-{    : +37.130096-109.877826+493.100
    encoder         : Lavf58.20.100
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
4096x2160 [SAR 1:1 DAR 256:135], q=-1--1, 59.94 fps, 60k tbn, 59.94 tbc
(default)
    Metadata:
      creation_time   : 2017-12-31T13:00:34.000000Z
      handler_name    : DJI.AVC
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 1199 fps=4.0 q=-1.0 Lsize=   40698kB time=00:00:19.95
bitrate=16709.0kbits/s speed=0.0667x
video:40683kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.038054%
[libx264 @ 0x7fd6fc001200] frame I:5     Avg QP:22.08  size:753345
[libx264 @ 0x7fd6fc001200] frame P:302   Avg QP:24.60  size: 88462
[libx264 @ 0x7fd6fc001200] frame B:892   Avg QP:28.95  size: 12529
[libx264 @ 0x7fd6fc001200] consecutive B-frames:  0.8%  0.2%  0.0% 99.1%
[libx264 @ 0x7fd6fc001200] mb I  I16..4:  0.4% 80.4% 19.2%
[libx264 @ 0x7fd6fc001200] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4: 45.4%
10.5%  7.9%  0.0%  0.0%    skip:36.1%
[libx264 @ 0x7fd6fc001200] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 44.7%
0.1%  0.0%  direct: 0.0%  skip:55.3%  L0:43.6% L1:56.3% BI: 0.1%
[libx264 @ 0x7fd6fc001200] 8x8 transform intra:80.6% inter:77.5%
[libx264 @ 0x7fd6fc001200] coded y,uvDC,uvAC intra: 97.3% 60.9% 5.5% inter:
7.0% 3.0% 0.0%
[libx264 @ 0x7fd6fc001200] i16 v,h,dc,p:  5%  4%  6% 85%
[libx264 @ 0x7fd6fc001200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 12% 13% 11%
8%  8%  8% 13% 14%
[libx264 @ 0x7fd6fc001200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13% 10% 11%
11%  9%  9% 11% 11%
[libx264 @ 0x7fd6fc001200] i8c dc,h,v,p: 53% 18% 27%  2%
[libx264 @ 0x7fd6fc001200] Weighted P-Frames: Y:0.3% UV:0.0%
[libx264 @ 0x7fd6fc001200] ref P L0: 55.4% 21.9% 18.4%  4.3%  0.0%
[libx264 @ 0x7fd6fc001200] ref B L0: 94.6%  4.8%  0.6%
[libx264 @ 0x7fd6fc001200] ref B L1: 95.7%  4.3%
[libx264 @ 0x7fd6fc001200] kb/s:16660.55



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Video stabilization with vid.stab (libvidstab) under Max OSX Mojave

kumowoon1025
Not sure if this is the problem, but accuracy >= shakiness, according to the
description.





--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".