ffmpeg不会从图像生成视频

时间:2017-07-06 09:41:18

标签: video ffmpeg

我正在尝试使用ffmpeg从jpeg图像创建视频。生成的视频应为x264或x265格式。

我有一个包含36张图片的目录。每个图像大小约为6000万像素。它们的名称如下:

  • frame00000.jpg
  • frame00001.jps
  • frame00002.jpg
  • ....
  • frame00035.jpg

我在SO中阅读了文档和几个帖子,我来写一个批处理文件来调用ffmpeg,如下所示:

 ffmpeg.exe -r 1/5 -start_number 0 -i %1\frame%%05d.jpg -c:v libx264 -vf "fps=1,format=yuv420p" out1.mp4

当我运行此命令时,我从ffmpeg获取此输出,这很奇怪:

C:\Users\m\Desktop\ffmpeg-20170702-c885356-win64-static\bin>ffmpeg.exe -r 1/5 -start_number 0 -i "C:\Resized"\frame%05d.jpg -c:v libx264 -vf "fps=1,format=yuv420p" out1.mp4
ffmpeg version N-86691-gc885356 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.1.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 67.100 / 55. 67.100
  libavcodec     57.100.103 / 57.100.103
  libavformat    57. 75.100 / 57. 75.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 94.100 /  6. 94.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, image2, from 'C:\Resized\frame%05d.jpg':
  Duration: 00:00:01.44, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 11000x5500 [SAR 1:1 DAR 2:1], 25 tbr, 25 tbn, 25 tbc
