DVD Authoring System for OpenSolaris Installation and Usage Manual

Authors: Igor Struchkov, Vladimir Omelin

1 Preface DVD authoring is one of the most common tasks fulfilled by personal computers nowadays. Modern operating systems, including and Windows, have numerous software packages, both open-source and proprietary, for DVD authoring. OpenSolaris is now aiming at a competitive role in the niche of desktop operating systems and therefore all kinds of end-user applications, such as DVD authoring software, must become available in it.

The goal of this project is to build a full-featured DVD authoring system for OpenSolaris by porting available open-source Linux packages and developing all non-portable features. After some preliminary research it became clear that most of back-end work, including audio/video encoding and iso image construction, can be done by command-line utilities that can be ported from Linux to OpenSolaris. On the other hand, a GUI front-end was decided to be built almost from scratch using some ideas from open-source project Varsha. The main idea was to develop the front-end on JavaTM platform, making it as portable as possible. It turned out to be a very good decision in rapidly changing and unstable world of OpenSolaris distributions, and the developed front-end stays functional in any combination of installed packages.

2 1. Architecture of the DVD Authoring System

Architecture of the DVD authoring system consists of several components of different kinds. One group of components, called Utilities, consists of command-line tools running in native Solaris environment. This group includes dvdauthor, mjpegtools, ffmpeg, and dvd-slideshow. Another group of components are JavaTM platform libraries that support our GUI front-end. The third group consists of one component, namely, a DVD authoring front-end developed in . And the fourth group consists of standard OpenSolaris video players – Totem or MPlayer. The graphical view of the architecture is shown in fig. 1.

Totem MPlayer

Utilities

dvdauthor

GUI front-end spumux

mjpegtools

ffmpeg

Docking JMF dvd-slideshow Frames

sox JavaTM Platform

Fig.1. Overall architecture of the DVD authoring system

3 The GUI front-end is a center of the system. It represents the of DVD authoring in a user-friendly manner as described in chapter 3. But the GUI front-end does not make all the work itself, it relies heavily on Utilities to do the work upon user requests.

The main utility is dvdauthor. It receives initial data from the GUI front-end in the form of specially formed XML document called a project. The project describes the whole structure of DVD including menus and chapters, and includes links to MPEG videos that form each chapter of the movie. According to the project XML, dvdauthor produces a folder with DVD disk structure which can be packed into ISO- image or directly burned on a disk if a DVD writer is available.

Spumux is used to create DVD menus and is also required by dvd-slideshow to produce subtitles. It accepts data in the from of XML document describing structure of a DVD menu and a video file.

From mjpegtools package several utilities are used. Jpeg2yuv is used to create a video file for a DVD menu based on an image and outputs a result in a yuv-file. Mpeg2enc converts yuv-files in MPEG-2. Mplex is used for multiplexing of audio and video streams. In this application mplex creates a video file for DVD menu with an empty (silent) audio track.

As initial videos are not usually represented in MPEGs suitable for DVD but instead are provided as a set of AVI clips, some transcoding between video formats is needed. This is done by ffmpeg utility.

DVD slideshow is a special case of a video clip. It is formed of a set of still images that should be presented at some time interval. The dvd-slideshow utility helps to convert a set of images into MPEG movie that can be then packed into a DVD project. Dvd-slideshow requires Sox.

Though most of the job is done by the command-line utilities, some features need to be available interactively when a user works with a DVD project. This

4 features are provided by Java libraries used by the GUI front-end.

Docking Frames library is used to create a good-looking docking GUI that is convenient to user.

JMF (Java Media Framework) is a set of Java libraries to support multimedia features in Java applications. In our DVD authoring system JMF is used to provide audio playback to a user when he works with audio tracks. JMF is also capable of showing video playback, but unfortunately we were unable to make it work stable for the needed video formats. Possibly the problem is that native JMF performance pack is not available for Solaris x86 (though it is for Solaris SPARC or Linux x86).

Because of JMF video codec problems we decided to use an external application to provide video playback capability when editing a DVD project. This is done by a standard OpenSolaris media player – Totem or MPlayer. Obviously, when JMF performance pack is available for OpenSolaris, this feature may be reworked to become a part of the GUI front-end.

5 2. Installation of the DVD Authoring System Installation of the DVD authoring system involves installation of required packages from OpenSolaris repositories, compilation and installation of ported utility packages and compilation and installation of the Java front-end.

2.1. Installation of Required Binary Packages The following packages from the main OpenSolaris repository must be installed in the system before proceeding to installation of other components:

