This forum has been archived. All content is frozen. Please use KDE Discuss instead.

create DCP script

Tags: None
(comma "," separated)
ebel
Registered Member
Posts
48
Karma
0

create DCP script

Tue Aug 27, 2013 10:57 pm
Here I present a script for DCP production:

Tipp for kubuntu user:
edit the line in file /etc/xdg/autostart/gnome-keyring-pkcs11.desktop
OnlyShowIn=GNOME;Unity;MATE;
to:
OnlyShowIn=GNOME;Unity;MATE;KDE;

If you use linux copy the following lines to a file createDCP, read the instructions
#!/bin/bash
############################################################
# _____ ______ ______ #
# _ (____ \ / _____|_____ \ #
# ____ ____ ____ ____| |_ ____ _ \ \| / _____) ) #
# / ___)/ ___) _ ) _ | _)/ _ ) | | | | | ____/ #
# ( (___| | ( (/ ( ( | | |_( (/ /| |__/ /| \_____| | #
# \____)_| \____)_||_|\___)____)_____/ \______)_| #
#___________________________________________________________#
# #
# Developed by Christian Ebeling 16/3/2013 #
# http://vimeo.com/christianebeling #
#############################################################
# Abstract
# ========
#- This script creates from a digital master source (lossless version of a movie)
#- in full HD with 25fps a digital cinema package (DCP, 2k) with 25 fps
#- Please be aware that not all DCP server will play 25fps!
#-
#- Before you start make sure you have installed avconv, convert (in the image magick package) and openDCP
#- on ubuntu install avconv and convert with
#- sudo apt-get install imagemagick avconv
#- openDCP you get from http://www.opendcp.org/
#- Tipp for Kdenlive user: export you project as lossless movie
# 1. open the render window
# 2. tap[Render Project] -> Destination select [Lossless/HQ] -> FFV1 lossless (video) + FLAC (sound)
# in the same tap -> Scanning = Force Progressive
# export audio
# make sure you have changed the rights to this script with
# chmod 700 createDCP
#- USAGE of this script:
#- type in you bash console:
############################################################################
#- ./createDCP path_to_your_digital_master_source folder4creatingAllFiles #
############################################################################
#- This script is written for full HD movie (1920x1080) with 25fps!!!!!
#- Please be patient: a 10 min movie takes several hours depending on your system
mkdir $2 # create the folder4creatingAllFiles
cd $2 # change to the folder
#- create Tiff 25 frames per second
mkdir tiffs
avconv -y -i $1 -an -pix_fmt rgb24 -vcodec tiff tiffs/%06d.tiff # add -r 24 for 24 fps

#- black bar left and right for 2k resolution (1998x1080) and converting Tiff to JPEG2000
# Please don't change the script in order to convert complete folder. This will crash openDCP
# It's slow (only 1 processor) but it works
mkdir JPEG2000
cd tiffs
for f in `ls`;do
convert $f -gravity center -background Black -extent 1998x1080 $f # overwrite fullHD-tiff with 2k-tiff
prefix=`echo $f | cut -d . -f 1` # extract the prefix of the file
opendcp_j2k -i $f -o ../JPEG2000/$prefix.j2c -r 25 -b 200 # convert tiff to JPEG2000
done
cd ..

#- Audio
mkdir Audio25
avconv -y -i $1 -r 25 -acodec pcm_s24le -ar 48000 Audio25/audio.wav # add -r 24 for 24 fps
cd Audio25
# because DCP standard requires at least 3 channels (Left,Right,Center) but my
# audio is mono with 2 channels I repeat the channel 2 for the center
# the next 3 lines have no funtion in the moment because I don't know how to
# add these channels to the mxf file
sox audio.wav 01_left.wav remix 1
sox audio.wav 02_right.wav remix 2
sox audio.wav 03_center.wav remix 2
sox audio.wav 04_left_suround.wav remix 1
sox audio.wav 05_right_suround.wav remix 2
sox audio.wav 07_audio_description.wav remix 2
cd ..

#- MXF FIles
opendcp_mxf -i JPEG2000 -o picture.mfx -r 25
opendcp_mxf -i Audio25/audio.wav -o audio.mxf -r 25 # see comment in line 44
#- DCP (XML) Creation
# I'm using the GUI of openDCP last tap

#- transfer the files to your etx3 formated USB stick or external hard disk
#- enjoy in cinema and give feedback to other users of this script !!!!!!!

#- to test your dcp picture.mxf:
#ffplay -ss 0 -lowres 1 -vf "xyz2rgb" -i picture.mxf


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee