Creating DCP package

Dolby DSP100 cinema server

Dolby DSS100 cinema server front panel

This is Dolby DSP100 cinema server. It is digital, meaning there is no film. This server feeds on digital cinema packages, or DCP:s. And this is what this page about.

DCP is an open standard. Anyone can create a software and use it for creation of DCP packages. I’ll try to share my experience on creating such package using only open source tools, available for free. Yes, it is possible to create such package and run it succesfully on the Dolby server. But there are some nuances you’d like to hear about. If you reading this text chances are that you are interested on creating such package by your own.

Few things for a start. A DCP package is a set of files. Soundtrack, videotrack are separated and accompanied with the set of XML descriptor files.

Video is packed into 12bit JPEG2000 format. Color space is XYZ, instead of RGB. Video can be stereo, or 3D.

Audio is packed into type1 PCM WAV 24bit, 48kHz. Can contain up to the 6 channels (5+1).

Ok, let’s start.

Step 0: some literature

Here are some useful links for a start. You can skip them, or you can read them while you have your files rendering.

Topic about DCP package creation on RedUser.net: http://reduser.net/forum/showthread.php?t=33118

That’s a looong conversation with many people sharing their experiences on creating DCP packages. Good to read. Also a good place to ask questions.

A blogpost about creation of the 2D DCP package: http://bitfilms.blogspot.com/2010/02/making-dcp-entirely-with-open-source.html

Pretty good blogpost explaining how to create DCP package using Open Cinema Tools. Doesn’t go into much details, assuming that you are already familiar how to create batch files and run those from command prompt.

Step 1: Tools

There aren’t much options if you want to create your own DCP packet. Frankly, there are two options.

Option number 1: Fraunhofer easyDCP Creator. You can download a trial version here:
http://www.iis.fraunhofer.de/EN/bf/bv/cinema/dcpcreation.jsp

Very friendly interface, works as charm. Trial version will insert a watermark to the top left corner, which will look like this:

dcp_player_logo

easyDCP watermark

Not a worst possible watermark. Full version costs about 2500€, that’s the price of removing the watermark from your phootage. EasyDCP Creator accepts TIFF and JPEG2000 image sequences. EasyDCP+ supports stereo image sequences. Usage is straightforward – just load all the sequences, audiotracks, then press big friendly button and wait for some time. Your package is done.

Option number 2: Open Cinema Tools. Open source tool for creating DCP packages. Totally free.

This page will explain how to use Open Cinema Tools together with some other tools to create a complete working DCP package for the cinema.

So, the tools:

ImageMagick: http://www.imagemagick.org/script/convert.php
Open JPEG2000 converter: http://code.google.com/p/openjpeg/
LibTIFF3.DLL: http://gnuwin32.sourceforge.net/downlinks/tiff.php
Open Cinema Tools: http://code.google.com/p/opencinematools/

Optional tools:

Far Manager: http://www.farmanager.com/
Name Wizard plugin for Far Manager: http://plugring.farmanager.com/downld/files/nwiz10.rar

Far Manager is perfect for managing lots and lots of files in different directories. Name Wizard plugin is the tool for renaming bunch of files. If you decide to use those, take the older Far Manager build – this one for example: http://plugring.farmanager.com/history/files/FarManager170.exe . Thing is that old plugins doesn’t work with the new 2.0 Far Manager.

Couple of words about Open Cinema Tools. They have a nice issues list with discussions on the project. It is located here: http://code.google.com/p/opencinematools/issues/list . As of now this project fully supports SMPTE compliant DCP packages. Then again if we want to create an interop 3D DCP package, we’ll have to do some chanting and shaman’s voodoo. But it’s not that hard. After all, you have this instructions.

Step 1: The image

Screenshot from a Christie projector

Dolby DSS100 screen

This is a screenshot from the resolutions supported by Dolby DSS100 server.  In digital cinema pixel sizes are a bit different from the film world.

I’ve been using 1998×1080 resolution for my 3D package. There is an option on projector to show it in widescreen scope – then the image will be cropped. So, this resolution is used in our primer.

