ffmeg不会将所有帧转换为视频

时间:2018-01-12 04:12:03

标签: video ffmpeg frame

我总共有7帧,并尝试将它们转换为幻灯片视频。但无论我尝试使用ffmeg,我总是只有3帧,这是我的代码 ffmpeg -f image2 -i gif%01d.png -vframes 7 test.mp4

图像序列为gif0.png gif1.png .. gif6.png。我希望所有这些都出现在视频中,但不幸的是,我总是在视频中有前3个图像。你能给出一个提示将所有帧转换成视频吗?  日志文件

 [zgrey@skyler:Zelda]$ ffmpeg -f image2 -i gif%01d.png -vframes 7 test.mp4
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, image2, from 'gif%01d.png':
  Duration: 00:00:00.28, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, pal8(pc), 736x727 [SAR 72:72 DAR 736:727], 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'test.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x3a9fee0] using SAR=1/1
[libx264 @ 0x3a9fee0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x3a9fee0] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
[libx264 @ 0x3a9fee0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=4 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 'test.mp4':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 736x727 [SAR 1:1 DAR 736:727], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.89.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=    7 fps=0.0 q=-1.0 Lsize=     107kB time=00:00:00.16 bitrate=5496.7kbits/s speed=0.264x    
video:106kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.860164%
[libx264 @ 0x3a9fee0] frame I:1     Avg QP:24.11  size: 77212
[libx264 @ 0x3a9fee0] frame P:2     Avg QP:30.73  size:  6544
[libx264 @ 0x3a9fee0] frame B:4     Avg QP:32.11  size:  4516
[libx264 @ 0x3a9fee0] consecutive B-frames: 14.3% 28.6%  0.0% 57.1%
[libx264 @ 0x3a9fee0] mb I  I16..4:  5.2% 63.8% 31.0%
[libx264 @ 0x3a9fee0] mb P  I16..4:  0.4%  2.3%  5.6%  P16..4:  5.3%  0.5%  0.1%  0.0%  0.0%    skip:85.8%
[libx264 @ 0x3a9fee0] mb B  I16..4:  0.2%  0.3%  3.8%  B16..8:  5.5%  0.3%  0.1%  direct: 0.1%  skip:89.6%  L0:47.4% L1:52.3% BI: 0.3%
[libx264 @ 0x3a9fee0] 8x8 transform intra:52.1% inter:31.9%
[libx264 @ 0x3a9fee0] coded y,u,v intra: 81.0% 45.2% 41.2% inter: 0.6% 0.5% 0.4%
[libx264 @ 0x3a9fee0] i16 v,h,dc,p: 18% 30% 43%  9%
[libx264 @ 0x3a9fee0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 19% 36%  5%  5%  5%  7%  5%  7%
[libx264 @ 0x3a9fee0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 26% 16%  6%  6%  5%  7%  4%  6%
[libx264 @ 0x3a9fee0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x3a9fee0] ref P L0: 32.6%  5.7% 45.0% 16.7%
[libx264 @ 0x3a9fee0] ref B L0: 78.1% 21.9%
[libx264 @ 0x3a9fee0] ref B L1: 96.7%  3.3%
[libx264 @ 0x3a9fee0] kb/s:3096.03

0 个答案:

没有答案
相关问题