File 'out1.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 00000000006662e0] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 000000000017b220] using SAR=1/1
[libx264 @ 000000000017b220] frame MB size (688x344) > level limit (139264)
[libx264 @ 000000000017b220] DPB size (4 frames, 946688 mbs) > level limit (2 frames, 696320 mbs)
[libx264 @ 000000000017b220] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000000000017b220] profile High, level 6.2
[libx264 @ 000000000017b220] 264 - core 152 r2851 ba24899 - 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=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=-2 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=1 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 'out1.mp4':
  Metadata:
    encoder         : Lavf57.75.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 11000x5500 [SAR 1:1 DAR 2:1], q=-1--1, 1 fps, 16384 tbn, 1 tbc
    Metadata:
      encoder         : Lavc57.100.103 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    1 fps=0.9 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    2 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    3 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    4 fps=1.3 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    5 fps=1.4 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    5 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    6 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    7 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    8 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=    9 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   10 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   10 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   11 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   13 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   14 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   15 fps=1.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   15 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   16 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   17 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   18 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   19 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   20 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   20 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   21 fps=1.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   22 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   23 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   24 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   25 fps=1.1 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   frame=   25 fps=0.5 q=0.0 size=   55040kB time=00:00:00.00 bitrate=N/A speed=   frame=   26 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   27 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   28 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   29 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   30 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   31 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   32 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   34 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   35 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   35 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   36 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   37 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   39 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   40 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   40 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   41 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   43 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   44 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   45 fps=0.1 q=0.0 size=   55296kB time=00:00:00.00 bitrate=N/A speed=   frame=   46 fps=0.1 q=0.0 size=   77568kB time=00:00:00.00 bitrate=N/A speed=   frame=   47 fps=0.0 q=0.0 size=   77824kB time=00:00:00.00 bitrate=N/A speed=   frame=   48 fps=0.0 q=0.0 size=   77824kB time=00:00:00.00 bitrate=N/A speed=   frame=   49 fps=0.0 q=0.0 size=   77824kB time=00:00:00.00 bitrate=N/A speed=   frame=   50 fps=0.0 q=0.0 size=   77824kB time=00:00:00.00 bitrate=N/A speed=   frame=   50 fps=0.0 q=0.0 size=   77824kB time=00:00:00.00 bitrate=N/A speed=   frame=   51 fps=0.0 q=17.0 size=    8448kB time=-00:00:01.99 bitrate=N/A speed=Nframe=   52 fps=0.0 q=17.0 size=    8448kB time=-00:00:00.99 bitrate=N/A speed=Nframe=   53 fps=0.0 q=17.0 size=    8448kB time=00:00:00.00 bitrate=1134531147.5frame=   54 fps=0.0 q=17.0 size=    8448kB time=00:00:01.00 bitrate=69202.2kbitsframe=   55 fps=0.0 q=17.0 size=    8448kB time=00:00:02.00 bitrate=34602.1kbitsframe=   55 fps=0.0 q=17.0 size=    8448kB time=00:00:02.00 bitrate=34602.1kbitsframe=   56 fps=0.0 q=17.0 size=   14848kB time=00:00:03.00 bitrate=40544.2kbitsframe=   57 fps=0.0 q=17.0 size=   14848kB time=00:00:04.00 bitrate=30408.3kbitsframe=   58 fps=0.0 q=17.0 size=   14848kB time=00:00:05.00 bitrate=24326.7kbitsframe=   59 fps=0.0 q=17.0 size=   14848kB time=00:00:06.00 bitrate=20272.3kbitsframe=   60 fps=0.0 q=17.0 size=   22016kB time=00:00:07.00 bitrate=25764.8kbitsframe=   60 fps=0.0 q=17.0 size=   22016kB time=00:00:07.00 bitrate=25764.8kbitsframe=   61 fps=0.0 q=17.0 size=   22016kB time=00:00:08.00 bitrate=22544.3kbitsframe=   62 fps=0.0 q=17.0 size=   22016kB time=00:00:09.00 bitrate=20039.4kbitsframe=   63 fps=0.0 q=17.0 size=   22016kB time=00:00:10.00 bitrate=18035.4kbitsframe=   64 fps=0.0 q=17.0 size=   29696kB time=00:00:11.00 bitrate=22115.3kbitsframe=   65 fps=0.0 q=17.0 size=   29696kB time=00:00:12.00 bitrate=20272.4kbitsframe=   65 fps=0.0 q=17.0 size=   29696kB time=00:00:12.00 bitrate=20272.4kbitsframe=   66 fps=0.0 q=17.0 size=   29696kB time=00:00:13.00 bitrate=18713.0kbitsframe=   67 fps=0.0 q=17.0 size=   29696kB time=00:00:14.00 bitrate=17376.4kbitsframe=   68 fps=0.0 q=17.0 size=   37376kB time=00:00:15.00 bitrate=20412.2kbitsframe=   69 fps=0.0 q=17.0 size=   37376kB time=00:00:16.00 bitrate=19136.5kbitsframe=   70 fps=0.0 q=17.0 size=   37376kB time=00:00:17.00 bitrate=18010.8kbitsframe=   70 fps=0.0 q=17.0 size=   37376kB time=00:00:17.00 bitrate=18010.8kbitsframe=   71 fps=0.0 q=17.0 size=   37376kB time=00:00:18.00 bitrate=17010.2kbitsframe=   72 fps=0.0 q=17.0 size=   37376kB time=00:00:19.00 bitrate=16114.9kbitsframe=   73 fps=0.0 q=17.0 size=   37376kB time=00:00:20.00 bitrate=15309.2kbitsframe=   74 fps=0.0 q=17.0 size=   37376kB time=00:00:21.00 bitrate=14580.2kbitsframe=   75 fps=0.0 q=17.0 size=   37376kB time=00:00:22.00 bitrate=13917.4kbitsframe=   75 fps=0.0 q=17.0 size=   37376kB time=00:00:22.00 bitrate=13917.4kbitsframe=   76 fps=0.0 q=17.0 size=   44032kB time=00:00:23.00 bitrate=15683.0kbitsframe=   77 fps=0.0 q=17.0 size=   44032kB time=00:00:24.00 bitrate=15029.6kbitsframe=   78 fps=0.0 q=17.0 size=   44032kB time=00:00:25.00 bitrate=14428.4kbitsframe=   79 fps=0.0 q=17.0 size=   44032kB time=00:00:26.00 bitrate=13873.4kbitsframe=   80 fps=0.0 q=17.0 size=   50944kB time=00:00:27.00 bitrate=15456.8kbitsframe=   80 fps=0.0 q=17.0 size=   50944kB time=00:00:27.00 bitrate=15456.8kbitsframe=   81 fps=0.0 q=17.0 size=   50944kB time=00:00:28.00 bitrate=14904.7kbitsframe=   82 fps=0.0 q=17.0 size=   50944kB time=00:00:29.00 bitrate=14390.8kbitsframe=   83 fps=0.0 q=17.0 size=   50944kB time=00:00:30.00 bitrate=13911.1kbitsframe=   84 fps=0.0 q=17.0 size=   58368kB time=00:00:31.00 bitrate=15424.2kbitsframe=   85 fps=0.0 q=17.0 size=   58368kB time=00:00:32.00 bitrate=14942.2kbitsframe=   85 fps=0.0 q=17.0 size=   58368kB time=00:00:32.00 bitrate=14942.2kbitsframe=   86 fps=0.0 q=17.0 size=   58368kB time=00:00:33.00 bitrate=14489.4kbitsframe=   87 fps=0.0 q=17.0 size=   58368kB time=00:00:34.00 bitrate=14063.2kbitsframe=   88 fps=0.0 q=17.0 size=   66048kB time=00:00:35.00 bitrate=15459.0kbitsframe=   89 fps=0.0 q=17.0 size=   66048kB time=00:00:36.00 bitrate=15029.6kbitsframe=   90 fps=0.0 q=17.0 size=   66048kB time=00:00:37.00 bitrate=14623.4kbitsframe=   90 fps=0.0 q=17.0 size=   66048kB time=00:00:37.00 bitrate=14623.4kbitsframe=   91 fps=0.0 q=17.0 size=   66048kB time=00:00:38.00 bitrate=14238.5kbitsframe=   92 fps=0.0 q=17.0 size=   66048kB time=00:00:39.00 bitrate=13873.5kbitsframe=   93 fps=0.0 q=17.0 size=   66048kB time=00:00:40.00 bitrate=13526.6kbitsframe=   94 fps=0.0 q=17.0 size=   66048kB time=00:00:41.00 bitrate=13196.7kbitsframe=   95 fps=0.0 q=17.0 size=   66048kB time=00:00:42.00 bitrate=12882.5kbitsframe=   95 fps=0.0 q=17.0 size=   66048kB time=00:00:42.00 bitrate=12882.5kbitsframe=   96 fps=0.0 q=17.0 size=   72448kB time=00:00:43.00 bitrate=13802.2kbitsframe=   97 fps=0.0 q=17.0 size=   72448kB time=00:00:44.00 bitrate=13488.5kbitsframe=   99 fps=0.0 q=17.0 size=   72448kB time=00:00:46.00 bitrate=12902.0kbitsframe=  100 fps=0.0 q=17.0 size=   79360kB time=00:00:47.00 bitrate=13832.3kbitsframe=  100 fps=0.0 q=17.0 size=   79360kB time=00:00:47.00 bitrate=13832.3kbitsframe=  101 fps=0.0 q=17.0 size=   79360kB time=00:00:48.00 bitrate=13544.1kbitsframe=  103 fps=0.0 q=17.0 size=   79360kB time=00:00:50.00 bitrate=13002.3kbitsframe=  104 fps=0.0 q=17.0 size=   86528kB time=00:00:51.00 bitrate=13898.8kbitsframe=  105 fps=0.0 q=17.0 size=   86528kB time=00:00:52.00 bitrate=13631.5kbitsframe=  105 fps=0.0 q=17.0 size=   86528kB time=00:00:52.00 bitrate=13631.5kbitsframe=  106 fps=0.0 q=17.0 size=   86528kB time=00:00:53.00 bitrate=13374.3kbitsframe=  107 fps=0.0 q=17.0 size=   86528kB time=00:00:54.00 bitrate=13126.6kbitsframe=  108 fps=0.0 q=17.0 size=   94208kB time=00:00:55.00 bitrate=14031.8kbitsframe=  109 fps=0.0 q=17.0 size=   94208kB time=00:00:56.00 bitrate=13781.3kbitsframe=  110 fps=0.0 q=17.0 size=   94208kB time=00:00:57.00 bitrate=13539.5kbitsframe=  111 fps=0.0 q=17.0 size=   94208kB time=00:00:58.00 bitrate=13306.1kbitsframe=  112 fps=0.0 q=17.0 size=   94464kB time=00:00:59.00 bitrate=13116.1kbitsframe=  113 fps=0.0 q=17.0 size=   94464kB time=00:01:00.00 bitrate=12897.5kbitsframe=  115 fps=0.0 q=17.0 size=   94464kB time=00:01:02.00 bitrate=12481.4kbitsframe=  115 fps=0.0 q=17.0 size=   94464kB time=00:01:02.00 bitrate=12481.4kbitsframe=  116 fps=0.0 q=17.0 size=  100608kB time=00:01:03.00 bitrate=13082.2kbitsframe=  117 fps=0.0 q=17.0 size=  100608kB time=00:01:04.00 bitrate=12877.8kbitsframe=  119 fps=0.0 q=17.0 size=  100608kB time=00:01:06.00 bitrate=12487.6kbitsframe=  120 fps=0.0 q=17.0 size=  107520kB time=00:01:07.00 bitrate=13146.3kbitsframe=  121 fps=0.0 q=17.0 size=  107520kB time=00:01:08.00 bitrate=12953.0kbitsframe=  123 fps=0.0 q=17.0 size=  107520kB time=00:01:10.00 bitrate=12582.9kbitsframe=  125 fps=0.0 q=17.0 size=  114944kB time=00:01:12.00 bitrate=13078.1kbitsframe=  126 fps=0.0 q=17.0 size=  114944kB time=00:01:13.00 bitrate=12898.9kbitsframe=  128 fps=0.0 q=17.0 size=  122880kB time=00:01:15.00 bitrate=13421.8kbitsframe=  129 fps=0.0 q=17.0 size=  122880kB time=00:01:16.00 bitrate=13245.2kbitsframe=  130 fps=0.0 q=17.0 size=  122880kB time=00:01:17.00 bitrate=13073.1kbitsframe=  130 fps=0.0 q=17.0 size=  122880kB time=00:01:17.00 bitrate=13073.1kbitsframe=  131 fps=0.0 q=17.0 size=  122880kB time=00:01:18.00 bitrate=12905.5kbitsframe=  133 fps=0.0 q=17.0 size=  122880kB time=00:01:20.00 bitrate=12582.9kbitsframe=  135 fps=0.0 q=17.0 size=  122880kB time=00:01:22.00 bitrate=12276.0kbitsframe=  135 fps=0.0 q=17.0 size=  122880kB time=00:01:22.00 bitrate=12276.0kbitsframe=  136 fps=0.0 q=17.0 size=  129280kB time=00:01:23.00 bitrate=12759.8kbitsframe=  137 fps=0.0 q=17.0 size=  129280kB time=00:01:24.00 bitrate=12607.9kbitsframe=  138 fps=0.0 q=17.0 size=  129280kB time=00:01:25.00 bitrate=12459.5kbitsframe=  140 fps=0.0 q=17.0 size=  136448kB time=00:01:27.00 bitrate=12848.1kbitsframe=  140 fps=0.0 q=17.0 size=  136448kB time=00:01:27.00 bitrate=12848.1kbitsframe=  141 fps=0.0 q=17.0 size=  136448kB time=00:01:28.00 bitrate=12702.1kbitsframe=  143 fps=0.0 q=17.0 size=  136448kB time=00:01:30.00 bitrate=12419.8kbitsframe=  145 fps=0.0 q=17.0 size=  143872kB time=00:01:32.00 bitrate=12810.9kbitsframe=  146 fps=0.0 q=17.0 size=  143872kB time=00:01:33.00 bitrate=12673.1kbitsframe=  148 fps=0.0 q=17.0 size=  151552kB time=00:01:35.00 bitrate=13068.6kbitsframe=  149 fps=0.0 q=17.0 size=  151552kB time=00:01:36.00 bitrate=12932.4kbitsframe=  150 fps=0.0 q=17.0 size=  151552kB time=00:01:37.00 bitrate=12799.1kbitsframe=  150 fps=0.0 q=17.0 size=  151552kB time=00:01:37.00 bitrate=12799.1kbitsframe=  151 fps=0.0 q=17.0 size=  151552kB time=00:01:38.00 bitrate=12668.5kbitsframe=  153 fps=0.0 q=17.0 size=  151552kB time=00:01:40.00 bitrate=12415.1kbitsframe=  155 fps=0.0 q=17.0 size=  151552kB time=00:01:42.00 bitrate=12171.7kbitsframe=  156 fps=0.0 q=17.0 size=  157952kB time=00:01:43.00 bitrate=12562.5kbitsframe=  157 fps=0.0 q=17.0 size=  157952kB time=00:01:44.00 bitrate=12441.8kbitsframe=  159 fps=0.0 q=17.0 size=  157952kB time=00:01:46.00 bitrate=12207.0kbitsframe=  160 fps=0.0 q=17.0 size=  164864kB time=00:01:47.00 bitrate=12622.1kbitsframe=  161 fps=0.0 q=17.0 size=  164864kB time=00:01:48.00 bitrate=12505.2kbitsframe=  163 fps=0.0 q=17.0 size=  164864kB time=00:01:50.00 bitrate=12277.9kbitsframe=  165 fps=0.0 q=17.0 size=  172288kB time=00:01:52.00 bitrate=12601.6kbitsframe=  166 fps=0.0 q=17.0 size=  172288kB time=00:01:53.00 bitrate=12490.1kbitsframe=  168 fps=0.0 q=17.0 size=  179968kB time=00:01:55.00 bitrate=12820.0kbitsframe=  169 fps=0.0 q=17.0 size=  179968kB time=00:01:56.00 bitrate=12709.5kbitsframe=  170 fps=0.0 q=17.0 size=  179968kB time=00:01:57.00 bitrate=12600.8kbitsframe=  171 fps=0.0 q=17.0 size=  179968kB time=00:01:58.00 bitrate=12494.0kbitsframe=  173 fps=0.0 q=17.0 size=  179968kB time=00:02:00.00 bitrate=12285.8kbitsframe=  175 fps=0.0 q=17.0 size=  179968kB time=00:02:02.00 bitrate=12084.4kbitsframe=  176 fps=0.0 q=17.0 size=  186368kB time=00:02:03.00 bitrate=12412.4kbitsframe=  176 fps=0.0 q=-1.0 Lsize=  254547kB time=00:02:53.00 bitrate=12053.5kbits/s speed=0.0344x
