我需要从jpeg图像集合中制作动画。显示器给出的图像尺寸为1200x900。我可以通过转换来控制jpg图像的大小,但不确定它的大小是多少。我使用以下ffmpeg调用:
ffmpeg -f image2 -i img%04d.jpg -r 24 sound.avi
尽管有一连串警告,如
Past duration 0.879997 too large
生成了sound.avi,但动画包括黑色左右边距(参见第一帧的附加屏幕截图)
我需要压制。我的印象是jpg图像的4x3格式是标准的吗?我用
查看动画mplayer sound.avi
操作系统是Debian破坏者
进一步的实验表明,如果jpg文件的宽高比为16:9,则黑边距消失。这是唯一可能的AR吗?
的输出
ffmpeg -f image2 -i img%04d.jpg -vf cropdetect -vframes 5 -f null
@Gyan要求
ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Debian 7.3.0-15)
configuration: --prefix=/usr --extra-version=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
Trailing options were found on the commandline.
Input #0, image2, from 'img%04d.jpg':
Duration: 00:00:00.40, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1200x900 [SAR 150:150 DAR 4:3], 25 fps, 25 tbr, 25 tbn, 25 tbc