I have been trying to use FFmpeg utility to convert a avi file using DNxHD to mxf format. I am using "FFmpeg" with params as following:
ffmpeg -i ccvt_box.avi -vcodec dnxhd -video_size 1920x1080 -r 24 -b:v 115m ex.mxf The error it is giving :
ffmpeg version N-43737-g76c3fff Copyright (c) 2000-2012 the FFmpeg developers built on Aug 20 2012 18:50:42 with llvm-gcc 4.2.1 (LLVM build 2336.11.00) configuration: libavutil 51. 70.100 / 51. 70.100 libavcodec 54. 53.100 / 54. 53.100 libavformat 54. 25.104 / 54. 25.104 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 11.101 / 3. 11.101 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100
Input #0, avi, from 'ccvt_box.avi': Duration: 00:00:10.00, start: 0.000000, bitrate: 691 kb/s Stream #0:0: Video: indeo5 (IV50 / 0x30355649), yuv410p, 340x344, 10 tbr, 10 tbn, 10 tbc Metadata: title : bob.avi
[dnxhd @ 0x7fcd60818e00] video parameters incompatible with DNxHD
Output #0, mxf, to 'ex.mxf': Stream #0:0: Video: dnxhd, yuv422p, 340x344, q=2-1024, 90k tbn, 24 tbc Metadata: title : bob.avi
Stream mapping: Stream #0:0 -> #0:0 (indeo5 -> dnxhd)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or heightUPDATE
➜ FFmpegTest ffmpeg -i ccvt_box.avi -c:v dnxhd -s 1920x1080 -r 25 -b:v 115M ex.mxf
ffmpeg version N-43737-g76c3fff Copyright (c) 2000-2012 the FFmpeg developers built on Aug 20 2012 18:50:42 with llvm-gcc 4.2.1 (LLVM build 2336.11.00) configuration: libavutil 51. 70.100 / 51. 70.100 libavcodec 54. 53.100 / 54. 53.100 libavformat 54. 25.104 / 54. 25.104 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 11.101 / 3. 11.101 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100
Input #0, avi, from 'ccvt_box.avi': Duration: 00:00:10.00, start: 0.000000, bitrate: 691 kb/s Stream #0:0: Video: indeo5 (IV50 / 0x30355649), yuv410p, 340x344, 10 tbr, 10 tbn, 10 tbc Metadata: title : bob.avi
File 'ex.mxf' already exists. Overwrite ? [y/N] y
Output #0, mxf, to 'ex.mxf': Metadata: encoder : Lavf54.25.104 Stream #0:0: Video: dnxhd, yuv422p, 1920x1080, q=2-1024, 115000 kb/s, 25 tbn, 25 tbc Metadata: title : bob.avi
Stream mapping: Stream #0:0 -> #0:0 (indeo5 -> dnxhd)
Press [q] to stop, [?] for help
frame= 249 fps= 59 q=1.0 Lsize= 147662kB time=00:00:09.96 bitrate=121450.5kbits/s dup=149 drop=0
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
➜ FFmpegTest ls -l ex.mxf
-rw-r--r-- 1 Prakash staff 151205933 Sep 5 15:26 ex.mxf 2 1 Answer
You need to use -s instead of -video_size (this is an option for some demuxers and the V4L2 input device), use 115M instead of 115m, and provide a valid frame rate with -r (25 [pal], 50, 30000/1001 [ntsc], 60000/1001):
ffmpeg -i ccvt_box.avi -c:v dnxhd -s 1920x1080 -r 25 -b:v 115M ex.mxfNote that this example does not address any audio stream. Default audio encoder will be pcm_s16le.
In addition to FFmpeg there is also FFmbc which may provide additional DNxHD functionality.
4