MPEG-4 IM1 SW 설정법
Title: Developers Guide for MPEG 4 Systems and 3DGC Reference Software
Editor: Francisco Politécnica de Madrid, ES)
Status: Approved at the 79th meeting
1. Introduction
The RSW (Reference SoftWare) of MPEG 4 (formally, ISO/IEC 14496) implements the [de]coding tools described in the different Parts of the standard, and is itself Part 5 of MPEG 4. As explained in Section 1.2, it consists of several modules, of which the most interesting, for the purposes of this document, is Player3D, that can play MPEG 4-compliant interactive multimedia content and, in particular, synthetic 3D content. The subset of MPEG 4 most specifically dealing with 3DGC (3D Graphics Compression) is its Part 16, “AFX (Animation Framework eXtension)”. But other Parts of MPEG 4 also deal with synthetic 3D content, so the following other MPEG output documents are of interest in the context of this one, and are all available on-line in the MPEG document repository hosted by NIST under “http://mpeg.nist.gov/”:
• N8496: MPEG 4 Part 5, “RSW”, Amendment 9 (contains the RSW of AFX Edition 2);
• N7881: MPEG 4 Part 16, “AFX”, Edition 2 (consolidated edition of the original one, together with its first Amendments and Corrigenda);
• N6960: MPEG 4 Part 11, “Scene description and application engine” (initially baptised “AFX generic tools and multi-user worlds”);
• N5546: MPEG 4 Part 2, “Visual”, Edition 3;
• N5277: MPEG 4 Part 1, “Systems”, Edition 3.
1.1. Goal and authors of this document
This is not a list of FAQs (Frequently Asked Questions), although it originates from the many questions that all newcomers to the MPEG 4 RSW have had to ask to the RSW “veterans” to be able to use and improve it. The answers to these questions have been summarised and grouped together in the probably arguable Subsections of this document, in the hope that this effort will ease future installations and de-velopments of MPEG 4 RSW.
Main askers:
• Francisco Morán fmb@gti.ssr.upm.es (editor of this document)
• Sebastián Amengual sag@gti.ssr.upm.es
• Marcos Avilés mar@gti.ssr.upm.es
• Alberto Castillo acl@gti.ssr.upm.es
Main answerers:
• Marius Preda marius.preda@int-evry.fr
• Mikaël Bourges-Sévenier mikael@sevenier.com
• Wo Chang wchang@nist.gov
1.2. Modules of MPEG 4 RSW
This Section introduces the different modules forming the MPEG 4 RSW and their interrelations.
• BifsEnc: encodes a multimedia interactive scene described in a textual file (“*.txt”) with a syntax similar to that of VRML97 (which is why sometimes the input file is named “*.wrl”), but possibly containing references to several elementary streams stored elsewhere, and produces:
one binary file (“*.bif”) describing that same scene much more compactly;
as many object descriptor binary files (“*.od”) as elementary streams are referenced in the scene;
one log textual file (“*.log”);
possibly a parsing error textual file (“*.lst”).
• MP4Enc: multiplexes, according to the information contained in a textual file (“*.{src,mux}”), a binary encoded scene (“*.bif”) and possibly many elementary streams (“*.od”) as the ones produced by BifsEnc, and yields:
one MPEG 4-compliant bit-stream (“*.mp4”);
one log textual file (“*.trc”).
• Im1Player: checks whether a “*.mp4” file contains indeed an MPEG 4-compliant bit-stream.
• Player3D: plays an MPEG 4-compliant bit-stream (“*.mp4”) and enables the user to view and interact with the 3D scene described in it. Section 3 gives an overview on its architecture.
To avoid frustration as much as possible, it is important to understand that the RSW is a collaborative effort and thus a moving target, that might not perform well (or even compile!) at given moments in which people check in buggy pieces by mistake. However, theoretically it should not only compile and work, but also implement all current tools of MPEG 4 Part 16 (AFX), and be of course “backwards compatible”: e.g., it should still play content conformant to the original AFX specification even if it already implements functionality added to support nodes specified in the successive AFX Amendments.
2. Installation of MPEG 4 RSW
This Section describes the pieces of external (i.e., not from MPEG) SW that you must have installed in your PC, the steps needed to download the MPEG 4 RSW from the MPEG CVS (Concurrent Versions System) repository hosted by NIST under “http://mpeg.nist.gov/”, and the steps required to build and install it.
2.1. Pre-required SW
To build a Player3D able to play content using MPEG J, you will need to download and install:
• The J2SE (Java 2 platform Standard Edition) SDK, also known as JDK, and available under “http://java.sun.com/j2se/”: v1.1.x to v1.4.x have been tested and are known to work, whereas it remains to be seen whether the more recent v1.5.x work equally fine. Below, we will assume you have installed the JDK in “C:\Program Files\Java\j2sdk1.4.2_07”, a path that must be translated to “C:\Progra~1\Java\j2sdk1.4.2_07” when used in an environment variable: see Section 2.3.1 (although you might think it is not, “j2sdk1.4.2_07” is fine even if it contains two dots: it is the space in “Program Files” that would cause a problem in Section 2.3.3).
• The Java Communications API, available under “http://java.sun.com/products/javacomm/”: v2.0 may be used. Note that the right way to install this SW is to follow the instructions given in the “jdk1.2.html” (not “Readme.html”!) file contained in the “commapi” directory resulting from unzipping the “javacomm20-win32.zip” package. In particular, it is NO good idea to copy directly the “commapi” directory under, e.g., “C:\Program Files\Java”, and then alter accordingly the CLASSPATH environment variable in the next Section.
Whether you want to play MPEG-J content or not, you need MS Visual C++ 6.0 (of which both the standard and professional editions may be used with no problems), patched with its Service Pack 6, which is downloadable from “http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp6/”. You should NOT need to modify in any way MS Visual C++ 6.0 default options: in particular, its “Tools > Options > Directories” should not be edited at all.
You also need a CVS client to download MPEG 4 RSW from NIST’s CVS server: keep reading…
2.2. Download of MPEG 4 RSW and test samples
Document N7750, which was initially submitted as contribution M8705 in July 2002 by Mikaël Bourges-Sévenier and Wo Chang, contains detailed instructions on how to install the CVS client “WinCVS” on your PC and how to use it. Note that the GUI of WinCVS has changed slightly since M8705 was written.
Below, we will assume that you have downloaded the RSW sources contained in module “MPEG 4/Systems/IM1” of the CVS server to “C:\Program Files\MPEG\MPEG 4\Systems\IM1” (note that this path must be translated to “C:\Progra~1\MPEG\MPEG 4\Systems\IM1” when used in an environment variable: see Section 2.3.1). We will also assume that you have downloaded the test content from module “MPEG 4/Test” to “C:\Program Files\MPEG\MPEG 4\Test” (again, see Section 2.3.1).
2.3. Build of MPEG 4 RSW and test samples
Among the files downloaded when checking out the module “MPEG 4/Systems/IM1” from the CVS server, there is one, “Docs/_ReadmeFirst.doc”, which is entitled “Compilation and installation of IM1” and was written on 2003 12 23 by Mikaël Bourges-Sévenier. This document contains outdated and unnecessary instructions, so please do not follow them: follow the ones below instead.
2.3.1. Edit of MS-Windows environment variables
Edit the following environment variables:
• IM1_3D_INC_DIR Set to “..\Player3d”.
• IM1_3D_PRE_PROC Set to “PLAYER3D”.
• IM1_HOME Set to “C:\Progra~1\MPEG\MPEG 4\Systems\IM1”.
• JAVA_HOME Set to “C:\Progra~1\Java\j2sdk1.4.2_07”.
• MPEGJ_HOME Set to “%IM1_HOME%”.
• TEST_HOME Set to “%IM1_HOME%\..\..\Test”.
• CLASSPATH Set to “%IM1_HOME%\mpegj\java” (if not already set, or else add “;%IM1_HOME%\mpegj\java”) so that the MPEG-J classes can be found at run time.
• PATH
▶ Add “;%IM1_HOME%\Debug” or “;%IM1_HOME%\Release”, depending on whether you will build the RSW in Debug or Release mode later, so that the executables of the players (“Im1Player.exe” and “Player3d.exe”) can be found, but also to have the “make.bat” batch files of Section 2.3.4 find the executables of the encoders (“BifsEnc.exe” and “MP4Enc.exe”).
▶ Add “;%JAVA_HOME%\bin” so that some Java executables such as “javac.exe” and DLLs can be found, e.g., by some of the “make.bat” batch files of Sections 2.3.3 and 2.3.4.
▶ Add “;%JAVA_HOME%\jre\bin\client” so that the main Java DLL (“jvm.dll”) can be found at run-time. Alternatively, you can just copy that DLL to “%IM1_HOME%\Debug” and/or “%IM1_HOME%\Release”.
2.3.2. Edit of MS-Windows registry
Double click on “%IM1_HOME%\_Registry\im1.reg”.
2.3.3. Build of the RSW
As of 2007 01 08 (@ 16:08 CET, to be precise… ; ) it was possible to build without problems in both Debug and Release mode the encoders (projects BifsEnc and MP4Enc), which are both needed to build the test samples (see below), as well as the players (projects Im1Player and Player3d), by doing the following:
• To build players able to understand content using MPEG J, build first the MPEG J classes by running “%IM1_HOME%\mpegj\java\make.bat”.
• Open the workspace “%IM1_HOME%\_WorkSpaces\Player3d.dsw”. Either of the following will create DLLs and executables in “%IM1_HOME%\Debug” or “%IM1_HOME%\Release”, depending on your choice when building the projects.
Build first the encoders by choosing the project BifsEnc and building it (in either Debug or Release mode, but making sure your choice is the same you made in the previous Section), and then doing the same for the project MP4Enc. Next, build the players by choosing the project Im1Player and building it (in either Debug or Release mode), and then doing the same for the project Player3d.
Alternatively, in the menu “Build… > Batch Build”, select only the (Debug or Release configuration of the) four projects mentioned above and hit “Build”.
Known problems:
• From time to time, some RSW developers erroneously upload to the CVS repository both the source code to build a library and the library itself. The problem with having such “redundant” libraries in the CVS server is that, being downloaded as “read only” files, errors appear when trying to rebuild them, as they cannot be overwritten. The “quick and dirty” solutions are to remove them before trying to build them from their sources, or to at least remove their “read only” attribute after retrieving them from the CVS repository — the “ultimate” solution is to remove silly developers… ; )
2.3.4. Build of the test samples
At the root of the “%TEST_HOME%” directory, there is a “README.txt” file explaining that:
• The “clean.bat” script sitting next to it (the “README.txt” file) deletes recursively, in the whole directory tree under it, all the “*.mp4” bit-streams found, and all intermediate files used during their creation and execution. So do all the “clean.bat” scripts in the whole directory tree under it.
• The “make.bat” script sitting next to it builds recursively, in the whole directory tree under it, all the “*.mp4” bit-streams corresponding to all couples of “*.wrl” and “*.scr” files found. So do all the “make.bat” scripts in the whole directory tree under it.
Those scripts assume that both “BifsEnc.exe” and “MP4Enc.exe” (built in either Debug or Release mode) are in some directory contained in your environment variable PATH, as explained in Section 2.3.1. If they are, running “%TEST_HOME%\make.bat” should suffice to build all MPEG 4 test samples involving synthetic content, including:
• all the AFX 3D test samples, and some of the old 3DMC (3D Mesh Coding) ones, to be found under the “%TEST_HOME%\AFX” sub-tree;
• all the test samples showing MPEG 4 support for JPEG2000-coded textures, to be found in “%TEST_HOME%\JPEG2000”;
• all the test samples for the SynthesisedTexture tool, to be found in “%TEST_HOME%\ST” (these cannot be played with Player3D: Player2D has to be built and used instead).
Known problems:
• In some directories below “%TEST_HOME%\AFX” there are test samples yielding “*.mp4” files that make Player3D crash or misbehave. Look for “WARNING.txt” files explaining such problems in the identified directories.