Monday, June 23, 2014

Going from Blender to 2k Digital Cinema DCP

I recently started in on a project for a friend of mine to create an advertisement for his small chain of movies theaters to play before movies. I've done plenty of animations before, but I had never thought about what it would take to get it on the screen. It turns out to do it right, you need more than just a quicktime file. Here is the process I went through to make it work. I pulled tidbits from various websites to get the whole process. I'll link to ones I used at the bottom of this post.

  1. Sources: To start, I created my Blender scene and collected my audio files
  2. Render #1: Render the Blender Scene into a series of 16 bit TIFF files at full resolution
    1. 2048x858 with square pixels (1:1 aspect ratio)
  3. Composite: Using my tiff files and my audio, I created a second Blender project to composite the sources into what I wanted the final project to look and sound like. For my project, I used Stereo audio, so I didn't mess with the surround sound options. I will be looking into that for future projects.
  4. Render #2: 
    1. Render out the Composite to 16 Bit TIFF image sequence with any additional compositing/effects/etc
    2. Create the audio mixdown. This is where you could end up with a stereo file or a series of files for surround
  5. Video Path to MXF (Material Exchange Format)
    1. Using openDCP, convert the TIFF files to a JPEG2000 image sequence
    2. Encapsulate the JPEG2000 image sequence in an MXF  file
  6. Audio Path to MXF
    1. Process the resultant audio files as needed (compression, normalization, etc)
    2. Make sure the project will save as 24bit uncompressed WAV at 48k or 96k
    3. Save each channel as a separate mono file (e.g. mix-Left.wav, mix-Right.wav)
    4. Use openDCP to encapsulate the audio in an MXF file
  7. Use openDCP to combine the MXF into a DCP (digital cinema package)
  8. Optional Convert the DCP into a quicktime file for testing on your local computer with ffmpeg



Resolution:

First off there is aspect ratio. A flat 2k render is 2048x1080. But that is not what the 2k digital cinema projects at. The aspect ratio is 2.39:1, so actual render resolution is 2048x858.

Source Files:

Image:

DCP (digital cinema package) uses JPEG2000 format. Luckily there is a handy free utility called openDCP which can convert 16 bit TIFF files into JPEG2000. So when I rendered out my blender scenes, I made sure that I was exporting to 16 bit RGB TIFF files. Then using openDCP, I convert the individual frames to JPEG2000 files.

Audio:

I used the blender compositor to cut up and arrange my audio and export. The audio required for DCP  is a mono .WAV Signed PCM 24 bit format at 48k or 96k sampling rate file for each channel. I used Audacity to upconvert the mp3 files I exported. Make sure that you have a separate file for each channel. Stereo is 2 channels, 5.1 is 6 channels, etc.

There are other items you can do that I haven't touched yet as well.

Intermediate Files:

openDCP then lets you package your JPEG2000 files into a MXF file, as well as your audio source files into another MXF file. These are the 2 files that will be used to create your final DCP folder.

DCP Output:

One main thing I learned is that DCP is not a file. It is a series of files, some contain the data and others contain definitions of that data. The last thing you do with openDCP is combine all these items into your DCP. Once finished you are left with a folder with 6 files. This folder can be ingested into a digital cinema system and played back.

There are not many options for testing you DCP file on your local computer. EasyDCP player has a trial version that will let you play the first 15 seconds of a DCP. Which will let you know if it is working. But another thing you can do is convert your DCP into a quicktime file, to see what your output looks like. The newest builds of ffmpeg can convert MXF to Quicktime. The following line of code will do it.

ffmpeg -i videofile.mxf -i audiofile.mxf -c:v prores -c:a copy testfile.mov

Where the videofile and audiofile are the mxf files that were placed in your DCP folder.

Software


Thanks to the following websites who helped me piece this processes together.

Post a Comment