video:254543kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001571%
[libx264 @ 000000000017b220] frame I:1     Avg QP: 7.13  size:8716365
[libx264 @ 000000000017b220] frame P:44    Avg QP:10.34  size:5710783
[libx264 @ 000000000017b220] frame B:131   Avg QP:13.29  size:  5046
[libx264 @ 000000000017b220] consecutive B-frames:  0.6%  0.0%  1.7% 97.7%
[libx264 @ 000000000017b220] mb I  I16..4: 22.8% 68.7%  8.5%
[libx264 @ 000000000017b220] mb P  I16..4:  0.8% 44.9%  3.6%  P16..4:  4.9%  5.5%  3.1%  0.0%  0.0%    skip:37.1%
[libx264 @ 000000000017b220] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.6%  0.0%  0.0%  direct: 0.1%  skip:99.2%  L0:42.7% L1:55.9% BI: 1.5%
[libx264 @ 000000000017b220] 8x8 transform intra:90.1% inter:72.0%
[libx264 @ 000000000017b220] coded y,uvDC,uvAC intra: 96.9% 93.0% 90.5% inter: 3.6% 3.7% 3.6%
[libx264 @ 000000000017b220] i16 v,h,dc,p: 50% 15% 14% 21%
[libx264 @ 000000000017b220] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 29% 21%  4%  5%  4%  7%  5%  9%
[libx264 @ 000000000017b220] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 33% 11%  6%  9%  6%  9%  5%  8%
[libx264 @ 000000000017b220] i8c dc,h,v,p: 50% 29% 16%  5%
[libx264 @ 000000000017b220] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000000000017b220] ref P L0: 44.8% 21.7% 12.8% 20.8%
[libx264 @ 000000000017b220] ref B L0: 85.0% 14.0%  1.0%
[libx264 @ 000000000017b220] ref B L1: 98.0%  2.0%
[libx264 @ 000000000017b220] kb/s:11847.81

