Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Questions and answers on how to get the most out of FFAStrans
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by vijm1972 »

Hi,

I'm trying to create Uncompres MXF OP1A, I haven't found any information on Google. FFMPEG won't support that format?
I have found Uncompres AVI & MOV in FFAStrans.
I'm able to create lossy jpge2000 with MXF wrapper but not lossless.

Please suggest.

Thanks
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by admin »

It's possible to create uncompressed 422 SD/HD/UHD video in .mxf but I don't think it's doable using just ffmpeg. The raw2bmx from the BBC-engineers lets you wrap an uncompressed raw video to .mxf. The raw2bmx tool already ships with FFAStrans so you can build the following workflow:

1. Create a workflow containing a "Custom FFmpeg"-preset:
"-f rawvideo -pix_fmt uyvy422 -an". Set extension to "raw". PS: You can disable Audio and video codec options.

2. Connect the "Custom FFmpeg"-encoder to a "Command executor"-node containing the following command:
%ComSpec% /c ""%s_ffastrans_dir%\Processors\mxf_tools\raw2bmx.exe" -o "<output_path>\%s_original_name%.mxf" --unc_1080i "%s_source%""
This is for 1080i video source.

Replace "<output_path>" with your preffered output path. You may also change the "--unc_1080i" to match one of the following:

--unc = SD
--unc_1080i = HD 1080 interlaced
--unc_1080p = HD 1080 progressive
--unc_720p = HD 720 progressive
--unc_3840 = UHD 3840x2160

-steipal
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by vijm1972 »

Hi Steipal,

Thanks for above information. Please let me know how can I add audio to output Uncompressed.mxf. Also while creating SD output I am getting 16:9 aspect ratio with 166 Mbps bit-rate, my requirement is 4:3 aspect ration with 220 Mbps bit-rate.

Please suggest if we can configure the output as per our requirement.

Thanks
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by admin »

Let's take the video part first:
When you write 220 Mbit I assume you want 8 bit 4:4:4/RGB? If so, I have not found any solutions to this. Is there a praticular reason you MUST have uncompressed in .mxf rather than f.ex. .mov or .avi?

-steipal
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by vijm1972 »

My requirement is to transcode the files into uncompressed format, I am able to trnascode it to 10 bit 4:2:2 YUV using below command in command executor. Now my bit-rate is also around 221 Mbps. I have added option -a 4:3 and -c 10 to provided command.

%ComSpec% /c ""%s_ffastrans_dir%\Processors\mxf_tools\raw2bmx.exe" -o "D:\Uncompressed MXF\Outbox\%s_original_name%.mxf" -a 4:3 -c 10 --unc "%s_source%""

Please find below screen shot for your reference.
Uncompressed_mxf.jpg
Uncompressed_mxf.jpg (74.67 KiB) Viewed 15208 times

Now I am trying to add audio but still not able to succeed.

Please suggest.

Thanks
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by admin »

If it's 10 bit 422 video you require than that's great! :-)

I assume you have read the raw2bmx help? It can tell you that adding audio is done from external wave files. So we must extract audio from the input source to separate wave files. What does the source audio look like?

-steipal
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by vijm1972 »

Yes I have used raw2bmx help.

My source file format is PCM mono 16 bit 768 Kbps 48 KHz, I have tried extracting the .wav file but not able to wrap both (Uncompressed.mxf and .wav) files.

Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by admin »

But you managed to extract audio with the "Custom FFmpeg"-encoder?

-steipal
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by vijm1972 »

Yes I have added one more custom FFMPEG encoder with copy audio command and extension wav.
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Uncompres MXF OP1A or Lossless j2k with MXF wrapper

Post by admin »

Ok, instead of adding another custom ffmpeg preset just for the audio, I would put the audio decoding in your existing custom ffmpeg preset:

"%s_job_work%\%s_original_name%.wav" -f rawvideo -pix_fmt uyvy422 -an


Then you add the '--wave' option to your raw2bmx command:

%ComSpec% /c ""%s_ffastrans_dir%\Processors\mxf_tools\raw2bmx.exe" -o "D:\Uncompressed MXF\Outbox\%s_original_name%.mxf" -a 4:3 -c 10 --unc "%s_source%" --wave "%s_job_work%\%s_original_name%.wav""

This should do the trick ;-)

-steipal
Post Reply