我有一个 886x1920 的视频,正如我从 ffmpeg 输出中看到的那样:
ffmpeg -i en_scaled_2.mp4
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.62)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'en_scaled_2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:00:29.03, start: 0.000000, bitrate: 2073 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 886x1920 [SAR 1:1 DAR 443:960], 1936 kb/s, SAR 9991:9992 DAR 281:609, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
但是 macOS Finder 的预览报告 885x1920:
Apple AppStore connect 报告说它的高度也不是 886 像素:
为什么?如何解决?
// 注意:原始视频是 885x1920,但我通过将其与 886x1920 透明图像叠加在底部,并在底部添加了 1px,并且底部有一条 1px 高的非透明线:
ffmpeg -i en_scaled.mp4 -i Artboard.png -filter_complex "overlay" -y en_scaled_2.mp4
答案1
使用垫式过滤器:
ffmpeg -i input.mp4 -vf pad=886:ih -c:a copy output.mp4
- 覆盖将使输出具有底层的大小并且将排除任何重叠。
- 我必须查看你的命令的完整日志才能知道它最终是如何变成 886 的。