The DCP USB on a Mac; CineTechGeek to Digital Cinema Tools, v1b

First, let’s examine in more detail the problem that is being solved.

The Digital Cinema Package, or DCP, is the actual movie in a format that is transported from post production to the projector. It has been in use for over a decade, so one would think that the DCP is well defined and easy to create and use. But Alas~! it is not true. The insides of the DCP has been in transition, and leading to further revision, for much of its life. So, depending on when you picked up the story, it is only somewhat well defined and, it is in transition again. A DCP is easy to create, after perhaps the dozenth time that one tries. But there are are many variations of equipment that it needs to play on, and each of those have evolved in different ways. Some will accept any attempt, some will be very strict. Thus, a DCP that plays on one system …or one set of software on one system… will not necessarily play on another brand or version of a different…or even the same brand of equipment.

So we get stories of DCPs that need re-wraping during a Film Festival which, after great frenzied work by the festival techs, gets it to run – but the DCP doesn’t work 2 weeks later at another festival. Or, when the director takes the DCP that his editor or kid brother created – a DCP that worked once somewhere – a professional house won’t accept it for duplication without charges for repair. Have you ever had your car’s transmission repaired and been told that you have to spend a grand just to drop it down and look inside? …drop that DCP down…

Second, there is a problem that often occurs when inserting a USB drive into a Macintosh computer. The problem isn’t a problem for the Mac, of course, but rather a solution that causes problems for other systems. What happens is that the Mac OSX operating system tries to put an index of drive and other user-cuddly info into invisible files. It will even make invisible thumbnail versions of graphics files. Not a problem until they are a problem – they can sometimes confuse the heck out of other systems, both Windows and Linux.

Part two of the Mac problem is that most often a USB drive that has been properly formatted for a DCP won’t open at all on the Mac – which, given the problems it creates with invisible files, is probably a good thing. But the bad news is that if you have made a DCP on your Mac with one of the many DCP creation programs, what do you do with that file? In an imaginary ‘best of worlds’ one just inserts a USB stick or drive into the slot, the drive opens and one drags the file to the USB device. 

It is a goofy world out there for disk formats. Many companies don’t want to pay for proprietary formats, or can’t use anything but open source tools. There are exceptions and work-arounds. The standard USB drive that is formatted with the standard Windows NTSF format can be read by OSX, but not written to, unless a 3rd party extension is installed. The standard USB drive that is formatted with the standard Linux ext format can’t be read or written to from the Mac unless a 3rd party extension or the open source FUSE extensions are put into the system.

While either of these solutions might make it simple to exchange files, having them on the OSX system will cause a problem when using the solution that James details. If someone is able to contort the FUSE system to make your mac read and write to an ext formatted USB drive, more power to you. Getting it to read is fairly straight forward, but it means that the Mac will be able to grab the drive before that drive can be grabbed by the tools in James’ solution. Not impossible, but a bit wonky and not always simple. Since we’re going to use the Ubuntu system for other purposes, we’ll stick with moving forward with James’ install advice, skipping the idea of adding FUSE or other extensions to the Mac.

Take home lesson, if nothing else:

If you put in a USB stick or drive which might have a DCP on it, and the Mac tells you, “The disk you inserted was not readable by this computer”, the option that you want to choose is “Eject”. That way OSX will release the drive without trying to write to it, and allow another operating system to grab it.
In other words, the Mac will place invisible files on the drive with the DCP, and these invisible files have the certain opportunity to cause havoc.  

If you don’t get to eject the file, then this will not be a ext formatted drive, in which case, happy formatting…


James choses the free VirtualBox program instead of Parallels Desktop or VMWare Fusion for creating the virtual machine. In slow-person-talk that means that there will be a 2nd operating system put onto the harddisk – in this case the Linux variant named Ubuntu 14 – and in order to do all the work of keeping Ubuntu from messing with OSX while it shares the network and hard drive and wifi, etc., it needs a software device that Ubuntu can be placed “into”. 

Go to https://www.virtualbox.org and click on “Downloads” on the left side. You’ll see a small clickable “amd64” note next to the “OSX hosts” line. You’re thinking, I know enough to know that my Mac has an Intel, not an AMD chip, right? As it turns out, AMD wrote the spec and while different companies use different notations to hide that, VirtualBox uses what we will eventually get used to as the standard notation, amd64. Download the file and install it as James describes. Don’t add too much memory if you don’t have much to spare or you’ll get yelled at. 

Then, as James points out in the video, install the VM VirtualBox Extension Pack by downloading it and double clicking on it and following the directions. Since you will be using your username in other procedures, keep it simple: the best suggestion is to use your initials. With luck the two programs will talk to each other and everything will work together. Eventually, when VirtualBox tells you to upgrade, don’t ignore the reminder – upgrade the Extension Pack right away. Otherwise your USB drives won’t work and you’ll be rebooting and kicking yourself while trying to get in sync again. 