● SUNWtoo ● SUNWcdrw ● SUNWdvdrw ● SUNWgcc ● SUNWgmake ● SUNWbinutils ● SUNWflexlex ● SUNWbison There are several open-source utilities that should be downloaded from Blastwave repository. Is it recommended to install pkg-get package from Blastwave first. To install pkg-get the following steps should be taken:

1) Issue the following command with root privileges: # pkgadd -d http://blastwave.network.com/csw/\ unstable/i386/5.11/pkg_get-3.8.4-SunOS5.8-all-CSW.pkg 2) After installation is complete, edit /opt/csw/etc/pkg-get.conf. The file should contain only one repository url: url=http://blastwave.network.com/csw/unstable

With pkg-get properly configured, the three needed utilities (ffmpeg, faad2 and imagemagic) may be installed:

6 # /opt/csw/bin/pkg-get -i ffmpeg # /opt/csw/bin/pkg-get -i faad2 # /opt/csw/bin/pkg-get -i imagemagick Mplayer can be also installed from Blastwave: # /opt/csw/bin/pkg-get -i mplayer

2.2. Compilation and Installation of Utility Packages from Sources

Installation of sox.

Source code of sox audio converter does not require special porting. The latest version can be downloaded from the official site of sox project: http://sox.sourceforge.net/

After extracting the tar package and changing to the unpacked folder, compilation and installation is done with the following commands:

# ./configure

# make

# make install

Installation of dvd-slideshow.

The ported version of dvd-slideshow is available from our svn repository:

# svn checkout http://195.19.212.40/svn/DVDAuthor/trunk/dvd-slideshow

Installation of the package is done by the following command:

# ./install.sh

7 Installation of mjpegtools.

The ported version of mjpegtools is available from our svn repository:

# svn checkout http://195.19.212.40/svn/DVDAuthor/trunk/mjpegtools

Installation of the package is done by the following commands:

# ./configure

# make

# make install

Installation of dvdauthor.

The ported version of dvdauthor is available from our svn repository:

# svn checkout http://195.19.212.40/svn/DVDAuthor/trunk/dvdauthor

Installation of the package is done by the following commands:

# ./configure --prefix=/usr

# make

# make install

2.3. Installation of Java Media Framework • Download JMF2.1.1e from http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/download.ht ml • Extract the JMF install archive to a directory, such as /opt/. A JMF-2.1.1e subdirectory will be created. • Set your CLASSPATH path to reference the JMF directory.

• Copy /opt/JMF-2.1.1e/lib/jmf.jar to lib/ext of the JRE (e.g.

8 /usr/java/jre/lib/ext/).

• Create .jmfdir in user home directory with the following contents: /opt/JMF-2.1.1e/lib/

• Download JMF mp3 plugin from http://java.sun.com/javase/technologies/ desktop/media/jmf/mp3/download.html • Copy mp3plugin.jar to lib/ext of the JRE. • Run the following command: java com.sun.media.codec.audio.mp3.JavaDecoder

2.4. Installation and Compilation of the Java Front-end The Java frontend is distributed as a NetBeans project from our svn repository:

# svn checkout http://195.19.212.40/svn/DVDAuthor/trunk/DVDAuthoringSystem

The Java code can be compiled and packaged to JAR using NetBeans or from command line using ant. The following JARs should be in the project classpath for successful compilation:

● dockingFramesCore.jar

● dockingFramesCommon.jar

This JARs can be found in DVDAuthoringSystem/lib folder.

9 3. Using the DVD Authoring System In this chapter we will give a detailed guide on how our DVD authoring system can be used to perform a complete DVD creation process starting from initial project creation and ending by burning a DVD disk.

3.1. Starting a New Project A new DVD project is created when the DVD authoring system is started or with 'File->New Project' menu command. After starting the application you see the initial screen (fig. 1). It has three main parts: Project Tree Editor, Workspace and Output window. All the components of GUI are docking windows and can be laid out or popped up from the main frame.

Fig. 1. Initial screen of the application

10 3.2. Customizing Project Properties In the initial layout the working area contains Properties window which is used to set the global project parameters such as DVD video system (NTSC or PAL), screen aspect ratio (4:3 or 16:9) and type of audio codec (AC3 or MP2). There are also two path options: root project directory path and temporary directory path. By clicking 'Set Utilities Location' button a user can customize locations of the main utilities used by the application. Although if the installation instructions in chapter 2 have been followed, this customization should not be necessary.

