FS#41026 - ffmpeg-full gained --libvidstab 2014-06-29

Attached to Project: Arch Linux
Opened by Evert Vorster (evorster) - Sunday, 29 June 2014, 02:40 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 29 June 2014, 03:19 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The --libvidstab switch in ./configure of ffmpeg-full fails because vid.stab is not installed.
Currently there is no package in Arch or AUR that installs vid.stab.

vid.stab homepage is: http://public.hronopik.de/vid.stab/features.php?lang=en

I created a rudimentary PKBUILD for vid.stab, it's attached.
( I'm not terribly good at this, it's my first try - I'm new to Arch, formerly a Sorcerer Linux user)

Anyways, once vid.stab is installed, then the --enable-libvidstab configure flag works.


Proof:

[evert@dv7 22_Workboat]$ ffmpeg -i GOPR1218_1073.MP4 -vf vidstabdetect output.mp4
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 29 2014 02:18:45 with gcc 4.9.0 (GCC) 20140521 (prerelease)
configuration: --prefix=/usr --disable-debug --disable-static --enable-shared --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libaacplus --enable-libass --enable-libbluray --enable-libcaca --enable-libcdio --enable-libcelt --enable-libdc1394 --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-nonfree --enable-openal --enable-opengl --enable-openssl --enable-pic --enable-libvidstab --enable-version3 --enable-x11grab
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GOPR1218_1073.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:00:15.04, start: 0.010000, bitrate: 35059 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1524 [SAR 1:1 DAR 676:381], 34926 kb/s, 25 fps, 25 tbr, 180k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
[swscaler @ 0x241b040] deprecated pixel format used, make sure you did set range correctly
[vidstabdetect @ 0x7ffff51846b0] Fieldsize: 160, Maximal translation: 217 pixel
[vidstabdetect @ 0x7ffff51846b0] Number of used measurement fields: 65 out of 65
[vidstabdetect @ 0x7ffff51846b0] Fieldsize: 32, Maximal translation: 32 pixel
[vidstabdetect @ 0x7ffff51846b0] Number of used measurement fields: 840 out of 840
[Parsed_vidstabdetect_0 @ 0x2439460] Video stabilization settings (pass 1/2):
[Parsed_vidstabdetect_0 @ 0x2439460] shakiness = 5
[Parsed_vidstabdetect_0 @ 0x2439460] accuracy = 15
[Parsed_vidstabdetect_0 @ 0x2439460] stepsize = 6
[Parsed_vidstabdetect_0 @ 0x2439460] mincontrast = 0.250000
[Parsed_vidstabdetect_0 @ 0x2439460] tripod = 0
[Parsed_vidstabdetect_0 @ 0x2439460] show = 0
[Parsed_vidstabdetect_0 @ 0x2439460] result = transforms.trf
[libx264 @ 0x2437a60] using SAR=1/1
[libx264 @ 0x2437a60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x2437a60] profile High, level 5.0
[libx264 @ 0x2437a60] 264 - core 142 r2397M b7a50c1 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=12 lookahead_threads=2 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, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 2704x1524 [SAR 1:1 DAR 676:381], q=-1--1, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 203)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 204)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 211)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 212)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 229)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 259)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 260)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 261)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 262)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 263)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 264)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 304)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 306)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 331)
[vidstabdetect @ 0x7ffff5189030] too low contrast. (no translations are detected in frame 332)
frame= 376 fps=4.8 q=-1.0 Lsize= 15747kB time=00:00:15.04 bitrate=8576.9kbits/s
video:15534kB audio:203kB subtitle:0 data:0 global headers:0kB muxing overhead 0.061180%
[libx264 @ 0x2437a60] frame I:10 Avg QP:20.05 size: 77301
[libx264 @ 0x2437a60] frame P:361 Avg QP:22.08 size: 41461
[libx264 @ 0x2437a60] frame B:5 Avg QP:24.39 size: 33184
[libx264 @ 0x2437a60] consecutive B-frames: 97.3% 2.7% 0.0% 0.0%
[libx264 @ 0x2437a60] mb I I16..4: 30.3% 65.2% 4.5%
[libx264 @ 0x2437a60] mb P I16..4: 18.6% 28.1% 0.5% P16..4: 30.2% 3.3% 2.3% 0.0% 0.0% skip:17.0%
[libx264 @ 0x2437a60] mb B I16..4: 0.3% 2.4% 0.3% B16..8: 44.9% 5.1% 0.8% direct: 3.1% skip:43.2% L0:41.1% L1:54.6% BI: 4.3%
[libx264 @ 0x2437a60] 8x8 transform intra:59.9% inter:93.5%
[libx264 @ 0x2437a60] coded y,uvDC,uvAC intra: 23.0% 42.1% 2.6% inter: 16.0% 31.1% 0.0%
[libx264 @ 0x2437a60] i16 v,h,dc,p: 32% 28% 14% 26%
[libx264 @ 0x2437a60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 19% 38% 2% 4% 3% 5% 2% 2%
[libx264 @ 0x2437a60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 24% 22% 3% 7% 5% 6% 2% 2%
[libx264 @ 0x2437a60] i8c dc,h,v,p: 63% 17% 18% 2%
[libx264 @ 0x2437a60] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x2437a60] ref P L0: 62.7% 6.9% 20.8% 9.6%
[libx264 @ 0x2437a60] ref B L0: 92.7% 7.3%
[libx264 @ 0x2437a60] kb/s:8460.79
---------------------------------------------------------------------------------------------

And then the second pass to actually stabilize the video:


[evert@dv7 22_Workboat]$ ffmpeg -i GOPR1218_1073.MP4 -vf vidstabtransform myvideo_stabilisted.mp4
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 29 2014 02:18:45 with gcc 4.9.0 (GCC) 20140521 (prerelease)
configuration: --prefix=/usr --disable-debug --disable-static --enable-shared --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libaacplus --enable-libass --enable-libbluray --enable-libcaca --enable-libcdio --enable-libcelt --enable-libdc1394 --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-nonfree --enable-openal --enable-opengl --enable-openssl --enable-pic --enable-libvidstab --enable-version3 --enable-x11grab
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'GOPR1218_1073.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Duration: 00:00:15.04, start: 0.010000, bitrate: 35059 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1524 [SAR 1:1 DAR 676:381], 34926 kb/s, 25 fps, 25 tbr, 180k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
[swscaler @ 0x1e7c040] deprecated pixel format used, make sure you did set range correctly
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] Video transformation/stabilization settings (pass 2/2):
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] input = transforms.trf
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] smoothing = 15
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] optalgo = gauss
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] maxshift = -1
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] maxangle = -1.000000
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] crop = Keep
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] relative = True
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] invert = False
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] zoom = 0.000000
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] optzoom = Static (1)
[Parsed_vidstabtransform_0 @ 0x1e9a4a0] interpol = Bi-Linear (2)
[vidstabtransform @ 0x7fffad303330] Final zoom: 13.730918
[libx264 @ 0x1e98a60] using SAR=1/1
[libx264 @ 0x1e98a60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1e98a60] profile High, level 5.0
[libx264 @ 0x1e98a60] 264 - core 142 r2397M b7a50c1 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=12 lookahead_threads=2 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, mp4, to 'myvideo_stabilisted.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 2704x1524 [SAR 1:1 DAR 676:381], q=-1--1, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
frame= 376 fps=8.4 q=-1.0 Lsize= 15332kB time=00:00:15.04 bitrate=8351.3kbits/s
video:15120kB audio:203kB subtitle:0 data:0 global headers:0kB muxing overhead 0.062349%
[libx264 @ 0x1e98a60] frame I:6 Avg QP:20.52 size: 76935
[libx264 @ 0x1e98a60] frame P:369 Avg QP:22.06 size: 40621
[libx264 @ 0x1e98a60] frame B:1 Avg QP:24.24 size: 31582
[libx264 @ 0x1e98a60] consecutive B-frames: 99.5% 0.5% 0.0% 0.0%
[libx264 @ 0x1e98a60] mb I I16..4: 20.2% 73.7% 6.1%
[libx264 @ 0x1e98a60] mb P I16..4: 14.8% 29.7% 0.4% P16..4: 33.2% 3.5% 2.2% 0.0% 0.0% skip:16.2%
[libx264 @ 0x1e98a60] mb B I16..4: 0.3% 2.9% 0.4% B16..8: 43.8% 4.8% 0.6% direct: 2.4% skip:44.9% L0:36.2% L1:59.8% BI: 4.0%
[libx264 @ 0x1e98a60] 8x8 transform intra:66.5% inter:94.8%
[libx264 @ 0x1e98a60] coded y,uvDC,uvAC intra: 23.3% 36.8% 2.4% inter: 17.4% 34.1% 0.0%
[libx264 @ 0x1e98a60] i16 v,h,dc,p: 24% 30% 9% 37%
[libx264 @ 0x1e98a60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 34% 2% 5% 3% 5% 2% 2%
[libx264 @ 0x1e98a60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 25% 16% 3% 9% 6% 8% 2% 3%
[libx264 @ 0x1e98a60] i8c dc,h,v,p: 65% 16% 16% 3%
[libx264 @ 0x1e98a60] Weighted P-Frames: Y:0.3% UV:0.0%
[libx264 @ 0x1e98a60] ref P L0: 60.6% 6.5% 22.4% 10.6% 0.0%
[libx264 @ 0x1e98a60] ref B L0: 88.1% 11.9%
[libx264 @ 0x1e98a60] kb/s:8235.28
[evert@dv7 22_Workboat]$


Once support for this library is compiled in ffmpeg, mlt-git and Shotcut-git can do better video stabilization.
I'm chatting to the developer about how the actually enable the vid.stab in shotcut.

The main reason I want this to work is so that I can add this feature to kdenlive, but support for it has to be added into the distro first.

I would like someone to co-maintain this vid.stab package with me in the AUR, mainly because I have long stretches in time where I don't touch a computer, and also to give me some pointers on Arch etiquette wile I am getting up to speed.

Contact me directly at evorster@gmail.com, if you want.
   PKGBUILD (0.7 KiB)
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 29 June 2014, 03:19 GMT
Reason for closing:  Not a bug
Additional comments about closing:  AUR packages are not supported
Comment by Doug Newgard (Scimmia) - Sunday, 29 June 2014, 02:52 GMT
Is this only an issue on ffmpeg-full, an AUR package? If so, this isn't the appropriate place for this, as the AUR is unsupported.
Comment by Evert Vorster (evorster) - Sunday, 29 June 2014, 03:07 GMT
My apologies for posting this in the wrong bit. I'm new around here.

How do I get this message to ffmpeg-full maintainer?
It's a bit lengthy to just paste to ffmpeg-full in AUR.

This does have a little bearing on the normal ffmpeg package, as in the end I hope that the supported ffmpeg package will also support video stabilization, but that's some ways down the road. It was just easier to change compiler flags in the PKGBUILD of ffmpeg-full, precisely because it's in AUR. Also, a new package needs to be created, and if my understanding is correct that needs to happen in AUR first?

Comment by Doug Newgard (Scimmia) - Sunday, 29 June 2014, 03:18 GMT
The best way is to either post some info in the AUR comments or to email the maintainer directly.

If you're wanting this to be added to the standard ffmpeg package, you can file a feature request for it on this bug tracker. Normally I would just change this into a feature request, but with the way the report is set up, it doesn't make sense to do that. It's nice if the new package needed is already in the AUR and in use, but it's not required. The ffmpeg maintainer can make a new package if he feels it's appropriate.

Loading...