Side note: What’s with this big Oracle logo on the VirtualBox product site you might be asking. Isn’t Oracle that huge company who everyone has a brother or cousin or nephew/neice working for? And the answer is yes. Oracle got VirtualBox from their purchase of Sun Micro along with Java and MySQL. All three are variants of free and Open Source, and Oracle does a very good job of servicing the community with these tools.


Next is the free and open sourced operating system named Ubuntu. James’ advice is that you follow the instructions for leaving Ubuntu as an .iso file, which will then fire up like an operating system on a CD or DCD would. This saves space if you are only going to use this solution once or twice a year. Which makes sense. But if you are going to make DCPs of pre-show slides then you might want to install the free and open source “Digital Cinema Tools” from Wolfgang Woehl which includes the versatile and easy to use “CinemaSlides” program.

If you choose this route, install the program as standard instead of as an .iso boot drive. Follow the rest of his instructions. That is, up until the spot where he starts connecting with the network. We’re going to use the Shared Folders method instead. It is a bit more simple to use for us punters. 

First step to make an easy to access Shared Folder on the Mac computer make a new folder using the Mac Finder. Drag the new folder over to the Sidebar. (If the Sidebar isn’t open when you have a Finder window open, Option-Command-S will open it. 

Go to ubuntu.com, click on the Download tab (on the far right) and pull down to Desktop. If the flavour says 64-bit, click the download button. Find it and put the file into your new Shared folder…its right over there in the sidebar.

Now, with Ubuntu running and on top, choose Devices from the VirtualBox top menu. Pull down to Shared Folders. On the Shared Folders window, there is a ‘plus sign’ on a folder icon – click this. Pull down “Folder Path” to “Other”. You will see the Mac Finder window and your new folder in the Mac Sidebar~! Miracle, eh? Anything put into this folder will be available from both sides.

Now, how to make this directory/folder easily accessible on the Ubuntu side? If there is no Finder window, click on the Folder icon on the top left of the screen…a couple icons down from the three dots. On the Sidebar, click on Computer, which is in the Devices section. There will be a Folder or directory named Media, and in this Folder is your Shared Folder. Open that Folder, then click Control-D. Magic again. Under the Bookmark section of the Sidebar will be your shared folder.  


As far as using the Terminal to make an ext formatted USB drive, James has basically nailed it.

The first problem that you will encounter is knowing what the operating system calls your USB drive. Some will say to use a command sudo fdisk -l, which gives a lot of information…the last line of which is likely about your USD drive. In the following case, you can see that my USB disk, the one that I will be formatting, is called /dev/sdb1

[Note Note Note Note Note: Make certain that the drive is not originally formatted with FAT32. FAT32 has a 4 Giga Byte file limit. Formatting the drive with the following over a FAT32 base will give a problem when your files exceed 4 Gigs. End Note.

Note 2: If you are trying to copy and paste between the Mac and the VirtualBox Ubuntu Terminal window, you can Copy as normal with a Cmd-C, but pasting in the Ubuntu Terminal window must be done with a Control-Shift V.

A more complicated command, but with much simpler exposition of the the partition name and path is (cut from this with your usual command keys, but in Ubuntu your Paste keys will be Control-Shift-V):
    sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

So, we know that my USB stick is named sdb1, and is already formatted with vfat at the factory.
Armed with this info, the first step – before making the file system (mkfs) – you must unmount the drive
    sudo umount /dev/the_partition_name_found_with_the_above
In this example, that would be sudo umount /dev/sdb1

 The ISDCF document mentions a slightly different nomenclature for the command line than James does,

mkfs -t ext3 -I 128 -m 0 /dev/xddN

And here are some other commands that work, including the one that James is using. Myself, I prefer the last one since it allows you to name the partition as it is being made.

sudo mkfs.ext2 -j -I 128 /dev/sda1 – the basic difference between ext 2 and 3 is journaling, so this adds journaling to ext2

sudo mke2fs -t ext3 -I 128 -L DCPs 0 /dev/sdb1 – slightly different command set

sudo mkfs.ext3 -I 128 -m 0 -L your-chosen-name-of-drive /dev/sdb1 – this one adds a disk name (change “DiskName” to ‘my_dcp_drive’ or whatever name you want to give it) while formatting and partitioning…change that ‘sdb1’ to the proper partition number.

Formatting the disk is not so quick – Those Superblocks might take a few minutes to assemble.  

Follow up by giving permissions to the folder with: (755 is usually recommended, but I use 777 for myself)
    sudo chmod -R 777 /media/USR_NAME/your-chosen-name-of-drive

You’ll have to Mount the disk first, which is done either at the bottom in the Ubuntu Dock (did you install a dock?) or by using the little plugin character at the bottom right of the VirtualBox window. 

There is a simple way to find out the exact trail – Roll over the name of the drive in the sidebar.
Since I don’t actually log in as ‘root’ all the time, and since I just make test files, I like to keep my permissions much more loose. I use 777 instead of 755. 

As an option, if indeed it is your drive, you can sudo chown owner:owner /media/owner/your-chosen-name-of-drive

In the above command, put your name twice, such as ‘cj:cj’, then ‘/media/cj/ctt_dcps’

And finally, in the Virtualbox menu, pull down Devices down to USB, then USB Settings. It will open a window…click on the plug icon that has the plus ‘+’ sign, on the right hand side of the window. The brand of the USB Flash Drive will appear at the bottom of the list. Click the checkbox next to the drive then click OK. From then on, if you put in the drive after Ubuntu is booted and ready to go, the drive will mount without going through the Apple OS, eliminating a step and the dangerous possibility of putting invisible files on the USB drive that could complicate the servers that you need to put DCPs on.

Using Your New Drive

Ubuntu may or may not make a big deal about automatically mounting the USB drive. You might have to go to the USB plug icon on the bottom right of the VirtualBox window and make certain that the drive has a check mark next to it. Or, it may be mounted but you didn’t notice that it appeared at the bottom of the Dock that is along the left side of the screen. Jeesh…there is a lot more going on with computers than what my grandfather had to teach Edison. Sometimes there is no solution but to reboot Ubuntu.

But the main thing is that you can transfer files from the “shared folder” on the Mac where you are making your DCPs to the UBB drive that will move them to the media server.


 Further updates to this article will include:

The command is: 

Coming up as this article evolves – installing and using CinemaSlides.

Getting out of problems.


This is copied from the marvelous Digital Cinema Tools website of Wolfgang Woehl

See Digital Cinema Tools Distribution for an easy-to-use Setup script. It will install everything required (batteries included) to use dcp_inspect, cinemaslides and a bunch of other useful tools related to digital cinema.

Please consider contributing to Testing encrypted DCPs and KDMs.

The real trick that he gives is an incredible Digital Cinema toolset, and now that you have Ubuntu running, open Terminal, paste in the following command and hit Return. 

wget http://git.io/digital-cinema-tools-setup && bash digital-cinema-tools-setup

Mind the && in there. When finished type the following and hit return

exec $SHELL

and you’re done. But what have you done?

You’ve installed asdcplib, ruby, openjpeg, nokogiri, and other libraries, plus dcp_inspect, cinemaslides, a cinemacertstore, and other items in the digital cinema tools toolset. I think that I even remember seeing graphicsmagick go by there.

Make a Slide Presentation is the next topic in this evolving piece. Here is a command line that makes a DCP that I have put into Terminal in Ubuntu recently. What do we need to set up to make that work, I wonder? My guess is making files with Audacity and Keynote, putting them into the Shared Folder, then blending them together to make a friendly DCP…maybe we will even check it with dcp_inspect.


Here is a command that I give in Terminal to make a DCP of slides to warn any lingering mortals that the automated test tool is going to start an audio test. We’ll review what it all means.

cinemaslides –type dcp “/media/sf_shared_w_ubuntu/wav_files/audio_warning_chirp-18.wav” “/media/sf_shared_w_ubuntu/tiff_slide_masters/Audio Warning Slides” -x cut,3.33 –title DXG_Audio_Warnings-18 –annotation DXG_Audio_Warnings-18 -o /media/sf_shared_w_ubuntu/DCP_Finals/DXG_Audio_Warnings-18

Explication: cinemaslides is obviously the name of the program that we are going to invoke and dcp is the type of item that we are going to create. From where will it grab all this stuff…the next two parts tell cinemaslides where to find the .wav file and where to find a folder of slides. We are going to cross between them with a cut every 3.33 seconds (this will be a 20 second warning.) The name of the dcp follows, and how it is annotated internally and what to call the file for human readable purposes closes out the command. And look…the file is being placed in a folder within the Shared Folder named DCP_Finals…and made from files that are in the Shared Folder as well. 

So, the set up is, create a set of directories using the mac finder named tiff_slide_masters and wav_files and DCP_Finals

Make a wav file using audacity and store it in the wav_files folder. (A document will be posted in the next few weeks showing how to do that.)

Make a set of slides using Keynote (or Powerpoint or LibreOffice) and save them as tiff files. Put them in the tiff_slide_masters folder. (Another article will flesh this process out a bit more as well, but suffice to say that you should start with a 2048×1080 slide. Do what seems logical and Bob’s your uncle. Myself, I have to set up a Skype call with my dad and my Uncle Bob so that happy birthday wishes can ensue. More later.)

Finally, navigate to the DCP_Finals directory (folder), sort by clicking on the Modified header, drag the file to the USB drive on the sidebar, and let it copy over.


A great resource: Knut Erik Evensen’s site: THE BEST COMMON PRACTICE TO DELIVER A DIGITAL CINEMA PACKAGE (DCP)

 

A follow-up article: Validating a DCP

Leave a Reply