我正在使用ffmpeg将jpg转换为mov。我被要求使用DNxHD 115编解码器,并且帧速率是24,所以我写了以下命令:
ffmpeg -i my.jpg -r 24 -s 1920x1080 -vcodec dnxhd -b:v 115m -y test.mov
但是它抛出错误:
[swscaler @ 0xefae40] deprecated pixel format used, make sure you did set range correctly
[dnxhd @ 0xf1c580] video parameters incompatible with DNxHD. Valid DNxHD profiles:
[dnxhd @ 0xf1c580] Frame Size:1920x1080p; bitrate:175Mbps; pixel format:yuv422p10; framerate:24000/1001
[dnxhd @ 0xf1c580] Frame Size:1920x1080p; bitrate:185Mbps; pixel format:yuv422p10; framerate:25/1
[dnxhd @ 0xf1c580] Frame Size:1920x1080p; bitrate:115Mbps; pixel format:yuv422p; framerate:24000/1001
[dnxhd @ 0xf1c580] Frame Size:1920x1080p; bitrate:120Mbps; pixel format:yuv422p; framerate:25/1
[dnxhd @ 0xf1c580] Frame Size:1920x1080p; bitrate:175Mbps; pixel format:yuv422p; framerate:24000/1001
[dnxhd @ 0xf1c580] Frame Size:1920x1080p; bitrate:185Mbps; pixel format:yuv422p; framerate:25/1
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg(native) -> dnxhd(native))
Error while openig encoder for output stream #0:0 - maybe incorrect parameter such as bit_rate, rate, width or height
我尝试了所有选项,但没有成功。
答案 0 :(得分:0)
第一次尝试
ffmpeg -i my.jpg -r 24000/1001 -s 1920x1080 -vcodec dnxhd -b:v 115m -y test.mov
如果以上操作均失败,则像素格式不可接受,请尝试
ffmpeg -i my.jpg -r 24000/1001 -pix_fmt yuv422p -s 1920x1080 -vcodec dnxhd -b:v 115m -y test.mov
请注意,您的输入是单个图像。因此输出持续时间将为1001/24000
s