How to use Open Source DCP tools to change the sound in a DCP (or make a DCP)

Outdated post: You can now open DCPs and change the picture and sound in Easydcp Creator.

I sometimes use the command line tool asdcp-test from Cinecert to change the sound in a DCP instead of making a new DCP from scratch in Easydcp Creator. This comes in handy if the DCP takes 8 hours to make and you are screening the movie in 2 hours and the sound must be changed. Another option is to encode the jpeg2000 sequence seperately in easydcp creator + or extract the jpeg2000 sequence with Easydcp Player or asdcp-test, then you can make change sound or subtitles and make a new DCP in Easydcp fast. You could also make a complete DCP with free tools like asdcp-test and opendcp.

To compile asdcp-test yourself:
Source for asdcp-test/ASDCPLIB:

There are also some old binaries for Windows of acdcp-test, Openjpeg and opencinematools here:

You can use instead of opencinematools. It includes Color space conversion.

To change the sound in a DCP:

Copy the compiled asdcp-test files to /usr/local/

Generate 4 GUID
with e.g.

Keep the movie mxf file with the jpeg2000 sequence from the first DCP and name it with the first GUID: 5f243728-ef5b-42ca-bad7-47b59b2aea01.jp2k.mxf

Then make a new sound MXF and name it with the second GUID: 47365f11-3a45-4f77-8389-f4a145aa232b.pcm.MXF with the 24 bit 48 khz wav sound files in this order: L,R,C,LFE,Ls,Rs.

/usr/local/bin/asdcp-test -p 24 -L -l 5.1 -c 47365f11-3a45-4f77-8389-f4a145aa232b.pcm.mxf sound.L.wav sound.R.wav sound.C.wav sound.LFE.wav sound.Ls.wav sound.Rs.wav

Then make the new metadata with opendcp

You may also use the windows software DCPC to make the CPL and PKL files metadata files.

Copy and paste these with the correct names to a bash script
or execute each command manually in terminal in the folder with the mxf files

Start the Bash script with
and use .sh in the filename, e.g.

Execute it the folder with mxf files with the terminal command sh
or execute each command manually in terminal in the folder with the mxf files.

This is the updated commands I used to make a 25 fps DCP:

Use terminal or make shell scripts that run these commands:
/usr/local/bin/image_to_j2k -cinema2K 24 -ImgDir foldername with Gamma and colorspace converted TIFF sequence/ -OutFor j2c

/usr/local/bin/asdcp-test -p 25 -L -c movie.jp2k.mxf foldername with jpeg2000 sequence

/usr/local/bin/asdcp-test -p 25 -L -l 5.1 -c movie.pcm.mxf folderwith5.1sound/sound.L.wav folderwith5.1sound/sound.R.wav folderwith5.1sound/sound.C.wav folderwith5.1sound/sound.LFE.wav folderwith5.1sound/sound.Ls.wav folderwith5.1sound/sound.Rs.wav

use opendcp or dcpc to package the dcp.

This how it was done in Opencinematools
/usr/local/bin/mkcpl --kind feature --title test25 --annotation test25 movie.jp2k.mxf movie.pcm.mxf > movie.cpl.xml

/usr/local/bin/mkpkl --issuer KESE --annotation test25 movie.jp2k.mxf movie.pcm.mxf movie.cpl.xml > mymovie.pkl.xml

/usr/local/bin/mkmap --issuer KESE movie.jp2k.mxf movie.pcm.mxf movie.cpl.xml mymovie.pkl.xml

6 Replies to “How to use Open Source DCP tools to change the sound in a DCP (or make a DCP)”

  1. The fps input in OpenJPEG (image_to_j2k) is used to set the maximum codestream lengths and maximum component sizes of each image. The DCI specification sets a max bit rate of 250 Mbits/s, so by increasing the fps, you need to decrease the maximum size of each image to ensure the max bit doesn’t get exceeded. By using 24fps when you create a 25fps DCP you run a possible risk of exceeding the limit.

    The math is as follows:

    250Mbits/s divided by 8bits/byte = 31.25Mbytes/s
    31.25Mbytes/s divided by 25frame/s = 1.25Mbytes.

    That means the maximum size of each jpeg image should not exceed 1.25Mbytes. You can check for any images larger than this. It really shouldn’t be a concern unless you have 25 consecutive frames exceeding 31.25 megabytes.

    The component size is a bit trickier to check for, you need to have something that will decode the component sizes of each image.

    It isn’t much work to add 25fps support to image_to_j2k. If you want details, let me know.

  2. Yes. 25 fps could possibly not work and 30 fps would be a real problem.
    I don’t if the servers can do higher bit rates than the specs.
    When i tested a 25 fps clip encoded with the 24 setting on the doremi it worked.
    An option would be to use the 48 fps 125 Mbits/s setting like I suggest in the post.
    But a modified 25/30/50/60 fps image_to_j2k would be great.

  3. I posted the source for a tool called opendcp_j2k, which will convert from tiff to jpeg2000 for any frame rate. This is essentially a replacement for image_to_j2k, but tailored to digital cinema. The input tiffs need to be 12-bit and already color converted if desired. The command line code was a quick hack, so let me know if you find any issues.

  4. Is it possible to decompile (or demux, don’t know what the appropriate term would be) in its primary assets? (jpegs, audio, subtitles)
    I’ve been asked by a prospective client if this is possible in order to add subtitles locally.
    Thanks and regards!

  5. You can extract jpeg2000 and wav files from the MXF files with asdcp-test. But it would be easier to use DCP mastering solutions with a repackaging option like Qubemaster Pro or Doremi Rapid.

  6. Hi, I have syncro on my files in the computer (same no. of frames, audio pulled up 0.1%). Once I make the dcp and test in easydcp player and the theater, the syncro is off. It´s weird because it gets worse and better thru the movie. Any suggestions would be greatly appreciated! thanks

Leave a Reply

Your email address will not be published. Required fields are marked *