我正在尝试使用uconntu 14.04上的avconv将一堆447张静止图像(jpg)转换为视频
avconv -f image2 -i aligned_%04d.tif.jpg -r 10 movie.mkv
输出:
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Input #0, image2, from 'aligned_%04d.tif.jpg':
Duration: 00:00:17.84, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 792x514 [PAR 150:150 DAR 396:257], 25 fps, 25 tbr, 25 tbn
File 'movie.mkv' already exists. Overwrite ? [y/N] y
[libx264 @ 0x1811dc0] using SAR=1/1
[libx264 @ 0x1811dc0] using cpu capabilities: MMX2 SSE2Fast LZCNT
[libx264 @ 0x1811dc0] profile High, level 3.1
[libx264 @ 0x1811dc0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=3 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=10 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.25 aq=1:1.00
Output #0, matroska, to 'movie.mkv':
Metadata:
encoder : Lavf54.20.4
Stream #0.0: Video: libx264, yuvj420p, 792x514 [PAR 150:150 DAR 396:257], q=-1--1, 1k tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> libx264)
Press ctrl-c to stop encoding
frame= 179 fps= 53 q=32766.0 Lsize= 158kB time=17.70 bitrate= 73.1kbits/s s
video:154kB audio:0kB global headers:0kB muxing overhead 2.300587%
[libx264 @ 0x1811dc0] frame I:1 Avg QP:17.62 size: 87993
[libx264 @ 0x1811dc0] frame P:46 Avg QP:16.44 size: 1477
[libx264 @ 0x1811dc0] frame B:132 Avg QP:22.30 size: 26
[libx264 @ 0x1811dc0] consecutive B-frames: 1.7% 0.0% 0.0% 98.3%
[libx264 @ 0x1811dc0] mb I I16..4: 4.1% 88.4% 7.5%
[libx264 @ 0x1811dc0] mb P I16..4: 0.1% 0.6% 0.1% P16..4: 2.8% 0.4% 0.4% 0.0% 0.0% skip:95.6%
[libx264 @ 0x1811dc0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.2% 0.0% 0.0% direct: 0.0% skip:99.8% L0:42.2% L1:57.8% BI: 0.0%
[libx264 @ 0x1811dc0] 8x8 transform intra:82.7% inter:98.4%
[libx264 @ 0x1811dc0] coded y,uvDC,uvAC intra: 87.0% 81.3% 53.6% inter: 0.4% 0.8% 0.2%
[libx264 @ 0x1811dc0] i16 v,h,dc,p: 7% 84% 3% 6%
[libx264 @ 0x1811dc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 29% 18% 17% 4% 3% 4% 5% 12%
[libx264 @ 0x1811dc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 19% 9% 12% 6% 5% 4% 9% 11%
[libx264 @ 0x1811dc0] i8c dc,h,v,p: 36% 45% 15% 3%
[libx264 @ 0x1811dc0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1811dc0] ref P L0: 96.3% 0.0% 1.9% 1.9%
[libx264 @ 0x1811dc0] ref B L0: 78.5% 12.5% 9.0%
[libx264 @ 0x1811dc0] ref B L1: 95.0% 5.0%
[libx264 @ 0x1811dc0] kb/s:71.22
生成的视频大约运行18秒,但似乎只包含第一帧。改变帧速率仍然会以~18秒结束,只有第一帧。
我的期望是:每个图像将用于一帧,帧速率越高,视频越短。当然:视频应包含所有图像。
我的期望是错的吗?或者可能是我的问题的原因是什么?
答案 0 :(得分:0)
我更愿意删除这个问题。
将输入帧从tif(avconv不接受)转换为jpg时,我必须把它们加起来。所有447张图片实际上都是第一张图片的副本。这解释了视频问题,这些问题确实没有问题。