an3cfs
<<< Back
openpot provides the raw data of its cine movie 'Air No. 3' as open-source and free of charge. You may use this data for private and academic training purpose only!


Documentation:

A. Compiling from source:

1. Get the source here: Air No. 3 Source
2. Unpack the tarball.
3. Install the latest and/or all cumulative updates.
4. Check if your system has all required dependencies.
5. Execute the an3cfs.rb program from your terminal.


B. Requirements and dependencies:

- More than 100gB diskspace
- A CPU with more than 2.0GHz pulsing on one core (i3 or better)
- Ruby 1.9.x installed
- ImageMagick 6.7.x installed
- libav 9.x (avconv) installed
- gnuplot installed
- A lot of time


C. The archive:

The root directory of the tarball contains following files and directories:
d data
d export
d intro
d openpot_mp_jingle_seq
d outro
d prec
d seq
d snd
f an3cfs.rb
f im_fx_curves
f curves.txt
f encoding.txt
f LICENSE.txt
f README.txt

data: This folder contains all additional data produced with and for the movie (but not the image files and on-set audio recordings). These files are only partially used during compiling and are mainly useful for creating an own version:
d cox [12 audio files for the role of Mr. Cox]
d kruger [86 ... ]
d linajevanco [19 ... ]
d morello [1 ... ]
d nemeth [11 ... ]
d noise [12 audio files of noise sounds within the movie]
d rosenblatt [8 audio files for the role of Dr. Rosenblatt]
d soundtrack [audio files of the original composed music]
d sprecher [53 audio files of the voice over text]
d weiss [26 audio files of the role of Dr. Weiss]
f 216_.wav [newsreader (nachrichten.wav) speech only]
f 20120206bc5.wav [background (original) music]
f 20120617bc2.wav [background (original) music]
f Air.wav [Bach's overture no. 3 (Air) orchestral version]
f AirNo3.pdf [the original screenwriting]
f airno3sinuscut.wav [sinus sound version of Bach's overture no. 3 (Air)]
f aurum_foley.zip [foley sounds (unlocated)]
f blank.jpc [A black frame]
f blend.txt [a table of frames to fade in/out]
f credits.txt [credits of the movie and originator references]
f CubarePCM.wav [background music]
f cut.txt [the original edit (cut) as text file]
f gv25.wav [Bach's Goldberg variations (no. 27)]
f nachrichten.wav [newsreader audio]
f nachrichten1.wav [ ... ]
f nachrichten2.wav [ ... ]
f inbg.wav [newsreader background music]
f inter.wav [newsreader intro music]
f playairBc1.wav [original jazz-version of Bach's overture no. 3 (Air)]
f scenetable.txt [relation between scenes (screenplay) and the shot ids]
f sfx.rar [sound effect library (empty due to licensing reasons)]
f transporttable.txt [a table of the pre-/post-edit image ids]

export: This folder is initially empty. It is the location where the compiled files will be stored if not specified otherwise.

intro: This folder contains the animated intro frames for the movie.

openpot_mp_jingle_seq: This folder contains the animated logo frames of openpot.

outro: This folder contains the animated credits/end titles frames of the movie.

prec: This folder contains pre-compiled data. This is mainly a mix-down of the sound files for the encoded movie, since these are very hard to mix "on the fly". It contains 1 stereo track, 1 surround (5.1) track (not available for v0.1.0) and 2 subtitle files.

seq: This folder contains the raw shots of the movie. There are 435 folders with a total of 279.528 files (frames). The specification of the frames is:
JPEG-2000 encoded (JPC)
lossy compression (36mb/s = 36/24/8 = ~184kB per frame)
2048x858 pixels (2.39:1)
RGB-colorspace (sRGB gamma 2.2)
12bit per channel
24 frames per 1 second
Although we wanted to provide the real raw data of the production, we had to compress the frames lossy. This is because of the unreasonable large amount of space the raw data needs (1.6tB). JPEG-2000 12bit at 2k resolution is a sane compromise between quality and amount of data (32x compressed).

snd: This folder contains the sound files for the shots. Each shot has 2 mono audio channels, so 870 audio files total. The specification of the files is:
uncompressed WAVE (PCM)
48khz sampling rate
24bit sampling depth
2x1 channel (mono)

an3cfs.rb: (Caution: The original script in the archive is extremely buggy. Use at least update_2 for compiling!) This file is the cli-program to compile Air No. 3 from source. At time this script will only work on linux-based operating systems. All parameters are optional. Usage:
ruby ./an3cfs.rb [clean-up?0|1] [surround?0|1] [scale?0|1920|1280] [/path/to/compile/to/] [/path/to/curves/file/] [/path/to/imagick/executable/] [/path/to/avconv/executable/] clean-up: whether to delete the compiled frames after movie encoding is done or not. 0=no, 1=yes. Default=0.

surround: whether to add surround sound when encoding the movie or not (for v0.1.0 only stereo is available). 0=no (stereo), 1=yes (surround). Default=0.

scale: whether to scale the frames when compiling. 0=no (2048x858), 1920=yes (1920x810), 1280=yes (1280x540). Default=0.

path to compile to: the absolute or relative path to the folder where the (temporary) compilation files will be stored. Default=export/. The program cannot differ paths which contain whitespaces, don't use them.

path to curves file: the absolute or relative path to the folder where the curves.txt file lives in. This file contains the grading information for the frames. Default=./.

path to imagick executable: the absolute or relative path to the directory where the imagemagick executable lives. The program cannot differ paths which contain whitespaces, don't use them.

path to avconv executable: the absolute or relative path to the directory where the avconv executable lives. The program cannot differ paths which contain whitespaces, don't use them.

All parameters are optional, however if you want to set e.g. the scale parameter, you have to set clean-up and surround also.
ruby ./an3cfs.rb 0 0 1280 A command line with all parameters may look like:
ruby ./an3cfs.rb 1 0 1920 /tmp/ ./ /usr/local/bin/ /usr/bin/ an3cfs.rb works in 3 steps:

1. select, grade and convert the necessary frames,
2. render fadings,
3. convert the new frames to a video format and dub audio onto the video.

The progress of an3cfs is deposited in the export folder. Step 1. can be interrupted at any time (Caution: Always interrupt the running script by pskill or an task-manager! Hitting Ctrl+c will lead to unwanted results!). an3cfs will proceed with the conversion when started again with the same parameters. The video encoding and audio dubbing cannot be resumed. When interrupted, the rendering has to start from scratch. Step 2 can be interrupted and resumed, but it is recommended to start the progress over when canceled.

im_fx_curves: A shell script which converts curve points to mathematical histogram curves. This file needs executive rights!

curves.txt: This file contains the grading curves for the movie frames. Due to the automation purpose, these curves are not as exact as they are in the original movie grading. But they come pretty close to the master.

encoding.txt: This file contains the encoding parameters for avconv.

LICENSE.txt: This file contains the license for an3cfs. It is written in German (an English translation is present but not mandatory). Summarized:


README.txt: This file may contain some more information.


D. Compiling speed tuning:

If your compiling process is very slow, you can speed it up by letting the program output a different file format for the temporary image files (1st step). By default it encodes JPC-files. To change it e.g. to JPG, you have to modify the an3cfs.rb file:
1 # coding: utf-8
2
3 out_format = "jpc"
...
Change line 3 to:
3 out_format = "jpg"
The JPG encoder should be about 2x faster than the JPEG-2000 encoder, but will produce about 2x larger files with slightly lower quality.
If disk-space is not an issue for you, you might consider to encode to TIF or PNG. This might be even faster than JPG and the quality is definitely higher.

To speed up the encoding process of the movie-file (3rd step), you can modify the encoding.txt file. Most likely you just want to change the preset setting for the libx264 encoder:
...dec ac3 -preset slow -r 24 -pix_f...
Change the -preset parameter from "slow" to e.g. "medium", "fast" or "veryfast". Remember to change all lines of the file. Faster encoding will lead to larger movie-files and/or lower quality. You can enhance the quality by raising the bit rate (-b parameter).