[FFmpeg-user] Flutter FFmpeg

cowlol cowlol at outlook.com
Wed Apr 15 21:14:20 EEST 2020


Thank you for the reply.

I uploaded the compressed file to firebase, downloaded it and ran the
following command on my mac. 

The original file is 20.6 and the compressed version (Done by the flutter
picker) is 3.5mb. They both look pretty similar in terms of quality. 

When i run the following on the compressed file

./ffmpeg -noautorotate -i input1.mp4 -movflags +faststart -vcodec h264 -crf
18 -preset:v veryfast output.mp4

I get an output file that is 5.4mb 2mb larger. 

Here are the logs..

ffmpeg version N-97344-g51db0a472a-tessus  https://evermeet.cx/ffmpeg/ 
Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
--enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
--enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenh264 --enable-libopenjpeg --enable-libopus
--enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq
--enable-libzvbi --enable-version3 --pkg-config-flags=--static
--disable-ffplay
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input1.mp4':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2020-04-15T17:26:57.000000Z
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: iPhone SE
    com.apple.quicktime.software: 13.4
    com.apple.quicktime.creationdate: 2020-04-15T18:23:58+0100
  Duration: 00:00:10.54, start: 0.000000, bitrate: 2674 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono,
fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2020-04-15T17:26:57.000000Z
      handler_name    : Core Media Audio
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1280x720, 2575 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc
(default)
    Metadata:
      rotate          : 90
      creation_time   : 2020-04-15T17:26:57.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
    Side data:
      displaymatrix: rotation of -90.00 degrees
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7fa4c3009400] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fa4c3009400] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7fa4c3009400] 264 - core 160 r3000 33f9e14 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options:
cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
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=1 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=18.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     : qt  
    minor_version   : 0
    compatible_brands: qt  
    com.apple.quicktime.creationdate: 2020-04-15T18:23:58+0100
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: iPhone SE
    com.apple.quicktime.software: 13.4
    encoder         : Lavf58.42.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
1280x720, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      encoder         : Lavc58.78.102 libx264
      creation_time   : 2020-04-15T17:26:57.000000Z
      handler_name    : Core Media Video
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono,
fltp, 69 kb/s (default)
    Metadata:
      creation_time   : 2020-04-15T17:26:57.000000Z
      handler_name    : Core Media Audio
      encoder         : Lavc58.78.102 aac
frame=   36 fps=0.0 q=24.0 size=     256kB time=00:00:02.29 bitrate=
912.5kbits/frame=   66 fps= 64 q=24.0 size=     768kB time=00:00:03.27
bitrate=1921.8kbits/frame=   87 fps= 57 q=24.0 size=    1024kB
time=00:00:03.99 bitrate=2100.5kbits/frame=  113 fps= 55 q=24.0 size=   
1280kB time=00:00:04.85 bitrate=2160.8kbits/frame=  141 fps= 55 q=24.0 size=   
1792kB time=00:00:05.78 bitrate=2539.1kbits/frame=  167 fps= 54 q=24.0 size=   
2304kB time=00:00:06.66 bitrate=2832.3kbits/frame=  200 fps= 56 q=24.0 size=   
2816kB time=00:00:07.75 bitrate=2974.6kbits/frame=  231 fps= 56 q=24.0 size=   
3328kB time=00:00:08.80 bitrate=3098.0kbits/frame=  265 fps= 57 q=24.0 size=   
3840kB time=00:00:09.93 bitrate=3165.3kbits/frame=  298 fps= 58 q=24.0 size=   
4352kB time=00:00:10.49 bitrate=3396.9kbits/[mp4 @ 0x7fa4c3008200] Starting
second pass: moving the moov atom to the beginning of the file
frame=  316 fps= 55 q=-1.0 Lsize=    5092kB time=00:00:10.54
bitrate=3956.9kbits/s speed=1.82x    
video:4989kB audio:90kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.246439%
[libx264 @ 0x7fa4c3009400] frame I:2     Avg QP:17.88  size: 81706
[libx264 @ 0x7fa4c3009400] frame P:139   Avg QP:18.57  size: 26972
[libx264 @ 0x7fa4c3009400] frame B:175   Avg QP:21.15  size:  6833
[libx264 @ 0x7fa4c3009400] consecutive B-frames:  1.3% 74.7%  0.0% 24.1%
[libx264 @ 0x7fa4c3009400] mb I  I16..4:  0.7% 21.0% 78.3%
[libx264 @ 0x7fa4c3009400] mb P  I16..4:  0.6% 12.2%  3.9%  P16..4: 47.2%
18.6% 13.5%  0.0%  0.0%    skip: 4.0%
[libx264 @ 0x7fa4c3009400] mb B  I16..4:  0.3%  1.8%  0.2%  B16..8: 18.3% 
5.5%  0.5%  direct:18.7%  skip:54.7%  L0:33.0% L1:49.9% BI:17.1%
[libx264 @ 0x7fa4c3009400] 8x8 transform intra:70.5% inter:48.8%
[libx264 @ 0x7fa4c3009400] coded y,uvDC,uvAC intra: 91.7% 47.7% 3.3% inter:
25.6% 8.7% 0.2%
[libx264 @ 0x7fa4c3009400] i16 v,h,dc,p: 11%  7% 62% 19%
[libx264 @ 0x7fa4c3009400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 10% 21%  3%
22% 13% 11%  4%  5%
[libx264 @ 0x7fa4c3009400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 12% 18%  5%
21% 12% 10%  4%  4%
[libx264 @ 0x7fa4c3009400] i8c dc,h,v,p: 52% 23% 21%  5%
[libx264 @ 0x7fa4c3009400] Weighted P-Frames: Y:1.4% UV:0.0%
[libx264 @ 0x7fa4c3009400] kb/s:3875.88
[aac @ 0x7fa4c300ac00] Qavg: 212.621

I will attach both the input file and the output file. Could you help me
make sure that the file size decreases. 

input1.mp4 <http://www.ffmpeg-archive.org/file/t379484/input1.mp4>  
output.mp4 <http://www.ffmpeg-archive.org/file/t379484/output.mp4>  




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


More information about the ffmpeg-user mailing list