[ffmbc-discuss] modifying the aspect ratio of an MXF Op1a IMX D10 50Mbit/sec. video

1,354 views
Skip to first unread message

jc

unread,
Apr 29, 2010, 4:19:23 PM4/29/10
to ffmbc-discuss
Hi again,

I'm still a newbie, slowly learning how to use ffmpeg/ffmbc. Hope you
don't mind me asking this question!

I've a MXF Op1a IMX D10 50Mbit/sec. file wrapped by VCUBE (Merging
Technologies) from a MXF OpAtom IMX D10 generated by Avid.
Unfortunately, the video file is flagged with a 4:3 aspect ratio
within the MXF header and within the MPEG-2 stream.

I try to change the aspect ratio to 16:9 and to generate a "Sony like"
IMX D10 50Mbit/sec. (even I don't exactly know what "Sony like"
means).

I've tried many things ;-)

1. Just trying to create a .mxf readable in Sony XDCAM Transfer (Mac
OSX) software:

----------
ffmpeg -i input.mxf -vcodec copy -acodec copy -f mxf_d10
output27.mxf

FFmpeg version FFmbc-0.4-rc1, Copyright (c) 2000-2010 the FFmpeg
developers built on Apr 28 2010 23:13:11 with gcc 4.0.1 (Apple Inc.
build 5465)
configuration: --prefix=/usr/local/FFmbc-0.4-rc1/
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.60. 0 / 52.60. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.18. 0 / 1.18. 0
libswscale 0.10. 0 / 0.10. 0
[mpeg2video @ 0x1004600]intra matrix invalid, ignoring
Input #0, mxf, from 'input.mxf':
Duration: 00:03:29.08, start: 0.000000, bitrate: 62566 kb/s
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 152:135
DAR 4:3], tbc 2/50, 50000 kb/s, fps 25.000
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s
Output #0, mxf_d10, to 'output27.mxf':
Metadata:
encoder: FFmbc 0.4
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 152:135
DAR 4:3], tbc 1/25, q=2-31, 50000 kb/s
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 5227 fps= 68 q=-1.0 Lsize= 1596855kB time=209.08
bitrate=62566.6kbits/s
video:1276123kB audio:156810kB global headers:0kB muxing overhead
11.439578%

----------

If my original file is readable in Sony XDCAM Transfer the output file
isn't... (but it looks ok if I look at the mxf header and can be
played using VLC). Adding -vtag mx5p doesn't change anything.

2. Just trying to add -aspect 16:9 to the previous command.

File is still not readable in Sony XDCAM. In VLC there is no change in
aspect format. Dumping the MXF header confirm the 4:3 aspect ratio ...
but this is ok as we are copying the raw data, we don't modify the
video stream. Right?

3. Specifying the compression parameters of IMX D10 and forcing the
format to -f mxf_d10 doesn't work in Sony XDCAM reader. Adding or not
the -aspect 16:9 doesn't change the aspect ratio tag in the MXF header
adding -vtag mx5p doesn't help too!...

---------
ffmpeg -i input.mxf -vcodec mpeg2video -r 25 -pix_fmt yuv422p -minrate
50000k -maxrate 50000k -b 50000k -intra -flags +ildct+low_delay -dc 10
-flags2 +ivlc+non_linear_q -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize
2000000 -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25 -aspect
16:9 -acodec copy -f mxf_d10 output26.mxf
FFmpeg version FFmbc-0.4-rc1, Copyright (c) 2000-2010 the FFmpeg
developers
built on Apr 28 2010 23:13:11 with gcc 4.0.1 (Apple Inc. build 5465)
configuration: --prefix=/usr/local/FFmbc-0.4-rc1/
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.60. 0 / 52.60. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.18. 0 / 1.18. 0
libswscale 0.10. 0 / 0.10. 0
[mpeg2video @ 0x1004600]intra matrix invalid, ignoring
Input #0, mxf, from 'input.mxf':
Duration: 00:03:29.08, start: 0.000000, bitrate: 62566 kb/s
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 152:135
DAR 4:3], tbc 2/50, 50000 kb/s, fps 25.000
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s
Output #0, mxf_d10, to 'output26.mxf':
Metadata:
encoder: FFmbc 0.4
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 608:405
DAR 16:9], tbc 1/25, q=1-3, 50000 kb/s
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg2video @ 0x1004600]intra matrix invalid, ignoring
frame= 5227 fps= 32 q=24.8 Lsize= 1596855kB time=209.08
bitrate=62566.6kbits/s
video:1276123kB audio:156810kB global headers:0kB muxing overhead
11.439578%
---------

4. doing a .MOV from the MXF file works perfectly and give me a nice
16:9 movie:

