ffmpeg transfer 1080p to 720p h264 mp4
https://www.bugcodemaster.com/article/changing-resolution-video-using-ffmpeg
./ffmpeg -i sample_outdoor_car_1080p_10fps.h264 -vf scale=1280:720 sample_outdoor_car_720p_10fps.h264
Convert 640x480 mp4 to 1280x960 mp4
$ ffmpeg -i subject_001.mp4 -vf scale=1280:960 1280_960_subject_001.mp4
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --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 'subject_001.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:00:46.47, start: 0.000000, bitrate: 47346 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 640x480, 47345 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x562404724380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x562404724380] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit
[libx264 @ 0x562404724380] 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=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=18 lookahead_threads=3 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 '1280_960_subject_001.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1280x960, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 1394 fps=115 q=-1.0 Lsize= 2133kB time=00:00:46.36 bitrate= 376.9kbits/s speed=3.81x
video:2116kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.810717%
[libx264 @ 0x562404724380] frame I:6 Avg QP:20.42 size: 65817
[libx264 @ 0x562404724380] frame P:351 Avg QP:22.34 size: 3772
[libx264 @ 0x562404724380] frame B:1037 Avg QP:14.98 size: 431
[libx264 @ 0x562404724380] consecutive B-frames: 0.8% 0.0% 0.2% 99.0%
[libx264 @ 0x562404724380] mb I I16..4: 41.3% 0.0% 58.7%
[libx264 @ 0x562404724380] mb P I16..4: 0.3% 0.0% 0.0% P16..4: 19.8% 3.6% 2.4% 0.0% 0.0% skip:73.8%
[libx264 @ 0x562404724380] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 10.2% 0.0% 0.0% direct: 0.0% skip:89.7% L0:27.4% L1:72.4% BI: 0.1%
[libx264 @ 0x562404724380] coded y,u,v intra: 45.8% 24.9% 30.9% inter: 0.7% 0.2% 0.4%
[libx264 @ 0x562404724380] i16 v,h,dc,p: 26% 33% 16% 25%
[libx264 @ 0x562404724380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 25% 13% 5% 9% 8% 6% 4% 5%
[libx264 @ 0x562404724380] Weighted P-Frames: Y:0.6% UV:0.6%
[libx264 @ 0x562404724380] ref P L0: 57.8% 8.2% 24.5% 9.5% 0.0%
[libx264 @ 0x562404724380] ref B L0: 75.2% 21.2% 3.5%
[libx264 @ 0x562404724380] ref B L1: 96.6% 3.4%
[libx264 @ 0x562404724380] kb/s:372.94