我在创建 mpeg 文件时遇到问题,我有 2 个位图(2592*2160 32 位)。我正在尝试将它们组合成一个 mpeg 文件,但我无法让它工作,我尝试过的命令是:
ffmpeg -i %d.bmp -b:v 99.99M -r 1 -s 2592x2160 vid.mpg
输出是
ffmpeg -i %d.bmp -b:v 99.99M -r 1 -s 2592x2160 vid.mpg
ffmpeg version N-41416-g718607b Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 8 2012 12:46:19 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass
--enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libope
njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libth
eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --ena libavutil 51. 56.100 / 51. 56.100
libavcodec 54. 25.100 / 54. 25.100
libavformat 54. 6.101 / 54. 6.101
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 78.101 / 2. 78.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[image2 @ 01e6be40] Stream #0: not enough frames to estimate rate; consider incr
easing probesize
Input #0, image2, from '%d.bmp':
Duration: 00:00:00.08, start: 0.000000, bitrate: N/A
Stream #0:0: Video: bmp, pal8, 2592x2160, 25 tbr, 25 tbn, 25 tbc
File 'vid.mpg' already exists. Overwrite ? [y/N] y
w:2592 h:2160 pixfmt:pal8 tb:1/25 sar:0/1 sws_param:flags=2
[ffmpeg_buffersink @ 02bb3ce0] No opaque field provided
[scale @ 02bb3f20] w:2592 h:2160 fmt:pal8 sar:0/1 -> w:2592 h:2160 fmt:yuv420p s
ar:0/1 flags:0x4
[mpeg1video @ 02b864a0] bitrate tolerance too small for bitrate
Output #0, mpeg, to 'vid.mpg':
Stream #0:0: Video: mpeg1video, yuv420p, 2592x2160, q=2-31, 99990 kb/s, 90k
tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (bmp -> mpeg1video)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters
such as bit_rate, rate, width or height
如果我省略 -r 参数(ffmpeg -i %d.bmp -b:v 99.99M -s 2592x2160 vid.mpg),输出将变为:
[mpeg @ 02f80120] buffer underflow i=0 bufi=749380 size=950639
[mpeg @ 02f80120] buffer underflow i=0 bufi=751421 size=950639
[mpeg @ 02f80120] packet too large, ignoring buffer limits to mux it
[mpeg @ 02f80120] buffer underflow i=0 bufi=751421 size=950639
[mpeg @ 02f80120] buffer underflow i=0 bufi=753462 size=950639
[mpeg @ 02f80120] packet too large, ignoring buffer limits to mux it
[mpeg @ 02f80120] buffer underflow i=0 bufi=753462 size=950639
[mpeg @ 02f80120] buffer underflow i=0 bufi=755503 size=950639
...
我究竟做错了什么?