Export your image sequence into the uncompressed TIFF, with 1998×1080 pixels resolution. Desired bit depth – 12 bit. Color space – RGB.

Next step – transforming our TIFF sequence into the cinema compliant sequence. Killing the possible alpha channel, converting color space into the XYZ, and making the bit depth 12 bit. ImageMagick is the tool.

For this create a new .bat file:

MD converted
FOR %%a in (*.tif) DO convert %%a -type TrueColor -alpha Off \
-depth  12 -gamma 0.454545 -recolor "0.4124564 0.3575761 \
0.1804375  0.2126729 0.7151522 0.0721750 0.0193339 0.1191920 \
0.9503041" -gamma  2.6 converted\cnv_%%a
PAUSE

Note: you have to remove all the slashes from the command, otherwise it will miserably fail on launch. Alternatively download the bat from here: http://www.stereofinland.com/DCP/tif_DCP_convert.bat

DCP_creation_02

Converting TIFF sequence

Copy this bat file into the directory with your tiff sequence. Run it, and the script will convert every single tiff it finds. New tiffs will be stored in the \converted folder. Don’t be scared by the greenish color of the frames – that’s the result of converting the color space into XYZ. They all be looking fine on the cinema projector.

Now we are ready to create a JPEG2000 sequence. If you have installed Open Cinema Tools, you have image_to_j2k.exe already in the \opencinematools-1.1.2\bin. Add the path to your OCT installation to the PATH environment variable.

image_to_j2k.exe can be run with two different options depending on whether you create a 3D package or 2D. The cinema server has a top limit for the bitrate, and with dual image stream for stereo the bitrate is doubled. So.

For stereo image sequence use this:

MD jpeg2k
FOR %%a in (*.tif) DO image_to_j2k -cinema2K 48 -i %%a -o jpeg2k\%%a.j2c -OutFor j2c
PAUSE

For normal 2D sequence use this:

MD jpeg2k
FOR %%a in (*.tif) DO image_to_j2k -cinema2K 24 -i %%a -o jpeg2k\%%a.j2c -OutFor j2c
PAUSE

The only difference here is the 48/24 framerate argument. It has to be 48 for 3D, and 24 for 2D. Again you can download a bat file here: http://www.stereofinland.com/DCP/DCP_j2k_convert.bat (with 48 fps argument).

DCP_creation_03

Converting image sequence to JPEG2000

Don’t be alarmed if some of the files will have a size of 1.5kb. That’s the JPEG compression with the totally black frames. For me the conversion took about 2.7 seconds per frame. You might want to use IrfanViewer for checking out the j2c images.

If you do the stereo, you’ll have to run this for both eyes accordingly.

Step 2: Sound

The idea is that every sound channel is separated in its own mono wave file. Again, parameters are:

  • 24 bit
  • 48 kHz
  • Mono
  • PCM WAV type 1

I did it in Adobe Audition CS3. I had a stereo WAV as master, so I had to separate channels in two mono waves. Audition can do it, Sound Booth can do it too.

Exporting to WAV

On a screenshot you can see how you select the almost correct setting for the exported WAV. Almost meaning that there is 32-bit type selected on a screen, while you need only 24 bit. Please note – Open Cinema Tools won’t accept anything but the 24 bit type 1 PCM WAV.

Step 3: DCP package creation

Some notes before we move on. There are two different standards or ways of packing the materials into DCP package. First is called SMPTE, second is Interop. First one is considered old, second one is kind of new. Why this matters? First of all, Open Cinema Tools at the moment fully supports only SMPTE type of the DCP packages. Second thing is that today Dolby DSS100 servers are not supporting SMPTE type of the DCP packages. Actually, they should start supporting those after the recent firmware upgrade. In any case, I had to go with the Interop option to get the package played on the Finnkino’s cinema server.

For SMPTE option you could use the UI of the Open Cinema Tools:

Open Cinema Tools UI

