Welcome to our community

Be a part of something great, join today!

  • Hey all, just changed over the backend after 15 years I figured time to give it a bit of an update, its probably gonna be a bit weird for most of you and i am sure there is a few bugs to work out but it should kinda work the same as before... hopefully :)

Is this correct workflow DCP?

Avi Liani

Well-known member
Joined
Jan 11, 2011
Messages
92
Reaction score
0
Points
0
You can build a DCI compliant JPEG2000 digital cinema package using only open source tools with the work-flow outlined here. This post assumes you have all the necessary tools compiled and installed.


  • You can find the list of necessary tools here: Open Source Tools
  • You'll probably want to read up on compiling and installing the tools for your operating system

There are 4 main steps to creating a DCP:


  • Content normalization - Getting your content into JPEG2000 frames or MPEG2 and PCM WAV files.
  • Colorspace Conversion - Converting content into the XYZ colorspace. This only needed for JPEG2000.
  • MXF Container - Putting MXF wrappers around your content.
  • XML Descriptors - Generate XML files to describe content for ingest and playback.

Setup
For the purpose of this work-flow, we'll start with a 1920x1080p MPEG-4 file, called sample.mp4. You will need to have all of the tools compiled, installed and executable. The actual steps may vary slightly depending on your OS. The following are based on linux and you'll need to adjust them for your needs.

1. In the folder where sample.mp4 is located, create some directories to organize the intermediate files.

Code: [Select]
#mkdir audio
#mkdir tiff
#mkdir j2k
Content Normalization
The first step is getting your content into the right format. It is generally best to get your original source as close to the specification as possible. That is, while ffmpeg can convert the frame rate from 29.97 to 24fps, resize or change the aspect ratio, it is better to do this during editing or filming. If your editing package can export to a TIFF and 24-bit 48khz or 96khz uncompressed PCM wave files, then go to the next section. Your software may also export to JPEG2000. However, unless it will perform XYZ colorspace conversion and is DCI compliant, you'll want to export to TIFF.

1. De-mux the video into TIF frames. This command will create 24 TIF files per second in the tif folder. The %06d tells FFmpeg to create a 6 digit padded file name for each frame, 000001.tif, 000002.tif, etc.

Code: [Select]
ffmpeg -y -i sample.mp4 -an -r 24 -vcodec tif tif/%06d.tif
2. De-mux the audio into a wav file.

Code: [Select]
ffmpeg -y -i sample.mp4 -acodec pcm_s24le -r 24 -ar 48000 audio/sample.wav
A limitation of FFmpeg is that it doesn't allow you to write individual tracks, so you if want 5.1, 6.1, etc you'll need to split your sound into separate audio tracks with a program like audacity or quicktime. You can also use SoX (Sound Exchange) to split the audio tracks.

Code: [Select]
sox sample.wav left.wav remix 1
sox sample.wav right.wav remix 2
sox sample.wav center.wav remix 3
sox sample.wav lfe.wav remix 4
sox sample.wav surrleft.wav remix 5
sox sample.wav surrright.wav remix 6

Thanks jonathanj.

XYZ Colorspace
Now that we have an image sequence in the correct frame rate, we need to adjust the color from the original colorspace to the XYZ. You can use OpenDCP to do the color conversion and jpeg2000 creation in one step.

Use the tool opendcp_j2k to convert the TIFF sequence to a JPEG200 frame sequence. It takes an input folder containing your tif images and an output folder to save the XYZ color converted JPEG2000 images. You can set the frame rate and profile as well.

Code: [Select]
opendcp_j2k -i tiff -o j2k -r 24 -p cinema2k
MXF Container
Now, we have all of the content in the correct format for digital cinema. The next step is to place these inside media containers, in this case MXF. This part is a simple step to perform, but why it needs to be done can be a little confusing to understand for a lot of people. This is because it is easy to confuse the difference between and codec and a container. A codec is the method of encoding or decoding data, which in most cases is a way of compressing or decompressing data. The container only describes how elements are stored into a single file. The elements in a container could be anything, even other containers. A single MXF file could contain encoded audio and encoded video, but in the case of digital cinema, the audio and video elements are stored in separate MXF containers. As a result, you'll have an MXF file containing one or more audio files (wav files) and another MXF file containing one or more video files (jpeg frames).

We can use opendcp_mxf create the MXF wrappers.

1. Create the audio MXF file.
You can supply a single wav file on the command line or if you have multiple channels, a folder containing wav files. When supplying a folder, you to need map each wav file to the correct channel. This is done by prefixing each wav file with the channel number, so the software knows how to assemble them.

01 Left
02 Right
03 Center
04 Sub
05 Left surround
06 Right surround

So, we would simply prefix the file names.

Code: [Select]
Ex.
01_sample.wav (left channel)
02_sample.wav (right channel)
...

In our original example, we only have one audio file. We want to specify that we are using 24fps with the -r argument.

Code: [Select]
opendcp_mxf -i audio/sample.wav -o sample.audio.mxf -r 24
2. Create the video MXF file.
This will take all the jpeg frames in a directory and place them into a single file.

Code: [Select]
opendcp_mxf -i j2c -o sample.video.mxf -r 24
XML Descriptors
We now have two nice and neat MXF files. In a lot of cases, you'd have a single MXF that contained the audio and the video and that would be it. You'd give the MXF file to somebody and they could play it. However, in digital cinema, we need have a few more steps that are needed to tell the digital server what to do with the MXF files. This may sound redundant and just adds another level of confusion. However, we can quickly see the advantage with an example. Let's say you want to distribute your film worldwide in multiple languages. The video is going to be the same for all of them, just the audio would be different. So, rather than creating a single huge file for every language, we can keep them separate. We can use the same video MXF and include one or more audio MXFs, which can be linked together using XML files. This saves a lot of space and time.

We need to create 4 XML files, the composition playlist (CPL), package list (PKL), assetmap, and volume index. We can use OpenDCP to create these XML files.

OpenDCP will create all of the XML files in one step. You supply the MXF files and any additional tags. Only the --reel is mandatory.

Code: [Select]
opendcp_xml --kind feature --title SAMPLE_DCP --reel sample.video.mxf sample.audio.mxf
The END
That is it, you should now have a working DCP. The final step would be to get the content onto each server. That varies depending on the server. Some have utilities that upload the content over the network, support CD/DVD, USB drives, etc. If you using a storage medium, like a USB drive, you'll need to have it formatted in a way that it can be read by the server. A lot of servers use linux, which would use the ext3 format.
 
Tunji Ladoja sounds so strange for me that one can think fx 777 is more real than Tunji Ladoja, however I posted my real name in appropriate thread
 
Back
Top