MakeDCP.bat

Drag-and-drop DCP conversion tool

This Windows batch script is intended to create a functional Digital Cinema Package starting with a video file of almost any common format such as MP4, AVI, MOV or FLV. It is designed to be executed by dragging and dropping the video file's icon onto that of the batch script or its shortcut.

I created this tool to assist a client with this task. While it is not utterly simple to set up, it is very simple to use. I offer it without warranty or guarantees, but with the assurance that it can do its job, in its somewhat limited way, very well.

It uses VLC Media Player for transcoding and to extract/convert the audio into a compatible WAV file.

It uses AVCONV.EXE, a component of the Libav toolset, for extraction of video frames into TIFFs.

Command-line tools of OpenDCP are then used in several steps to create the DCP.

All of these utilities must be downloaded and installed before this script can function.

Notes

This script "assumes" that the source video file is not already of the correct initial dimensions and frame rate for conversion (i.e. 1920x1080, 24fps). If the file already meets those criteria, this process will probably degrade its quality to some degree by reason of conversion losses. A moderately skilled user could of course modify the script to skip the conversion step. (Other dimensions and framerates allowable under the DCP standard -- and by OpenDCP -- can be achieved, but the script must be modified accordingly.)

This script's variables must be adjusted to your application paths and to identify issuer, type, etc. (See "App_paths" and "DCP XML parameters," at lines 81 and 107.)

Use Notepad or a similar text editor for the purpose. I strongly recommend Notepad++.

This script uses two additional batch scripts to capture time and date to variables which are used in folder names: time2var.bat and date2var.bat.

As written, this script assumes you have created a folder named "Batch" in C:\ProgramData and that time2var.bat and date2var.bat are in that folder. MakeDCP.bat can also be placed in that folder and a shortcut to it placed on the desktop; however it can run from any location.

Drag and drop the video you wish to convert onto this file's icon or its shortcut. A folder named MakeDCP will be created on the desktop, and an appropriately-named folder will be created for the DCP within that folder.

Most videos contain an audio track. The script "assumes" there will be one. It will hang without audio, unless you temporarily set minbytesize to 0 at line 192.

IMPORTANT: Because of syntax problems in certain VLC commands, the filename of the video that is targeted for conversion MUST NOT CONTAIN ANY SPACES.

Be advised...

System

Processing a DCP can take a LOT of time. On a powerful desktop system, my conversions average around 5 to 8 times the runtime of the video, depending on the attributes of the original video. Therefore, on my system, a 2-hour feature would take perhaps 16 hours to process. On a more ordinary desktop the same task might easily require several days.

Processing a DCP may consume a LOT of hard drive space. The TIFF images alone usually occupy more than 4GB of drive space per minute of runtime. JPEGs can require another 1 to 2GB. Hence, that 2-hour feature would require something like 700GB of free drive space. Once finished, the script deletes all but the DCP and the 1080p MP4 (with sound); but the space has to exist or the job won't happen.

Bear in mind this script's purpose is solely to make DCP conversion of practically any video file drag-and-drop easy. It converts, as written, only to 24fps 1920x1080 (1080p). It's useless for manipulation of audio or video content, and cannot improve the quality of any input. It can occasionally fail to convert properly (though in cases I've seen, it happened only with videos whose formatting or integrity were odd or suspect). Always test the resulting DCP by watching and listening to it in its entirety before attempting public display!

Platforms

Tested extensively on machines running Windows 7 Professional. YMMV on other platforms.

I know no particular reason this script wouldn't function on Windows 8/8.1 or 10. (Except of course for the fact that both O/Ses are schizophrenic, buggy and ill-behaved.) There might possibly be issues with the filesystem (write permissions etc) or with the other ever-increasingly-complex and generally ineffective protective mechanisms of Windows depending how you set it up. I welcome input from those who try it.

Credit and Copyright

The author of this script is Keith Little. My email address is in the batch file.

Please do not omit credit for my work nor my copyright notice if you pass on copies of this script to others and/or if you create any altered version.

I am responsible only for the script; not for the freeware utilities it utilizes and requires; and not for anyone else's alterations.

Commercial users are asked to contact me for permission to use and for any support they may require; for which I would expect to be paid, given satisfactory results.

Current version: 0.9.3 21 October 2015

Download MakeDCP.bat