You can even provide a TIFF sequence, and it will convert it to the JPEG2000. Unfortunately, at the moment if you are doing the stereo 3D, OCT will encode image channels with the wrong bitrate argument – with 24 fps instead of 48. This will likely make your package unplayable. Again, haven’t tested this on an actual server. But if you don’t have an easy access to the Dolby server, you will want to follow every possible standard to get the package playing.

So, Interop DCP. The package actually consists of mxf and xml files. This is how the final content should look like:

DCP package content

Generating audio MXF:

asdcp-test -v -c PROJ.audio.mxf left.wav right.wav

left.wav and right.wav are the separated sound channels accordingly. You could also provide all 6 channels of the 5.1 mix. Note that asdcp-test can be used with -L switch to activate SMPTE compliant package creation. L stands for legacy.

Generating video MXF:

asdcp-test -v -3 -c PROJ.video.mxf j2k_left j2k_right

j2k_left and j2k_right are the folder names with JPEG2000 sequences for left and right eye accordingly. Instead of providing two channels, you could provide only one and get a 2D MXF video track. -3 switch is for 3D stream. Again here you could use -L switch for SMPTE compliant DCP package. Without it you get an Interop one.

OCT contains tools for creating all the necessary XML files. This is were the difference between SMPTE and Interop is rising. OCT is unable to generate Interop compatible XML files, at least at the moment. That’s why we create those ourselves.

Ok, just 4 simple XML:s.

VOLINDEX:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VolumeIndex xsi:schemaLocation="http://www.digicine.com/PROTO-ASDCP-VL-20040311# VolumeLabel.xsd" xmlns="http://www.digicine.com/PROTO-ASDCP-VL-20040311#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Index>1</Index>
</VolumeIndex>

ASSETMAP:

<?xml version="1.0" encoding="UTF-8"?>
<AssetMap xsi:schemaLocation="http://www.digicine.com/PROTO-ASDCP-AM-20040311# asset_map.xsd" xmlns="http://www.digicine.com/PROTO-ASDCP-AM-20040311#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Id>urn:uuid:a31e2b97-52b6-4c0f-9f73-5ca29e9ed51d</Id>
	<VolumeCount>1</VolumeCount>
	<IssueDate>2010-05-04T08:21:52-00:00</IssueDate>
	<Issuer>Karisma Films Ltd</Issuer>
	<AssetList>
		<Asset>
			<Id>urn:uuid:3ebd4225-45a9-4e4c-8009-37a403859d4e</Id>
			<ChunkList>
				<Chunk>
					<Path>PROJ.video.mxf</Path>
				</Chunk>
			</ChunkList>
		</Asset>
		<Asset>
			<Id>urn:uuid:fcce20b7-3d99-4be5-8986-811ca3ec634d</Id>
			<ChunkList>
				<Chunk>
					<Path>PROJ.audio.mxf</Path>
				</Chunk>
			</ChunkList>
		</Asset>
		<Asset>
			<Id>urn:uuid:f13aa789-c48c-454f-ba37-fff2d140cf02</Id>
			<ChunkList>
				<Chunk>
					<Path>WARP.cpl.xml</Path>
				</Chunk>
			</ChunkList>
		</Asset>
		<Asset>
			<Id>urn:uuid:2f6279a9-4355-4479-8032-096d9eda95a7</Id>
			<PackingList/>
			<ChunkList>
				<Chunk>
					<Path>WARP.pkl.xml</Path>
				</Chunk>
			</ChunkList>
		</Asset>
	</AssetList>
</AssetMap>

PROJ.cpl.xml :

