#10333 closed defect (invalid)

Deshake is obsoleted by high resolutions

Reported by: Noitarud Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: deshake
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Noitarud)

Untested but inadequacy seen in https://ffmpeg.org/ffmpeg-filters.html#deshake

A)Says motion window is just 64 pixels, for a shaking camera I will need to drop the resolution! A workaround I just realised is stacked filters, your comment will still be good to have.

Application is someone filming seated in a presentation watching the slides, their motion is usually gentle.
"Paul Stamets Speaking on all things Fungi"

B)I have not used it yet but I see no options on lenience - it just says "stabilize shaky video", is the intent to freeze the view or buffer knock/sway amplitude? If the outcome is inadequate, (C)one idea perhaps is to make the log, then edit it with the desired response (location of subject) then feed it to ffmpeg (shake!) as a cue file.

D) I tested it and it did something other than advertised, when I read the name "Deshake" I presumed it would only remove panning problems, but it rolled my video (at the start and it seemed to ignore the rest). The rolling might deserve its own ticket, but a roll action would mean the objective of this filter was different and a new filter would need to be written.

Change History (8)

comment:1 by Michael Koch, 19 months ago

Try vidstabdetect/vidstabtransform, in my opinion it works better than deshake.

comment:2 by Noitarud, 19 months ago

Description: modified (diff)

Edited ticket with section D, details of first test.

I will take a look at this vidstab…

Last edited 19 months ago by Noitarud (previous) (diff)

comment:3 by Michael Koch, 19 months ago

If deshake doesn't do what it's expected to do, please show your command line and full console output, and a link to a short input video.

comment:4 by Noitarud, 19 months ago

Input video is the YouTube video captured at 640×360 (375,354,185 byte).

"C:\Program Files\GPAC\ffmpeg" -i "D:\Temp\Composition\Food,Health\Paul Stamets Speaking on all things Fungi.mp4" -filter:v deshake=0:120:240:120:64:0:original:8:200:less E:\out.mp4

•serious roll on the splash screen before camera footage begins.
•not much correction noticed, if at all.
•input settings were assuming it was shake only, not roll. Told it to look at left edge.
•~2014 version used because that works on machine, I assume little improvment since.

comment:5 by Michael Koch, 19 months ago

Resolution: invalid
Status: newclosed

Nobody can reproduce this issue because you didn't provide a link to the input video and the full console output.

comment:6 by Noitarud, 18 months ago

Video: I actually did give the title and origin… i probably used Seal (android app) to acquire it… url https://www.youtube.com/watch?v=9ZO9ipulgyg . I had since added chapters to file (I removed these entries below). Interesting that the write speed increases throughout, output was a 64Gb USB stick on slow(?) port. Recreated this time too.

You may just need to ammend the instructions of shake if i musunderstod that actually was what it was supposed to do. If not obsoleted by high resolutions, please give tips for its intended application (and what kind of zone I should chose) with filter having such a limitation.

Command:
"C:\Program Files\GPAC\ffmpeg" -i "D:\[OMIT]\Paul Stamets Speaking on all things Fungi.mp4" -filter:v deshake=0:120:240:120:64:0:original:8:200:less E:\out.mp4

Console output, I have [OMIT] some lines:

ffmpeg version N-64167-gca35037 Copyright (c) 2000-2014 the FFmpeg developers

built on Jun 22 2014 22:02:17 with gcc 4.8.3 (GCC)

configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av

isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp

e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib

libavutil 52. 90.100 / 52. 90.100
libavcodec 55. 68.100 / 55. 68.100
libavformat 55. 44.100 / 55. 44.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 9.100 / 4. 9.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Paul Stamets Speaking on all things
Fungi(original).mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Mushroom Mycelium and the World Wide Food Web
artist : Paul Stamets
encoder : Lavf55.44.100

Duration: 01:48:49.00, start: 0.000000, bitrate: 459 kb/s

Chapter #0.0: start 0.000000, end 180.000000
Metadata:

title : Paul StametsÆ Revolitionary Solution for Disease Prevent

ion

Chapter #0.1: start 180.000000, end 419.000000
Metadata:

title : My Hat. Amadou for fire, fabric, Napoleonic ignition, Ag

[OMITTED TEXT - CHAPTER DATA]

Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu

v420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 357 kb/s, 29.97 fps, 29.97 tbr, 30
k tbn, 59.94 tbc (default)

Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95

kb/s (default)

Metadata:

handler_name : SoundHandler

Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574), 0 kb/s
Metadata:

handler_name : SubtitleHandler

File 'E:\out.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 030c0820] using SAR=1/1
[libx264 @ 030c0820] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 030c0820] profile High, level 3.0
[libx264 @ 030c0820] 264 - core 142 r2431 ac76440 - H.264/MPEG-4 AVC codec - Cop
yleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deb
lock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
e_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chro
ma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 i
nterlaced=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 scenec
ut=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
[mp4 @ 031688e0] Using AVStream.codec.time_base as a timebase hint to the muxer
is deprecated. Set AVStream.time_base instead.

Last message repeated 1 times

Output #0, mp4, to 'E:\out.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Mushroom Mycelium and the World Wide Food Web
artist : Paul Stamets
encoder : Lavf55.44.100

[OMITTED TEXT - CHAPTER DATA]

Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 6

40x360 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)

Metadata:

handler_name : VideoHandler
encoder : Lavc55.68.100 libx264

Stream #0:1(und): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100

Hz, stereo, s16, 128 kb/s (default)

Metadata:

handler_name : SoundHandler
encoder : Lavc55.68.100 libvo_aacenc

Stream mapping:

Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc))

Press [q] to stop, ? for help
frame= 14 fps=0.0 q=0.0 size= 3kB time=00:00:00.49 bitrate= 43.5kbits/s

frame= 37 fps= 36 q=0.0 size= 3kB time=00:00:01.26 bitrate= 17.1kbits/s
frame= 57 fps= 38 q=29.0 size= 19kB time=00:00:01.93 bitrate= 80.7kbits/
frame= 72 fps= 35 q=29.0 size= 38kB time=00:00:02.42 bitrate= 128.9kbits/
frame= 93 fps= 37 q=29.0 size= 59kB time=00:00:03.14 bitrate= 153.4kbits/
frame= 114 fps= 38 q=29.0 size= 80kB time=00:00:03.84 bitrate= 169.6kbits/
frame= 134 fps= 38 q=29.0 size= 98kB time=00:00:04.49 bitrate= 178.0kbits/
frame= 154 fps= 38 q=29.0 size= 114kB time=00:00:05.16 bitrate= 180.9kbits/
frame= 174 fps= 38 q=29.0 size= 152kB time=00:00:05.83 bitrate= 212.6kbits/
frame= 194 fps= 39 q=29.0 size= 181kB time=00:00:06.51 bitrate= 227.1kbits/
frame= 214 fps= 39 q=29.0 size= 211kB time=00:00:07.16 bitrate= 241.5kbits/
frame= 235 fps= 39 q=29.0 size= 248kB time=00:00:07.88 bitrate= 257.3kbits/
frame= 256 fps= 39 q=29.0 size= 273kB time=00:00:08.57 bitrate= 261.0kbits/
frame= 276 fps= 39 q=29.0 size= 316kB time=00:00:09.25 bitrate= 279.7kbits/
frame= 297 fps= 39 q=29.0 size= 346kB time=00:00:09.94 bitrate= 284.7kbits/
frame= 317 fps= 39 q=29.0 size= 369kB time=00:00:10.59 bitrate= 285.1kbits/
frame= 338 fps= 39 q=29.0 size= 394kB time=00:00:11.31 bitrate= 285.1kbits/
frame= 359 fps= 39 q=29.0 size= 418kB time=00:00:12.01 bitrate= 285.1kbits/
frame= 380 fps= 39 q=29.0 size= 443kB time=00:00:12.71 bitrate= 285.5kbits/
frame= 400 fps= 40 q=29.0 size= 478kB time=00:00:13.38 bitrate= 292.6kbits/
frame= 419 fps= 36 q=29.0 size= 521kB time=00:00:14.01 bitrate= 304.6kbits/
frame= 420 fps= 27 q=29.0 size= 522kB time=00:00:14.01 bitrate= 305.0kbits/
[OMIT]
frame=59126 fps= 36 q=29.0 size= 112603kB time=00:32:52.87 bitrate= 467.6kbits/
frame=59147 fps= 36 q=29.0 size= 112645kB time=00:32:53.56 bitrate= 467.6kbits/
frame=59167 fps= 36 q=29.0 size= 112691kB time=00:32:54.24 bitrate= 467.6kbits/
frame=59188 fps= 36 q=29.0 size= 112726kB time=00:32:54.93 bitrate= 467.6kbits/
frame=59210 fps= 36 q=29.0 size= 112759kB time=00:32:55.68 bitrate= 467.5kbits/
[OMIT]
frame=143603 fps= 31 q=29.0 size= 288092kB time=01:19:51.58 bitrate= 492.5kbits
frame=143619 fps= 31 q=29.0 size= 288144kB time=01:19:52.12 bitrate= 492.6kbits
frame=143631 fps= 31 q=29.0 size= 288182kB time=01:19:52.51 bitrate= 492.6kbits
frame=143643 fps= 31 q=29.0 size= 288221kB time=01:19:52.91 bitrate= 492.6kbits
frame=143653 fps= 31 q=29.0 size= 288267kB time=01:19:53.25 bitrate= 492.7kbits
[OMIT]
frame=195601 fps= 30 q=29.0 size= 397648kB time=01:48:46.58 bitrate= 499.1kbits
frame=195615 fps= 30 q=29.0 size= 397656kB time=01:48:47.04 bitrate= 499.1kbits
frame=195629 fps= 30 q=29.0 size= 397664kB time=01:48:47.51 bitrate= 499.1kbits
frame=195643 fps= 30 q=29.0 size= 397671kB time=01:48:47.97 bitrate= 499.0kbits
frame=195657 fps= 30 q=29.0 size= 397679kB time=01:48:48.46 bitrate= 499.0kbits
frame=195666 fps= 30 q=-1.0 Lsize= 404521kB time=01:48:48.85 bitrate= 507.6kbit
s/s
video:295696kB audio:102014kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.712657%
[libx264 @ 030c0820] frame I:922 Avg QP:18.04 size: 19199
[libx264 @ 030c0820] frame P:73499 Avg QP:21.38 size: 3150
[libx264 @ 030c0820] frame B:121245 Avg QP:22.87 size: 442
[libx264 @ 030c0820] consecutive B-frames: 13.5% 7.6% 11.8% 67.0%
[libx264 @ 030c0820] mb I I16..4: 24.1% 46.4% 29.5%
[libx264 @ 030c0820] mb P I16..4: 3.8% 3.9% 0.5% P16..4: 32.3% 10.4% 4.8%

