ffmpeg - creating DNxHD MFX files with alphas
- by Hugh
Hi all,
I'm struggling with something in FFMpeg at the moment...
I'm trying to make DNxHD 1080p/24, 36Mb/s MXF files from a sequence of PNG files.
My current command-line is:
ffmpeg -y -f image2 -i /tmp/temp.%04d.png -s 1920x1080 -r 24 -vcodec dnxhd -f mxf -pix_fmt rgb32 -b 36Mb /tmp/temp.mxf
To which ffmpeg gives me the output:
Input #0, image2, from '/tmp/temp.%04d.png':
Duration: 00:00:01.60, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, rgb32, 1920x1080, 25 tbr, 25 tbn, 25 tbc
Output #0, mxf, to '/tmp/temp.mxf':
Stream #0.0: Video: dnxhd, yuv422p, 1920x1080, q=2-31, 36000 kb/s, 90k tbn, 24 tbc
Stream mapping:
Stream #0.0 -> #0.0
[mxf @ 0x1005800]unsupported video frame rate
Could not write header for output file #0 (incorrect codec parameters ?)
There are a few things in here that concern me:
The output stream is insisting on being yuv422p, which doesn't support alpha.
24fps is an unsupported video frame rate? I've tried 23.976 too, and get the same thing.
I then tried the same thing, but writing to a quicktime (still DNxHD, though) with:
ffmpeg -y -f image2 -i /tmp/temp.%04d.png -s 1920x1080 -r 24 -vcodec dnxhd -f mov -pix_fmt rgb32 -b 36Mb /tmp/temp.mov
This gives me the output:
Input #0, image2, from '/tmp/1274263259.28098.%04d.png':
Duration: 00:00:01.60, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, rgb32, 1920x1080, 25 tbr, 25 tbn, 25 tbc
Output #0, mov, to '/tmp/1274263259.28098.mov':
Stream #0.0: Video: dnxhd, yuv422p, 1920x1080, q=2-31, 36000 kb/s, 90k tbn, 24 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 39 fps= 9 q=1.0 Lsize= 7177kB time=1.62 bitrate=36180.8kbits/s
video:7176kB audio:0kB global headers:0kB muxing overhead 0.013636%
Which obviously works, to a certain extent, but still has the issue of being yuv422p, and therefore losing the alpha.
If I'm going to QuickTime, then I can get what I need using Shake, but my main aim here is to be able to generate .mxf files.
Any thoughts?
Thanks