<?xml version="1.0" encoding="UTF-8"?>
<CompositionPlaylist xmlns="http://www.digicine.com/PROTO-ASDCP-CPL-20040511#">
	<Id>urn:uuid:f13aa789-c48c-454f-ba37-fff2d140cf02</Id>
	<IssueDate>2010-05-04T08:21:52-00:00</IssueDate>
	<Issuer>Karisma Films Ltd</Issuer>
	<Creator>Karisma Films Ltd</Creator>
	<ContentTitleText>Warp3D_XpanD</ContentTitleText>
	<ContentKind>test</ContentKind>
	<RatingList/>
	<ReelList>
		<Reel>
			<Id>urn:uuid:90588e76-a72d-4478-b24c-7bca844e5def</Id>
			<AssetList>
				<MainSound>
					<Id>urn:uuid:fcce20b7-3d99-4be5-8986-811ca3ec634d</Id>
					<AnnotationText>2 channel audio: left.wav, right.wav</AnnotationText>
					<EditRate>24 1</EditRate>
					<IntrinsicDuration>2601</IntrinsicDuration>
					<EntryPoint>0</EntryPoint>
					<Duration>2601</Duration>
					<Hash>dYWK60yaiP5YmIwzClR1AVzXL3I=</Hash>
				</MainSound>
				<msp-cpl:MainStereoscopicPicture xmlns:msp-cpl="http://www.digicine.com/schemas/437-Y/2007/Main-Stereo-Picture-CPL">
					<Id>urn:uuid:3ebd4225-45a9-4e4c-8009-37a403859d4e</Id>
					<AnnotationText>WARP3D_TST_F_EN-XX_FI-XX_20_2K_KF_20100504_OV</AnnotationText>
					<EditRate>24 1</EditRate>
					<IntrinsicDuration>2602</IntrinsicDuration>
					<EntryPoint>0</EntryPoint>
					<Duration>2602</Duration>
					<Hash>I3wOAyimAQNe9SOjfdLeWR0gsm4=</Hash>
					<FrameRate>48 1</FrameRate>
					<ScreenAspectRatio>1.85</ScreenAspectRatio>
				</msp-cpl:MainStereoscopicPicture>
			</AssetList>
		</Reel>
	</ReelList>
</CompositionPlaylist>

PROJ.pkl.xml:

<?xml version="1.0" encoding="UTF-8"?>
<PackingList xmlns="http://www.digicine.com/PROTO-ASDCP-PKL-20040311#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.digicine.com/PROTO-ASDCP-PKL-20040311# PackingList.xsd">
	<Id>urn:uuid:2f6279a9-4355-4479-8032-096d9eda95a7</Id>
	<AnnotationText>WARP3D_TST_F_EN-XX_FI-XX_20_2K_KF_20100504_OV</AnnotationText>
	<IssueDate>2010-05-04T08:21:52-00:00</IssueDate>
	<Issuer>Karisma Films Ltd</Issuer>
	<Creator>Karisma Films Ltd</Creator>
	<AssetList>
		<Asset>
			<Id>urn:uuid:3ebd4225-45a9-4e4c-8009-37a403859d4e</Id>
			<AnnotationText>WARP3D_TST_F_EN-XX_FI-XX_20_2K_KF_20100504_OV</AnnotationText>
			<Hash>I3wOAyimAQNe9SOjfdLeWR0gsm4=</Hash>
			<Size>2978915235</Size>
			<Type>application/x-smpte-mxf;asdcpKind=Picture</Type>
			<OriginalFileName>PROJ.video.mxf</OriginalFileName>
		</Asset>
		<Asset>
			<Id>urn:uuid:fcce20b7-3d99-4be5-8986-811ca3ec634d</Id>
			<AnnotationText>2 channel audio: left.wav right wav</AnnotationText>
			<Hash>dYWK60yaiP5YmIwzClR1AVzXL3I=</Hash>
			<Size>31280714</Size>
			<Type>application/x-smpte-mxf;asdcpKind=Sound</Type>
			<OriginalFileName>PROJ.audio.mxf</OriginalFileName>
		</Asset>
		<Asset>
			<Id>urn:uuid:f13aa789-c48c-454f-ba37-fff2d140cf02</Id>
			<Size>1525</Size>
			<Type>text/xml;asdcpKind=CPL</Type>
			<OriginalFileName>WARP.cpl.xml</OriginalFileName>
		</Asset>
	</AssetList>
</PackingList>

You can also download the sample XML:s here: http://www.stereofinland.com/DCP/DCP_xmls.zip

These XMLs are very much readable, that’s the benefit of XML. Still you will have to change lots of things according to your MXF data. And first thing is the correct urn:uuid:s.

