converting to MXF using ffmpeg
12,541
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.mxf
Note 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.
Related videos on Youtube
![itasuke](https://lh4.googleusercontent.com/-GZ6ZvwYXz9I/AAAAAAAAAAI/AAAAAAAAAAA/AMZuuckqKfSOl9u8lJFf0J8q0E-eoY5a-g/s96-c/photo.jpg?sz=256)
Author by
itasuke
Architect, full stack developer and a curious technology enthusiast. Experienced in designing, developing, deploying and scaling applications
Updated on September 18, 2022Comments
-
itasuke almost 2 years
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 height
UPDATE
➜ 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
-
Elisa Cha Cha almost 12 yearsI see no error. Is this the complete ffmpeg console output? Also, option placement matters. You're applying all of your options to the input. Move it past
-i input
to apply your options to the output. -
itasuke almost 12 years@LordNeckbeard Thanks for the information, I updated the question after making the modifications you told.
-
-
slhck almost 12 yearsI've found FFmpeg highly unreliable with DNxHD content and always use FFmbc for that. On this page there's a table with common DNxHD resolutions and bitrates (i.e. the values you put after
-b:v
). And yeah — FFmbc can't create MXF files either, just DVCPROHD or XDCAM. -
itasuke almost 12 years@LordNeckbeard Thanks for the help. But I have a requirement to convert to mxf format. How should I do then?
-
itasuke almost 12 years+1 for the help so far. I have updated the question after what you told, there is still small problem.
-
itasuke almost 12 years@LongNeckbeard When I am playing with VLC player it is saying that there is no data. This is may be because the conversion never happened