Open Source 4K DCP creation – lessons learned

by - 2013/05/17 3 Comments Production

This is a report on how we realized the 4K DCP of Tears of Steel for theater distribution. Our tools of choice where:

  • Blender (generation of the 16bit TIFF frames)
  • OpenDCP (conversion of the frames to JPEG2000 and wrapping of picture and sound)
  • EasyDCP Player (checking integrity and specs of the DCP)

In this simplified process of DCP mastering we will go through few linear steps, such as:

  • Gathering raw images and sound in a DCI (Digital Cinema Initiative) compliant format
  • Wrapping them separately into mxf containers
  • Indexing and inserting them in the Digital Cinema Package
  • Quality control

First off we need to generate an image sequence of the whole short film, using an appropriate image format, such as TIFF 16bit sRGB. In our case we are talking about 17616 frames, taking 850GB of space. The 4K DCI compliant resolution for our aspect ratio is 4096x1716px.

Once the export has succeeded, we can convert that image sequence into a JPEG2000 12bit XYZ sequence (with a .j2c extension). In order to do this operation we use OpenDCP, a great Free tool that offers both a GUI and a CLI. Once converted, the image sequence for the short film will become around 12GB.

In order to speed up the process and skip the 16bit TIFF generation, we tried to export the edit in JPEG2000 XYZ directly from Blender (with the benefit of using a render farm) but the image format was not accepted by OpenDCP for the mxf wrapping. Hopefully this will be fixed in the future as it saves quite some time and storage space.

MXF wrapping

The next step is fairly simple and consists in wrapping the JPEG2000 sequence and the surround sound tracks (6 mono 48KHz wav) into two separate Multimedia eXchange Files containers. The operation can be accomplished with OpenDCP.

DCP creation and deployment

The last step consists in indexing the just created mxf files and giving a proper name to the DCP (so that it can be correctly handled by the Digital Cinema Servers). Open DCP gives good support also in this area.

Finally, the folder can be either zipped and uploaded to a location accessible to the DCS or copied (unzipped) into an ext3 formatted drive for direct ingest in the DCS.

Quality control

DCP making is a process that involves many steps. This means that any step can go wrong and should be quickly, flexibly and easily fixed. Most common problems regard image encoding, corruption and sound sync problems.

Since we did not have a Digital Cinema Server in the studio, nor a DCP Player (EasyDCP Player demo works only for the first 15 seconds of the film), we had to check the TIFF and JPEG2000 image sequences in a different way. We set up different blend files using the VSE in order to generate preview movie files with sound to check sync and bad frame issues (like the one in the header of this post, due to NFS issues when using too many Blender instances with touch and no-overwrite).

With a script we would delete one or multiple frame ranges simultaneously from the TIFF, JPEG2ooo and JPEG directories so that we could then run the TIFF export -> JPEG2000 and JPEG -> movie preview pipeline with the no-overwrite option on.

Some random tips

  • Make sure you have enough space in order to complete all the conversion operations
  • Make sure you have enough time to perform the actual conversions
  • Make sure you are following the specifications for image size and sound sample rate
  • Make sure you can run tests of the DCP a few days before the projection

Murphy’s Law

Other things that happened while making the DCP.

  • First DCP did not work because of JPEG2000 made with Blender did not have the right specs to be wrapped
  • Second DCP did not have sound because in the conversion process it got accidentally muted (and not checked in the movie file)
  • Third DCP had a sound offset of 2 frames for some reason
  • In the fourth DCP we tried to fix that by partially hacking the DCP xmls, but did not work either

The fifth DCP actually worked fine but then we had some other issues:

  • First ingest attempt failed because the Digital Cinema Mainframe was reading and indexing the whole hard disk containing many other things than the dcp itself (studio backup for example)
  • Second ingest attempt seemed to fail because the operator did not realize there was an import queue running on the Doremi DCS and we thought it was stuck, but in the end everything was fine (DCS could definitely improve that part of the interface)

All in all this was a good experience and hopefully this article will save some time to someone else trying to do the same. In the future it would be really great to have:

  • Blender being able to export good JPEG2000
  • A Free and Open Source DCP player! FFMpeg started to support mxf playback and XYZ to sRBG color transform, but nobody bothered putting together a simple interface to read DCP xml files and playback pictures and sound mxf files based on that

Many lessons learned!

  1. Sago says:

    Loving it! Recently we sent out a short animation for converting to DCP, and reading you guys did it yourself totally impresses me. Despite all the issues! Thanks

  2. J. says:

    The reason why the Blender JPEG2000s didn’t work is because the encoding parameters are very strict. (just like when encoding h.264 for Blu-ray)
    Making it work shouldn’t be too hard, I guess.
    What kind of sRGB to X’Y’Z’ LUT does Blender have? The formula OpenDCP uses can be found in its source code btw. :)

    Did you actually have to do something to fix the out of sync issue? Assuming that the audio files were OK and the CPL had no offsets, did you have 2 frames too little at the beginning of the JPEG2000 sequence?
    Murphy’s law can be killed by knowing who voted for it! (thus far my wisdom and intellectu… ehhh… brain farts! :P)

    Did you test different JPEG2000 bitrates? You’re only using half of what’s possible in a DCP. Don’t forget it’s 4K! ;)

    How satisfied are you with the results on the big screen?

  3. Paul says:

    I would also love for blender to have proper DCP jpeg2000 export options. It makes sense that you’d be able to export ’em without needing converting.

    You can play up to 3 minute DCPs with Stereoscopic player: http://www.3dtv.at/Index_en.aspx