When creating an MXF, asdcp-test generates a random urn:uuid, and adds it into the MXF file. To get this urn:uuid out of the generated MXF, try this:

asdcp-test -H -3 -i PROJ.video.mxf

This will print out lots of metadata you are not interested in, and finally – AssetUID with the desired urn:uuid. This is what you need to put into XML:s.

asdcp-test metadata printout

Run this for both audio and video mxf:s. Rest of the uid:s you can select randomly. Asdcp-test can generate those random uid:s like this:

asdcp-test -u

You will need also new hashes for both MXF:s and a PKL.XML. As far as I understood, hashes are optional. Meaning that you can leave the whole section out. I had to do it for the pkl.xml, and it worked just fine. Still if you have a big sized MXF:s (usually speaking about gigabytes of data), it’s good way to make sure that the data is not corrupted.

For generating new hashes you’ll need an OpenSSL. Get it here: http://www.openssl.org/

To generate a new hash, run these two commands with the desired file:

openssl sha1 -binary -out sha.bin PROJ.video.mxf
openssl base64 -in sha.bin -e

This will print out the hash of the current file.

If you wonder where this AnnotationText value came from, check out this site on naming conventions in the DCP world: http://digitalcinemanamingconvention.com/

It’s not that strict, and the server will playback your DCP even with some gibberish in the AnnotationText field. At least I had no problems with that.

Step 4: Testing

Testing is always a good idea. Assuming you don’t have constant access to the  Dolby cinema server, there are following options of testing:

Fraunhoffer easyDCP player. Get the trial version here: http://www.iis.fraunhofer.de/bf/bv/cinema/31749.jsp

It’s good because it’s free. The trial version, I mean. And it will display warnings for your DCP package, if there are any. You can play first 15 seconds of the video and audio. It won’t support 3D, and it won’t support converting XYZ to RGB in the trial version. (supports all this stuff in the full version).

Stereoscopic Player. Get the trial here: http://www.3dtv.at/Index_en.aspx

Stereoscopic player started recently supporting playback of the DCP MXF files. It supports 3D, and it converts XYZ to RGB on the fly. The flipside is that it won’t display you warnings if there are any problems with your XML files.

Rule of thumb: If your DCP package is playing nicely on Stereoscopic Player and easyDCP player, it doesn’t mean that it will play 100% on Dolby Server. So check your uurn:uids couple of times.

Step 5: Transferring DCP package to cinema server

Dolby cinema servers are using ext2fs (or is it ext3fs?) as the internal file system. Because of that most of the instructions recommends formatting your flash stick / mobile hard drive to the ext2fs. In practice I had no problems with the flash stick formatted to NTFS and HFS (Mac OS). FAT32 is not understood by the server. So, choose from ext2fs/ext3fs, NTFS or HFS. There is a tool called Paragon Partition Manager, which can format your media into desirable file system format. Works pretty good.

It is also not mandatory to copy all the files of the DCP package to the root directory. You can place those into a folder, and server will detect it.

If everything is good, server will copy, verify and playback your DCP package without problem.

Dolby DSP100 cinema server

Copying the DCP package to server

It’s a good idea to have a netbook with you. If there are any problems, you can check and edit your DCP package. Just install the OCT tools beforehand.

Conclusions

It’s fascinating that today you can create a cinema quality delivery at your home PC. 12 bit colors, full 2K resolution – not a problem anymore. The DCI standard is open, and this means anyone can create valid DCP packages for the cinema.

Then again there aren’t many options. easyDCP+ is a good option, but it cost way too much. At least for an average indie filmmaker. Our local post-production houses are charging ~300 eur / minute of photage for conversion to DCP. And they do it too with the easyDCP+ software they own.

Open Cinema Tools is a valid utility for DCP packages creation. It is an open source. It lacks some polishing, good looking UI. It sort of tempting for me to do a good looking front end for this tool. But then again you need a cinema server for testing, which I don’t really have. Everything mentioned in this primer can be automated – with more elaborate bat files and macros.

Hope this will help someone to get his/her movie to the cinema screen.

Google ReaderFacebookDeliciousGoogle GmailTwitterLiveJournalShare