Please login or register. November 14, 2018, 08:30:54 AM

Author Topic: Open Source Tools  (Read 38732 times)

Terrence Meiczinger

  • Administrator
  • Hero Member
  • *****
  • Posts: 560
    • View Profile
Open Source Tools
« on: April 28, 2010, 09:06:26 AM »
You can build a DCP using only open source tools. Depending on your OS, it may be simple to install these tools or not. In some cases there may be pre-built binaries available and in other cases you'll need to compile them. This can be a daunting task, but all the tools have been built by somebody at some point on Linux, OS X, and Windows.

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 Wrap - Putting MXF wrappers around your content.
  • XML Descriptors - Generate XML files to describe content for ingest and playback.

There are open source tools available to accomplish each of these steps. In some cases, there may be several ways to perform a task. A lot of hard-work by many individuals has helped establish a pretty good work-flow.

The tools are:

  • FFmpeg (http://www.ffmpeg.org/)
    FFmpeg can convert all the major media formats into MPEG2, image sequences (PNG/TIFF) and demux the audio into PCM wav files. FFmpeg can also be used to change the frame rate, crop/resize a sequence, and all kinds of other audio and video manipulations.

  • ImageMagick (http://www.imagemagick.org/)
    ImageMagick can convert your image sequence, created by FFmpeg, Final Cut, Quicktime, etc, into the proper XYZ colorspace and gamma. ImageMagick can also perform image manipulation such as cropping, re-sizing, padding, etc. This done using a tool called 'convert' that comes with the library.

  • OpenJPEG (http://www.openjpeg.org/)
    OpenJPEG will take an image sequence, usually TIFF, and convert them to DCI JPEG2000 frames using a tool called 'image_to_j2k'.


  • OpenDCP (http://code.google.com/p/opendcp/)
    OpenDCP is available in GUI or CLI versions that will create the XML files (content playlist, packing list, assest map, volmap) for ingest and playback of your content. It will create jpeg2000 images from tiff files and perform XYZ color conversion and create the MXF files.

  • SoX (http://sox.sourceforge.net/)
    An open source sound processing tool and library. It can be used to split multi-channel audio files into separate wav files.

  • Cinemaslides (http://wiki.github.com/wolfgangw/digital_cinema_tools/cinemaslides)
    Cinemaslides is a nice program  that will create a slideshow packaged DCP from a series of images. This is useful for pre-show advertising. It is written in Ruby and uses the other open source tools listed. There is also great information about all aspects of digital cinema, including KDM generation.

Each of these tools may require one or more additional libraries. Compiling and installing these tools is covered in another thread.

Once you have installed or compiled all the necessary tools, you can start the DCP creation process. Be aware, creating DCPs is a process intensive task and it can take a long time to render files. The process isn't optimized and you'll also need a lot of disk space for all of the intermediate steps. Try a 5 or 10 second clip, get your work-flow down and tweaked before diving into a larger project. Once you get the flow down, you can delete intermediate files as you go to save on space. However, at first it is a good idea to keep them around to avoid having to redo everything in case only the last step is messed up.

« Last Edit: April 06, 2011, 07:39:21 PM by Terrence »

jonathanj

  • Full Member
  • ****
  • Posts: 110
    • View Profile
Re: Open Source Tools
« Reply #1 on: November 30, 2010, 05:19:39 AM »
Really good idea putting this forum up, thanks for that! :)

To optimize my workflow (extracting to 24bit directly, rather than to 16bit, then convert to 24bit), I tried using your command regarding audio extraction, but I got this error
Code: [Select]
Unknown encoder 'pcm24_le'
After a bit of researching, it seems the correct parameter is this: pcm_s24le
The command would then be:
Code: [Select]
ffmpeg -y -t 10 -i input.mpg -acodec pcm_s24le -ar 48000 sound/out24bit.wavFor a 10 second test extraction from input.mpg.
I've removed the
Code: [Select]
-ac 1 parameter as it creates a mono wavefile, which breaks the 'sox' process.

Btw, I'm using FFmpeg version 0.6, which version are you using?


On another matter; splitting the 6ch wavefile into 6 seperate wave files, I use 'sox', like this:
Code: [Select]
#split to 6 mono files with this mapping: L, R, C, LFE, LS, LR
sox out24bit.wav left.wav remix 1
sox out24bit.wav right.wav remix 2
sox out24bit.wav center.wav remix 3
sox out24bit.wav lfe.wav remix 4
sox out24bit.wav surrleft.wav remix 5
sox out24bit.wav surrright.wav remix 6

'Sox' is CLI, cross platform, open source and does what we need without having to use Quicktime or other heavy GUI apps :)
Maybe you should consider adding 'Sox' to your list of Tools for the audio multiplexing part.
http://sox.sourceforge.net/

kind regards
//Jonathan
« Last Edit: November 30, 2010, 05:27:46 AM by jonathanj »

Coeur Noir

  • Jr. Member
  • ***
  • Posts: 77
    • View Profile
Re: Open Source Tools
« Reply #2 on: March 09, 2011, 05:42:36 PM »
For windows user 'only' :

Digital Cinema Package Creator : http://cinema.terminal-entry.de/

by Lars Reichel, Friedenstrasse 6, 97500 Ebelsbach
info[(@)]terminal-entry.de

Terrence Meiczinger

  • Administrator
  • Hero Member
  • *****
  • Posts: 560
    • View Profile
Re: Open Source Tools
« Reply #3 on: March 09, 2011, 11:07:47 PM »
Hmm... looks like it is free for the basic version, but it is not open source. Have you tried it?

Coeur Noir

  • Jr. Member
  • ***
  • Posts: 77
    • View Profile
Re: Open Source Tools
« Reply #4 on: March 10, 2011, 01:24:11 PM »
Yes I've tried it (only 2D DCP) and it works fine on multi-core computers - so not on mine...

I can't find the license of this program, did you ask its author ?

It's mainly build on open-source tools : asdcplib, openjpeg...

The pro-version adds kdm generation and encryption management.

Terrence Meiczinger

  • Administrator
  • Hero Member
  • *****
  • Posts: 560
    • View Profile
Re: Open Source Tools
« Reply #5 on: March 10, 2011, 07:38:56 PM »
Yeah, the GUI just appears to call asdcp-test, image_to_j2k, ImageMagick. I have not contacted the author, but where there is no source, I would guess it isn't open source. Since I started working on OpenDCP, I try to avoid looking at other DCP products, so I didn't download and try it. Since it is free, we can leave it under open source for now.

Cineman

  • Jr. Member
  • ***
  • Posts: 57
    • View Profile
Re: Open Source Tools
« Reply #6 on: March 11, 2011, 04:36:16 AM »
I heard about this program from the guy's i was doing an event with in Munich last summer, it seemed to be big news on a German projectionists forum. i tried it, all be it an early version and deduced it was simply a gui for the usual bits of software, and i couldn't get my installation to run so gave up on it, as my own gui using the same open source programs was working very well.   

Coeur Noir

  • Jr. Member
  • ***
  • Posts: 77
    • View Profile
Re: Open Source Tools
« Reply #7 on: March 30, 2011, 06:12:12 AM »
@johnatanj : well if you could give some details about sox... I use Audacity to 'create' the 6 mono wav files from the stereo wav files previously extracted using ffmpeg, I usually "amplify" from -12 to -16 db, highpass/lowpass filter at 150 Hz for center/lfe, then again "amplify" -2 to -5 db for LS/LR. I guess some command line could much faster give the same result with sox...

@Cineman : DCP Creator requires microsoft net.framework 3.5

jonathanj

  • Full Member
  • ****
  • Posts: 110
    • View Profile
Re: Open Source Tools
« Reply #8 on: March 31, 2011, 06:23:35 PM »
@Coeur:  I've only used SoX for splitting a multichannel (24bit, 48Khz) wave file into mono wavefiles for each channel, but have actually been looking for a method to make a "Pro Logic" (Left, Center, Right) track from a Stereo (Left, Right) track.
Not sure how to do it with SoX, but it sounds like it's what you've done with Audacity... or have i misunderstood you?

Terrence Meiczinger

  • Administrator
  • Hero Member
  • *****
  • Posts: 560
    • View Profile
Re: Open Source Tools
« Reply #9 on: March 31, 2011, 08:10:13 PM »
@Coeur:  I've only used SoX for splitting a multichannel (24bit, 48Khz) wave file into mono wavefiles for each channel, but have actually been looking for a method to make a "Pro Logic" (Left, Center, Right) track from a Stereo (Left, Right) track.
Not sure how to do it with SoX, but it sounds like it's what you've done with Audacity... or have i misunderstood you?

According to information sent to Wolfgang Woehl from John Hurst (CineCert), sound tracks will soon require an even number of number of channels, so left, center, right would be invalid. Most servers would probably handle it ok. However, if that is something you really wanted, you should include silent wav files on the remaining channels to be compliant.
« Last Edit: March 31, 2011, 08:57:16 PM by Terrence »

Coeur Noir

  • Jr. Member
  • ***
  • Posts: 77
    • View Profile
Re: Open Source Tools
« Reply #10 on: April 01, 2011, 06:11:09 AM »
@johnathanj : well it's my very own personnal interpretation of what could be a 5.1 processing...

(sorry again for my poor english)

  • Front left and right channels are the original stereo channels.
  • Center front is a mono mix of the original stereo channels, without low frequencies - high pass filter 150Hz - minus some db.
  • LFE is a mono mix of the original stereo channels, without high frequencies - low pass filter 150Hz.
  • Surround left and right channels are the original stereo channels - minus some db, without low frequencies.

It gave - according to my ears - something listenable, I won't pretend it's perfect ! It actually lacks equalization subtilities but I can't find any "conventionnal" specifications...


Cineman

  • Jr. Member
  • ***
  • Posts: 57
    • View Profile
Re: Open Source Tools
« Reply #11 on: April 02, 2011, 05:21:18 AM »
That would work, but to do it better you could subtract L & R and put the difference information in the surround channel and the in phase info to the centre. then strip the inphase and outut phase info out of left and right so them become discrete. this is essentialist what dolby prologic decoding  is. i don't know of any programs that will do it, and output 4 wave files. but there are plenty of hardware set-ups that do it on the fly in real time. so i guess one could simply record the output of a pro logic decoder.

jonathanj

  • Full Member
  • ****
  • Posts: 110
    • View Profile
Re: Open Source Tools
« Reply #12 on: April 10, 2011, 02:21:33 PM »
@Coeur Noir: Thanks for that. I understand now :)

@Terrence: Interesting.. though as you mention, it wouldn't be a problem putting silent waves on the unused channels.

Cineman

  • Jr. Member
  • ***
  • Posts: 57
    • View Profile
Re: Open Source Tools
« Reply #13 on: April 10, 2011, 03:05:44 PM »
I think you have to have an even number of channels anyway. 2=L,R or 4=L,R,C,Sub or 6=L,R,C,Sub,Ls,Rs or for ds7.1 12 channels=L,R,C,Sub,Ls,Rs,Hi,VI-N,mutewav,mutewav,BSl,BSr.

When i was first making dcp's i made one with only 3 mono waves and it crashed the DSP100 in a very wired way. Rebooting it wouldn't bring it round it would look as though it was playing but timecode wasn't advancing and no A/V output. Brought it back to normal by repeatedly pressing stop while the showplayer was rebooting.  The faulty dcp wouldn't disapper from the local drive after deletion  untill a reboot of the show store.
« Last Edit: April 10, 2011, 03:09:45 PM by Cineman »

StephenCin

  • Guest
Re: Open Source Tools
« Reply #14 on: April 12, 2011, 04:49:16 PM »
thanks for this thread guys, it was a life saver... happy i found it, helped me with building a quick DCP in a bind...

dcinemaforum.com

Re: Open Source Tools
« Reply #14 on: April 12, 2011, 04:49:16 PM »