2017-07-06 124 views
0

我想從使用ffmpeg的jpeg圖像創建視頻。生成的視頻應該採用x264或x265格式。ffmpeg不會從圖像生成視頻

我有一個包含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播放輸出。

  • 是否有任何玩家可以玩此分辨率?
  • 有沒有什麼方法可以檢查視頻中的數據是否正確,而不是播放它?例如通過將它們提取爲多個圖像並查看圖像。
+0

H.264沒有分辨率限制。 H.264解碼器(很多但不是全部播放器)都可以。使用ffplay進行測試。 – Mulvya

回答

0

它正試圖處理超過36幀,當我們只有36幀。

你的輸入速率被設定爲1/5即顯示5秒每幀,但你的輸出速率被設定爲1fps=1),所以FFMPEG將重複每幀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級別。如果是這種情況,您可能不得不縮小流量。

+0

謝謝,它幫助了我很多,我現在試圖使用VP9而不是h264。請看我編輯的問題。你能幫我解決嗎? – mans