我试图通过FFMPEG将一系列图像转换为mpeg电影,虽然我不断收到错误,说它无法找到代码参数(视频:mjpeg).谷歌搜索没有带来太多有用的东西.
ffmpeg -f image2 -i /tmp/img%03d.jpg video.mpgFFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Mar 4 2010 12:35:30, gcc: 4.4.3 [mjpeg @ 0x9069870]dqt: 16bit precision [mjpeg @ 0x9069870]mjpeg: unsupported coding type (c9) [mjpeg @ 0x9069870]mjpeg: unsupported coding type (cf) [mjpeg @ 0x9069870]only 8 bits/component accepted [mjpeg @ 0x9069870]dqt: 16bit precision [mjpeg @ 0x9069870]huffman table decode error [mjpeg @ 0x9069870]mjpeg: unsupported coding type (ca) [mjpeg @ 0x9069870]mjpeg: unsupported coding type (ce) [mjpeg @ 0x9069870]mjpeg: unsupported coding type (cb) [mjpeg @ 0x9069870]decode_sos: invalid len (60581) [mjpeg @ 0x9069870]only 8 bits/component accepted [mjpeg @ 0x9069870]decode_sos: invalid len (56833) [mjpeg @ 0x9069870]invalid id 207 [mjpeg @ 0x9069870]mjpeg: unsupported coding type (cd) [mjpeg @ 0x9069870]huffman table decode error [image2 @ 0x90682c0]Could not find codec parameters (Video: mjpeg) /tmp/img%03d.jpg: could not find codec parameters
图像位于/ tmp目录中,名称为img001.jpg和img002.jpg.
有任何想法吗?
谢谢 - 坦纳
ffmpeg实际上试图告诉你的是,你的文件有jpeg的扩展名,但文件实际上是bmp或其他格式.
确保文件以jpeg编码,问题将消失.
这里的一些人说这是因为无法真正找到mjpeg编解码器.他们建议从源头安装它.我觉得mjpeg更有可能没有安装.我觉得这有两个解决方案.
您可以尝试安装该编解码器,看看它是否有助于 MJpeg下载For Win
您可以尝试强制ffmpeg将其导出到不同的编解码器中尝试:ffmpeg -f image2 -i /tmp/img%03d.jpg -vcodec mpeg2video video.mpg