$ ffmpeg -i orig.mp4 -c:v libx264 -c:a aac -s 432x768 new.mp4 ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu3) configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'orig.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2019-02-13T02:51:28.000000Z Duration: 00:00:04.37, start: 0.000000, bitrate: 1981 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 1080x1920 [SAR 1:1 DAR 9:16], 1878 kb/s, 29.32 fps, 29.33 tbr, 90k tbn, 58.64 tbc (default) Metadata: creation_time : 2019-02-13T03:15:53.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/12/2019. Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2019-02-13T03:15:53.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/12/2019. Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 0x55f4bc9aaf20] using SAR=1/1 [libx264 @ 0x55f4bc9aaf20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x55f4bc9aaf20] profile High, level 3.0 [libx264 @ 0x55f4bc9aaf20] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 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=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 'new.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Lavf57.83.100 Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 432x768 [SAR 1:1 DAR 9:16], q=-1--1, 29.33 fps, 11264 tbn, 29.33 tbc (default) Metadata: creation_time : 2019-02-13T03:15:53.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/12/2019. encoder : Lavc57.107.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2019-02-13T03:15:53.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 02/12/2019. encoder : Lavc57.107.100 aac frame= 63 fps=0.0 q=29.0 size= 0kB time=00:00:01.90 bitrate= 0.2kbits/s speed=3.79x frame= 108 fps=107 q=29.0 size= 0kB time=00:00:03.36 bitrate= 0.1kbits/s speed=3.34x frame= 126 fps= 80 q=-1.0 Lsize= 351kB time=00:00:04.36 bitrate= 658.2kbits/s speed=2.75x video:277kB audio:68kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.716501% [libx264 @ 0x55f4bc9aaf20] frame I:1 Avg QP:22.73 size: 20946 [libx264 @ 0x55f4bc9aaf20] frame P:33 Avg QP:23.57 size: 5625 [libx264 @ 0x55f4bc9aaf20] frame B:92 Avg QP:28.32 size: 830 [libx264 @ 0x55f4bc9aaf20] consecutive B-frames: 0.8% 4.8% 2.4% 92.1% [libx264 @ 0x55f4bc9aaf20] mb I I16..4: 9.8% 66.0% 24.2% [libx264 @ 0x55f4bc9aaf20] mb P I16..4: 1.4% 3.6% 0.7% P16..4: 47.5% 17.7% 9.6% 0.0% 0.0% skip:19.6% [libx264 @ 0x55f4bc9aaf20] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 40.4% 1.6% 0.2% direct: 0.4% skip:57.3% L0:47.0% L1:50.8% BI: 2.3% [libx264 @ 0x55f4bc9aaf20] 8x8 transform intra:63.9% inter:72.7% [libx264 @ 0x55f4bc9aaf20] coded y,uvDC,uvAC intra: 61.0% 49.2% 8.4% inter: 9.5% 8.7% 0.0% [libx264 @ 0x55f4bc9aaf20] i16 v,h,dc,p: 8% 24% 4% 63% [libx264 @ 0x55f4bc9aaf20] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 21% 15% 6% 7% 7% 11% 10% 6% [libx264 @ 0x55f4bc9aaf20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 26% 10% 5% 9% 6% 15% 8% 5% [libx264 @ 0x55f4bc9aaf20] i8c dc,h,v,p: 59% 21% 16% 4% [libx264 @ 0x55f4bc9aaf20] Weighted P-Frames: Y:12.1% UV:9.1% [libx264 @ 0x55f4bc9aaf20] ref P L0: 69.8% 12.1% 13.8% 4.1% 0.2% [libx264 @ 0x55f4bc9aaf20] ref B L0: 93.5% 5.6% 1.0% [libx264 @ 0x55f4bc9aaf20] ref B L1: 97.0% 3.0% [libx264 @ 0x55f4bc9aaf20] kb/s:526.90 [aac @ 0x55f4bc9a88e0] Qavg: 21152.828