[FFmpeg-user] crop values are incorrect and seemingly random

acowbear jegstock at gmail.com
Thu Aug 16 20:36:40 EEST 2018


ffmpeg -y -i "vid.mkv" -filter:v "crop=620:250:0:0" -c:v libx264
"cropped.mp4"
results in cropped.mp4 size 620x244

ffmpeg -y -i "vid.mkv" -filter:v "crop=620:253:0:0" -c:v libx264
"cropped.mp4"
results in cropped.mp4 size 620x250

ffmpeg -y -i "vid.mkv" -filter:v "crop=620:260:0:0" -c:v libx264
"cropped.mp4"
results in cropped.mp4 size 620x248

Any ideas what is going on? The resulting sizes from my crop settings seem
pretty darn random to me...


below is the console output from my last test.  I am in windows 10.

ffmpeg version N-91618-gfe06ed22e6 Copyright (c) 2000-2018 the FFmpeg
developers
  built with gcc 8.2.1 (GCC) 20180813
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth
  libavutil      56. 19.100 / 56. 19.100
  libavcodec     58. 22.101 / 58. 22.101
  libavformat    58. 17.101 / 58. 17.101
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 26.100 /  7. 26.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Input #0, matroska,webm, from 'vid.mkv':
  Metadata:
    COMPATIBLE_BRANDS: qt
    MAJOR_BRAND     : qt
    MINOR_VERSION   : 537199360
    ENCODER         : Lavf58.17.101
  Duration: 00:00:06.01, start: 0.000000, bitrate: 94 kb/s
    Stream #0:0(eng): Video: h264 (High 4:2:2), yuv422p10le(progressive),
1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
(default)
    Metadata:
      HANDLER_NAME    : Apple Video Media Handler
      TIMECODE        : 00:03:31:21
      ENCODER         : Lavc58.22.101 libx264
      DURATION        : 00:00:06.006000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000001c0cc45aac0] using SAR=1/1
[libx264 @ 000001c0cc45aac0] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 000001c0cc45aac0] profile High 4:2:2, level 2.1, 4:2:2, 10-bit
[libx264 @ 000001c0cc45aac0] 264 - core 157 r2932 303c484 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2018 - 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=8
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=23 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=81 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'cropped.mp4':
  Metadata:
    COMPATIBLE_BRANDS: qt
    MAJOR_BRAND     : qt
    MINOR_VERSION   : 537199360
    encoder         : Lavf58.17.101
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661),
yuv422p10le, 620x260 [SAR 1:1 DAR 31:13], q=-1--1, 0.04 fps, 24k tbn, 23.98
tbc (default)
    Metadata:
      HANDLER_NAME    : Apple Video Media Handler
      TIMECODE        : 00:03:31:21
      DURATION        : 00:00:06.006000000
      encoder         : Lavc58.22.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  128 fps=0.0 q=40.0 size=       0kB time=00:00:03.04 bitrate=  
0.1kbits/frame=  144 fps=0.0 q=-1.0 Lsize=      54kB time=00:00:05.88
bitrate=  75.6kbits/s speed= 9.1x
video:51kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 5.567053%
[libx264 @ 000001c0cc45aac0] frame I:1     Avg QP:29.15  size:  9425
[libx264 @ 000001c0cc45aac0] frame P:53    Avg QP:30.17  size:   717
[libx264 @ 000001c0cc45aac0] frame B:90    Avg QP:37.48  size:    51
[libx264 @ 000001c0cc45aac0] consecutive B-frames: 13.2%  9.7%  2.1% 75.0%
[libx264 @ 000001c0cc45aac0] mb I  I16..4:  7.4% 58.4% 34.2%
[libx264 @ 000001c0cc45aac0] mb P  I16..4:  0.7%  0.5%  0.1%  P16..4: 15.5% 
3.5%  3.0%  0.0%  0.0%    skip:76.7%
[libx264 @ 000001c0cc45aac0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  4.1% 
0.0%  0.0%  direct: 0.1%  skip:95.8%  L0:47.2% L1:51.8% BI: 1.1%
[libx264 @ 000001c0cc45aac0] 8x8 transform intra:50.0% inter:73.3%
[libx264 @ 000001c0cc45aac0] coded y,uvDC,uvAC intra: 49.7% 70.3% 35.1%
inter: 4.3% 2.4% 0.1%
[libx264 @ 000001c0cc45aac0] i16 v,h,dc,p: 44% 17% 11% 27%
[libx264 @ 000001c0cc45aac0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 14% 38%  3% 
2%  2%  3%  3%  3%
[libx264 @ 000001c0cc45aac0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 47% 20% 12%  1% 
3%  4%  4%  4%  4%
[libx264 @ 000001c0cc45aac0] i8c dc,h,v,p: 75%  7% 12%  6%
[libx264 @ 000001c0cc45aac0] Weighted P-Frames: Y:17.0% UV:5.7%
[libx264 @ 000001c0cc45aac0] ref P L0: 90.3%  7.4%  2.3%  0.1%
[libx264 @ 000001c0cc45aac0] ref B L0: 82.5% 14.5%  3.0%
[libx264 @ 000001c0cc45aac0] ref B L1: 94.3%  5.7%
[libx264 @ 000001c0cc45aac0] kb/s:69.23





--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list