可以看出:

  • 报道:
  

已弃用的像素格式,请确保您确实正确设置了范围

这意味着什么?

  • 当我们只有36帧时,它试图处理超过36帧。
  • 直到第25帧,大小为零,比特率为N / A,第25帧后,大小变为零。
  • 它会运行数百张图像然后停止,但我无法播放视频。
  • 第47帧之后,FPS变为零。
  • 我无法播放输出视频。

如何解决这些问题并从这些框架中创建视频?

EDIT1

在得到一些回复之后,我注意到h264不支持最终解析,所以我转换为使用VP9并且我正在使用此命令:

ffmpeg -i %1\frame%%05d.jpg -c:v libvpx-vp9 -b:v 2M -c:a libvorbis output.webm

我得到了正确的帧数,但我无法使用VLC播放输出。

  • 有没有可以播放此分辨率的播放器?
  • 有什么方法可以检查视频中的数据是否正确而不是播放?例如,通过将它们提取到多个图像中并查看图像。

1 个答案:

答案 0 :(得分:0)

当我们只有36帧时,它正在尝试处理超过36帧。

您的输入速率设置为1/5即显示每个帧5秒,但您的输出速率设置为1fps=1),因此ffm​​peg将每帧复制4次(除了最后一个)。

直到第25帧,大小为零,比特率为N / A,在第25帧之后,大小变为零。

报告大小和比特率,因为编码后流是多路复用的,因此存在一些滞后。

在第47帧之后,FPS变为零。

它的帧27,并且该FPS值是处理速度。您的最终处理速度为0.03x,即0.03 x 1 fps,因此fps读数将向下舍入或截断为0.0 - >不是错误。

我无法播放输出视频。

两个可能的原因:

许多视频播放器无法播放低帧率视频。 5往往是最安全的。所以fps=5。另外,将-r 1/5更改为-framerate 1/5

其他原因可能是帧大小。某些播放器可能无法播放具有较大帧的视频,这可能是由于其大小本身或不符合任何有效的H.264级别。如果是这种情况,您可能需要缩小流。