[FFmpeg-trac] #5726(avfilter:new): zoompan filter outputs shaky vidoe
FFmpeg
trac at avcodec.org
Wed Jul 20 17:04:53 EEST 2016
#5726: zoompan filter outputs shaky vidoe
----------------------------------+---------------------------------------
Reporter: jammy | Type: defect
Status: new | Priority: normal
Component: avfilter | Version: unspecified
Keywords: zoompan | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+---------------------------------------
Adding a zoompan filter to an image with no panning works smoothly,
however when panning the zoom to the center of the image, the result is a
video with a shaky image.
I have used the same filter example as shown in the [https://ffmpeg.org
/ffmpeg-all.html#Examples-123 zoompan filter documentation].
This is the command line:
{{{
ffmpeg -y \
-i img.jpg \
-filter_complex
"zoompan=z='min(zoom+0.0015,1.5)':d=125:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'"
\
-vcodec libx264 -pix_fmt yuv420p -r 25 -t 5 out.mp4
}}}
Below is the console output. I have also attached the full console output,
input image and the output video.
{{{
ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.1) 20160609
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree
--enable-postproc --enable-version3 --enable-x11grab --enable-shared
--enable-libvpx --enable-pic --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, image2, from 'img.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 28100 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
1024x640 [SAR 72:72 DAR 8:5], 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0x109f380] deprecated pixel format used, make sure you did set
range correctly
[libx264 @ 0x1083e00] using SAR=1/1
[libx264 @ 0x1083e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x1083e00] profile High, level 3.1
[libx264 @ 0x1083e00] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2015 - 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
[mp4 @ 0x1081ae0] Using AVStream.codec to pass codec parameters to muxers
is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf57.41.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.48.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 (mjpeg) -> zoompan
zoompan -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[swscaler @ 0x172e040] Warning: data is not aligned! This can lead to a
speedloss
frame= 125 fps= 91 q=-1.0 Lsize= 642kB time=00:00:04.88
bitrate=1077.5kbits/s speed=3.55x
video:640kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.356806%
[libx264 @ 0x1083e00] frame I:1 Avg QP:20.29 size:121874
[libx264 @ 0x1083e00] frame P:31 Avg QP:20.53 size: 13035
[libx264 @ 0x1083e00] frame B:93 Avg QP:26.16 size: 1380
[libx264 @ 0x1083e00] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x1083e00] mb I I16..4: 8.7% 75.8% 15.6%
[libx264 @ 0x1083e00] mb P I16..4: 0.1% 0.1% 0.0% P16..4: 45.1% 11.9%
8.7% 0.0% 0.0% skip:34.1%
[libx264 @ 0x1083e00] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 34.5% 0.4%
0.1% direct: 0.3% skip:64.7% L0:48.9% L1:49.3% BI: 1.9%
[libx264 @ 0x1083e00] 8x8 transform intra:73.4% inter:78.3%
[libx264 @ 0x1083e00] coded y,uvDC,uvAC intra: 74.2% 87.0% 68.3% inter:
4.7% 11.5% 3.8%
[libx264 @ 0x1083e00] i16 v,h,dc,p: 4% 42% 5% 49%
[libx264 @ 0x1083e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 28% 15% 5% 9%
6% 12% 5% 10%
[libx264 @ 0x1083e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 22% 10% 7% 12%
8% 12% 7% 9%
[libx264 @ 0x1083e00] i8c dc,h,v,p: 43% 33% 10% 14%
[libx264 @ 0x1083e00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1083e00] ref P L0: 61.6% 7.9% 12.2% 18.2%
[libx264 @ 0x1083e00] ref B L0: 79.5% 16.7% 3.8%
[libx264 @ 0x1083e00] ref B L1: 91.0% 9.0%
[libx264 @ 0x1083e00] kb/s:1046.86
}}}
I also receive this warning in the console output.
{{{[swscaler @ 0x172e040] Warning: data is not aligned! This can lead to a
speedloss}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5726>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list