-----------
ffmpeg -i input.mxf -vcodec copy -acodec pcm_s16le -vtag mx5p -vbsf
imxdump -aspect 16:9 output31.mov
FFmpeg version FFmbc-0.4-rc1, Copyright (c) 2000-2010 the FFmpeg
developers
built on Apr 28 2010 23:13:11 with gcc 4.0.1 (Apple Inc. build 5465)
configuration: --prefix=/usr/local/FFmbc-0.4-rc1/
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.60. 0 / 52.60. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.18. 0 / 1.18. 0
libswscale 0.10. 0 / 0.10. 0
[mpeg2video @ 0x1004600]intra matrix invalid, ignoring
Input #0, mxf, from 'input.mxf':
Duration: 00:03:29.08, start: 0.000000, bitrate: 62566 kb/s
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 152:135
DAR 4:3], tbc 2/50, 50000 kb/s, fps 25.000
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s
Output #0, mov, to 'output31.mov':
Metadata:
encoder: FFmbc 0.4
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 608:405
DAR 16:9], tbc 1/25, q=2-31, 50000 kb/s
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 5227 fps= 81 q=-1.0 Lsize= 1433077kB time=209.08
bitrate=56149.6kbits/s
video:1276123kB audio:156810kB global headers:0kB muxing overhead
0.010058%
------------

5. doing a .MOV from the MXF generated in 1.give me the same nice 16:9
video!

Can anyone help me solving this problem?

Thank you!

Baptiste Coudurier

unread,
Apr 29, 2010, 5:19:24 PM4/29/10
to ffmbc-...@googlegroups.com
Damn, the file should work. I'll have a look.

--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org

Baptiste Coudurier

unread,
May 23, 2010, 6:17:46 AM5/23/10
to ffmbc-...@googlegroups.com
I double checked and the file created works perfectly in xdcam transfer
tool 2.12 on max osx leopard.

commandline line was the same. In doubt, update your Xcode version to
have gcc 4.2.1, but that would be weird.

jc

unread,
Jun 14, 2010, 5:19:46 AM6/14/10
to ffmbc-discuss
Hi Baptiste,

I've switched to gcc 4.2.1 and upgraded to Xdcam Transfer 2.12 on mac
osx leopard.
Yess, the mxf files play nice now. Even those encoded with ffmbc
compiled with gcc 4.0.1. So it's was more a problem related to Xdcam
Transfer itself.

But there is still a problem:

Encoding seems to re-encode perfectly in 16:9 with an output format:

Output #0, mxf_d10, to 'output120.mxf':
Metadata:
encoder: FFmbc 0.4
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 608:405
DAR 16:9], tbc 1/25, q=1-3, 50000 kb/s
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s

but the resulting file remains in 4:3:

ffprobe output120.mxf
FFprobe version FFmbc-0.4-rc1, Copyright (c) 2007-2010 the FFmpeg
developers
built on Jun 8 2010 17:24:57 with gcc 4.2.1 (Apple Inc. build 5577)
configuration: --prefix=/usr/local
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.60. 0 / 52.60. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.18. 0 / 1.18. 0
libswscale 0.10. 0 / 0.10. 0
Input #0, mxf, from 'output120.mxf':
Duration: 00:00:02.16, start: 0.000000, bitrate: 62589 kb/s
Stream #0.0(und): Video: mpeg2video, yuv422p, 720x608 [PAR 152:135
DAR 4:3], tbc 2/50, 50000 kb/s, fps 25.000
Stream #0.1(und): Audio: pcm_s16le, 48000 Hz, 8 channels, s16,
6144 kb/s

Thanks a lot.
JC



On May 23, 12:17 pm, Baptiste Coudurier <baptiste.coudur...@gmail.com>
wrote:

Baptiste Coudurier

unread,
Jun 24, 2010, 1:58:59 AM6/24/10
to ffmbc-...@googlegroups.com, jc
Hi jc,

Yes, that's a weird side effect of the new filtering library.
You can use -vf aspect=16:9 to workaround it.

In the next release, the -aspect switch will work again like it should.

Sorry for the inconvenience.

david....@itv.com

unread,
Feb 14, 2013, 1:01:36 PM2/14/13
to ffmbc-...@googlegroups.com, jc
HI all, 

Did this get resolved? - I'm attempting to modify the DAR of a D10 MXF (4:3 to 16:9) with this command...so far unsuccessfully.
 

ffmbc -i input.mxf  -vcodec copy -aspect 16:9 -acodec copy -f  mxf_d10 output.mxf


Is anyone able to help?


Thanks


Baptiste Coudurier

unread,
Feb 14, 2013, 3:45:53 PM2/14/13
to ffmbc-...@googlegroups.com, jc
David,

On Feb 14, 2013, at 10:01 AM, david....@itv.com wrote:

HI all, 

Did this get resolved? - I'm attempting to modify the DAR of a D10 MXF (4:3 to 16:9) with this command...so far unsuccessfully.
 

ffmbc -i input.mxf  -vcodec copy -aspect 16:9 -acodec copy -f  mxf_d10 output.mxf


If you want to change the aspect without re-encoding you need to you the bitstream filter:
-vbsf mpeg2setdar
Message has been deleted

davidm...@gmail.com

unread,
Feb 15, 2013, 2:19:27 AM2/15/13
to ffmbc-...@googlegroups.com, jc
Thanks Baptiste!
Reply all
Reply to author
Forward
0 new messages