我正在尝试用 TIFF 图像(即 DNG 图片)制作视频。问题是 FFmpeg 生成的视频的分辨率低于原始图片
我尝试过,image2
但没有成功。
这是一组 CinemaDNG 图像。我使用 Adobe DNG 转换器将其转换为 DNG。然后我需要将扩展名更改为 .TIF,因为 FFmpeg 说未找到原始视频或转换后的扩展名为 .DNG 的视频。将扩展名更改为 .TIF 后,FFmpeg 可以创建视频,但分辨率非常小。
为什么?(因为原始文件是2K分辨率的)
我如何利用这些图像制作视频?
这将创建一个 236MB 的视频,但质量很差并且分辨率很低:
D:/>ffmpeg -f image2 -start_number 00101600 -i D:/temp/dng/conv2/00%3d.tif copy -qscale 1 D:/temp/dng/conv2/temp/11.avi
version N-49527-g985e93a Copyright (c) 2000-2013 the FFmpeg developers
on Feb 1 2013 18:41:39 with gcc 4.7.2 (GCC)
guration: --enable-gpl --enable-version3 --disable-w32threads --enable-a
--enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --ena
ss --enable-libbluray --enable-libcaca --enable-libfreetype --enable-lib
able-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --
ibopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --
ibspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --e
bvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enabl
s --enable-libxvid --enable-zlib
util 52. 17.100 / 52. 17.100
codec 54. 91.100 / 54. 91.100
format 54. 61.104 / 54. 61.104
device 54. 3.103 / 54. 3.103
filter 3. 35.100 / 3. 35.100
scale 2. 2.100 / 2. 2.100
resample 0. 17.102 / 0. 17.102
stproc 52. 2.100 / 52. 2.100
@ 03811820] Stream #0: not enough frames to estimate rate; consider inc
probesize
0, image2, from 'D:/temp/dng/conv2/00%3d.tif':
ion: 00:00:02.00, start: 0.000000, bitrate: N/A
eam #0:0: Video: tiff, rgb24, 256x137, 25 tbr, 25 tbn, 25 tbc
use -q:a or -q:v, -qscale is ambiguous
:/temp/dng/conv2/temp/11.avi' already exists. Overwrite ? [y/N] y #0, avi, to 'D:/temp/dng/conv2/temp/11.avi':
ata:
T : Lavf54.61.104
eam #0:0: Video: tiff, rgb24, 256x137, q=2-31, 25 tbn, 25 tbc
mapping:
m #0:0 -> #0:0 (copy)
q] to stop, [?] for help
9 fps=0.0 q=-1.0 size= 43538kB time=00:00:00.36 bitrate=990732.5kbi
14 fps= 12 q=-1.0 size= 67744kB time=00:00:00.56 bitrate=991004.4kbi
20 fps= 12 q=-1.0 size= 96792kB time=00:00:00.80 bitrate=991152.9kbi
26 fps= 12 q=-1.0 size= 125840kB time=00:00:01.04 bitrate=991231.0kbi
32 fps= 12 q=-1.0 size= 154889kB time=00:00:01.28 bitrate=991287.4kbi
38 fps= 11 q=-1.0 size= 183936kB time=00:00:01.52 bitrate=991319.5kbi
44 fps= 11 q=-1.0 size= 212983kB time=00:00:01.76 bitrate=991339.3kbi
50 fps= 11 q=-1.0 size= 242041kB time=00:00:02.00 bitrate=991399.0kbi
50 fps= 11 q=-1.0 Lsize= 242042kB time=00:00:02.00 bitrate=991402.2kb
42035kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.002777
这将创建一个大小为 80KB 且分辨率极慢的视频:
D:\temp>ffmpeg -f image2 -start_number 10105113 -i D:/temp/dng/A-CamCinemaDNGBdobeDNGConv/%03d.tif D:/temp/dng/A-CamCinemaDNGByAdobeDNGConv/temp/a.mpg
ffmpeg version N-49527-g985e93a Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 1 2013 18:41:39 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --en
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-li
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb -
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger -
nable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --
able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enab
-libxavs --enable-libxvid --enable-zlib
libavutil 52. 17.100 / 52. 17.100
libavcodec 54. 91.100 / 54. 91.100
libavformat 54. 61.104 / 54. 61.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 35.100 / 3. 35.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, image2, from 'D:/temp/dng/A-CamCinemaDNGByAdobeDNGConv/%03d.tif':
Duration: 00:00:01.24, start: 0.000000, bitrate: N/A
Stream #0:0: Video: tiff, rgb24, 256x137, 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'D:/temp/dng/A-CamCinemaDNGByAdobeDNGConv/temp/a.mpg' already exists. Ove
rite ? [y/N] Y
VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'D:/temp/dng/A-CamCinemaDNGByAdobeDNGConv/temp/a.mpg':
Metadata:
encoder : Lavf54.61.104
Stream #0:0: Video: mpeg1video, yuv420p, 256x137, q=2-31, 200 kb/s, 90k tb
25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (tiff -> mpeg1video)
Press [q] to stop, [?] for help
frame= 20 fps=0.0 q=4.9 size= 54kB time=00:00:00.72 bitrate= 614.4kbits
frame= 31 fps=0.0 q=6.6 Lsize= 80kB time=00:00:01.20 bitrate= 546.1kbit
s
video:77kB audio:0kB subtitle:0 global headers:0kB muxing overhead 3.294791%
如果我使用原始的.dng 文件,则无法创建视频:
D:\temp>ffmpeg -f image2 -start_number 10105113 -i D:/temp/dng/A-CamCinemaDNG/%d.DNG /tmp/a.mpg
ffmpeg version N-49527-g985e93a Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 1 2013 18:41:39 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --en
able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable
-libxavs --enable-libxvid --enable-zlib
libavutil 52. 17.100 / 52. 17.100
libavcodec 54. 91.100 / 54. 91.100
libavformat 54. 61.104 / 54. 61.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 35.100 / 3. 35.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[image2 @ 024ac1a0] Stream #0: not enough frames to estimate rate; consider incr
easing probesize
[image2 @ 024ac1a0] Could not find codec parameters for stream 0 (Video: none):
unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
D:/temp/dng/A-CamCinemaDNG/%d.DNG: could not find codec parameters