Opened 5 years ago
Last modified 4 years ago
#8088 new enhancement
FFmpeg allows DNxHD 175x, but not DNxHD 350x
Reported by: | clawsoon | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | dnxhd |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
In the Wikipedia list of DNxHD codecs, 175x and 350x are similar except that 350x uses 4:4:4 and runs at 352Mbps, while 175x uses 4:2:2 and runs at 176Mbps. Both are 10 bit.
It is possible to create an 8-bit DNxHD 175 with a command line like this:
ffmpeg.exe -r 24000/1001 -i [input frames] -r 24000/1001 -c:v dnxhd -pix_fmt yuv422p -b:v 175M [output movie]
It is possible to create a 10-bit DNxHD 175x with a command line like this:
ffmpeg.exe -r 24000/1001 -i [input frames] -r 24000/1001 -c:v dnxhd -pix_fmt yuv422p10 -b:v 175M [output movie]
However, a 10-bit DNxHD 350x fails:
ffmpeg.exe -r 24000/1001 -i [input frames] -r 24000/1001 -c:v dnxhd -pix_fmt yuv444p10 -b:v 350M [output movie]
...
[dnxhd @ 0000024cade3fec0] pixel format is incompatible with DNxHD profile
[dnxhd @ 0000024cadde5840] ff_frame_thread_encoder_init failed
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
The error comes from this bit of code, which, if I'm reading it correctly, says that 4:4:4 is only available in the dnxhr_444 profile:
if ((ctx->profile == FF_PROFILE_DNXHR_444 && (avctx->pix_fmt != AV_PIX_FMT_YUV444P10 &&
avctx->pix_fmt != AV_PIX_FMT_GBRP10))
(ctx->profile != FF_PROFILE_DNXHR_444 && (avctx->pix_fmt == AV_PIX_FMT_YUV444P10 avctx->pix_fmt == AV_PIX_FMT_GBRP10))) {
av_log(avctx, AV_LOG_ERROR,
"pixel format is incompatible with DNxHD profile\n");
return AVERROR(EINVAL);
}
I believe (though I'm not 100% certain) that this is incorrect; both 350x and 365x, which are DNxHD codecs, not DNxHR codecs, should support 4:4:4.
Thanks.
Andrew
Attachments (5)
Change History (11)
comment:1 by , 5 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | dnxhd added |
Priority: | normal → wish |
Version: | unspecified → git-master |
comment:2 by , 5 years ago
I'll see if I can hunt someone down with an Avid (hopefully in the next couple of days). Would color bars be sufficient, or would you need a more complex movie than that?
by , 5 years ago
Attachment: | BarsDNxHD350x.rar added |
---|
DNxHD 350x 4:4:4 23.976 10-bit - 1 second - rar
comment:4 by , 5 years ago
Let me know if those samples are okay. I didn't realize they would compress so well with rar, so I first uploaded a single frame because that's all that would fit in the 2.5MB upload limit.
comment:5 by , 5 years ago
These were all generated in Avid from a 23.976 base project. I notice that the time bases are a little weird, e.g. 959/23976 for the 25fps clip, probably because of that. Presumably Avid is the source of truth for this codec, though, so I'm not going to argue with that.
An official source for the codec list is here:
https://www.avid.com/static/resources/US/documents/dnxhd.pdf
comment:6 by , 4 years ago
We hit this one today, as well. Thanks for doing the research and reporting this, clawsoon. Saves me some work. :)
Replying to clawsoon:
Please provide such samples.