0.0% 0.0% skip:44.3%

[libx264 @ 030c0820] mb B I16..4: 0.2% 0.1% 0.0% B16..8: 32.1% 2.1% 0.2%

direct: 0.9% skip:64.4% L0:50.9% L1:45.5% BI: 3.6%

[libx264 @ 030c0820] 8x8 transform intra:46.1% inter:46.9%
[libx264 @ 030c0820] coded y,uvDC,uvAC intra: 21.0% 36.1% 9.5% inter: 5.8% 7.1%
0.7%
[libx264 @ 030c0820] i16 v,h,dc,p: 32% 46% 11% 12%
[libx264 @ 030c0820] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 22% 47% 1% 1% 1% 2%

1% 2%

[libx264 @ 030c0820] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 30% 15% 3% 5% 5% 5%

4% 4%

[libx264 @ 030c0820] i8c dc,h,v,p: 59% 22% 17% 2%
[libx264 @ 030c0820] Weighted P-Frames: Y:4.4% UV:1.3%
[libx264 @ 030c0820] ref P L0: 74.9% 7.0% 13.9% 3.9% 0.3%
[libx264 @ 030c0820] ref B L0: 92.3% 6.7% 1.0%
[libx264 @ 030c0820] ref B L1: 95.8% 4.2%
[libx264 @ 030c0820] kb/s:371.03

comment:7 by Noitarud, 18 months ago

Resolution: invalid
Status: closedreopened

comment:8 by Michael Koch, 18 months ago

Resolution: invalid
Status: reopenedclosed

Please re-open this ticket if the issue can be reproduced with a more recent FFmpeg version, not older than a few weeks. Here is no support for a 9 years old version.

Note: See TracTickets for help on using tickets.