3.3. Creating Project Structure The first step in designing a new DVD project is to create project structure. This task is performed within Project Tree window. By clicking the right mouse button on tree elements you can access popup menus that allow to add, remove or edit project elements.

Project elements form a hierarchical list with the following structure. The Root level element contains TitleSets. Each TitleSet contains Menus and Titles. A Menu consists of MenuItems. A Title consists of Videos and SlideShows.

3.4. Creating a Menu for a DVD Project To create a DVD menu, choose TitleSet from Project Tree, activate a popup menu with the right mouse button and choose Add Menu. A new Menu element will appear (each TitleSet is allowed to have only one Menu). You can select the Menu element and choose Edit with the right mouse button. After this a Menu window will be added to the Workspace (fig. 2). In this window you can change menu background or add menu items. If you choose 'Set Background' button, application opens a new dialog window, which offers a choice of three possible background types: image, video or color. If you choose video or image background type, the application opens a new file chooser window, in which you should choose a file that will be used as a background. If you choose color background type, the application opens a new color

11 chooser window, in which you should choose color that will be used as a background. In case of color or image background, the effect will be shown immediately.

Fig. 2. DVD menu editor

Menu items may be added by pressing 'Add Menu Item' button. After that a Menu Item Properties window will appear. This window can be reopened later by clicking the right mouse button on a corresponding Menu Item in the Menu editor window and choosing Edit in a popup menu.

The Menu Item Properties window has four types of parameters (fig. 3): size and location, text parameters, image parameters, jump parameters.

Size and Location

This parameter group allows a user to set item location relative to the upper left corner of the menu, as well as height and width of the item. Changes take effect after

12 clicking Apply button.

Text Parameters

Allow a user to set item text, font, font style and size. Changes take effect after clicking Apply button.

Fig. 3. Menu item properties window

Image Parameters

13 Allows a user to set item image. After clicking Change button, application opens a new file chooser window, in which a user should choose a file that will be used as item image. Changes take effect immediately after choosing a file.

Jump Parameters

Specifies an element, which will be used as a jump target after menu item activation.

3.5. Adding and Editing Video Tracks

Fig. 4. Video editor window

Video tracks can be added to any Title element by clicking the right mouse button on a corresponding element and choosing 'Add Video'. After this, application opens a new file chooser window, in which you should choose a video file that you want to add to the project. After adding a new video (or right-clicking and choosing

14 Edit on an existing video element) a Video editor window appears in the Workspace (fig. 4).

Video editor allows to change a video file associated with the video track and preview it in an external video player (Totem or Mplayer, upon user preferences). The Video editor allows also to change an original audio track of a video to a sequence of user-defined audio tracks. You can control the list of audio tracks with 'Add Audio File' and 'Remove' buttons. You can listen to audio playback of any selected audio track using playback control buttons. You can also preview a modified video with substituted audio tracks by pressing 'Convert & Preview' button.

3.6. Adding and Editing Slide Shows Slide shows can be added to any Title element by clicking the right mouse button on a corresponding element and choosing 'Add SlideShow'.

The Slideshow editor (fig. 5) allows you to build a video clip from a set of pictures. In it's initial state this window has only one enabled button – Add. Other buttons are enabled after adding some pictures to the slideshow.

Add Button

After this button is clicked, application opens a new file chooser window, in which you should choose a file that you want to add to the slideshow. After that, a small copy of the image will be added to the slide panel, and the image becomes active. The active image is displayed in a separate area above the slide panel. You can add or edit a subtitle for the active image. This subtitle will be displayed together with the image on a resulting DVD-disk.

Remove Button

Use this button to remove an active image from a slideshow.

Next (>) and Previous (<) Buttons

The buttons become enabled, if a slideshow has a next (previous) image for the

15 active image. After this button is clicked, the next (previous) image becomes active.

Fig. 5. Slideshow editor

3.7. Burning the DVD Project Upon finishing DVD project design, you are ready to burn it on a DVD disk. Burning tool is activated with 'Project->Burn Project' menu item. The Burn Project window is shown on fig. 6. There is an option to choose DVD-RW device if it exists in a system. By checking 'Burn Iso Only' you can prevent actual burning of a disk and just build an iso image. Location of the image is specified in ImageFile box.

Process of iso image creation and burning is started by pressing 'Burn!' button. Be aware that this process may take arbitrary long time depending on number and length of video tracks.

16 Fig. 6. Burning the DVD project

17