6 The OpenH323 project aims to create a full featured, interoperable, Open
7 Source implementation of the ITU H.323 teleconferencing protocol that can be
8 used by personal developers and commercial users without charge.
10 OpenH323 development is coordinated by an Australian company, Equivalence Pty
11 Ltd (http://www.equival.com), but is open to any interested party. Commercial
12 and private use of the OpenH323 code, including use in commercial products
13 and resale, is enouraged through use of the MPL (Mozilla Public license).
16 For more details see http://www.openh323.org
18 You can subscribe to the mailing list at http://www.openh323.org/mailman/listinfo
20 Frequently asked questions are answered at http://www.openh323.org/faq.html
24 Building the OpenH323 Code
25 ==========================
27 This page describes how to compile the OpenH323 code release. Note these
28 instructions will always refer to the latest snapshot available on the
31 The OpenH323 source will have been compiled and tested under Linux x86, and
32 Windows NT. If it does not compile for you then the problem is likely to be a
33 setup/configuration problem with your system and not a problem with the
36 The libraries and applications should also compile on Windows 95/98, BeOS
37 (thanks Yuri!), Linux PPC, FreeBSD x86, OpenBSD x86 (thanks Roger!) and
38 Solaris Sparc & x86. They are not automatically compiled on every release
39 however so there could be problems, but the chances are that there aren't.
40 Note also that not all of these platforms may have ports of the sound
43 We are also happy to port it to other Unix flavours providing people out
44 there can provide an account and a fair bit of disk space!
46 These instructions should contain all of the steps need. If you have a problem,
47 please double check that you have performed ALL of the steps below,
48 particularly setting the include file paths under MSVC. Some of the more
49 common errors are described below.
51 If you get a lot of compile or link errors, then the chances are that you
52 have missed something in the list. If you are positive that something is
53 wrong and you have followed the instructions, then send an e-mail to the
54 mailing list, and we'll answer it for everyone to see. Bear in mind that the
55 first question asked will be "did you follow the instructions".
63 1. Download the pwlib_1.xx.zip and openh323_1.x.zip files from the OpenH323
66 2. Follow the instructions for building PWLib.
68 3. Start MSVC (v5 or v6). If you have another compiler you are on your own!
69 Go into the Tools menu, Options item, Directories tab and add to the
70 beginning of the Include files path (note the order is important!):
74 and add to the Lib Files path and the Executable Files path the following:
78 Also make sure the last directory is in your PATH environment variable.
80 Note this is in addition to the ones in PWLib!!
82 4. Use the OpenH323.dsw file to build the sample code, eg SimpH323.
84 The build should automatically create a file openh323/include/openh323buildopts.h
85 via the configure.exe program that should be in the openh323 directory. If
86 you have any problems try running the program directly from a command
87 line. Use ".\configure --help" to get information on options such as
88 forcing a feature or library dependency.
90 Note there are additional notes in the "Platform Specific Issues" on how
91 to compile the various libraries in a manner suitable for use by OpenH323
94 5. Run the program, and you are on your own!
101 1. Download the pwlib_min_1.xx.tar.gz and openh323_1.xx.tar.gz files from
102 the OpenH323 download page.
104 2. Follow the instructions for building PWLib.
106 3. Extract the contents of the openh323_1.x.tar.gz file somewhere, eg:
109 tar -xzvf openh323_1.1alpha1.tar.gz
111 4. If you have not installed OpenH323 in your home directory (~/openh323)
112 then you will have to define the environment variable OPENH323DIR to
113 point to the correct directory.
115 Also make sure you have added the $OPENH323DIR/lib directory to your
116 LD_LIBRARY_PATH environment variable if you intend to use shared libraries
117 (the default under Linux).
119 There are examples for sh/bash and csh/tcsh below.
121 5. Build the H323 bootstrap code. Enter:
127 This may take some time, especially with the h245_*.cxx and h225.cxx
128 files. You may also need to add more swap space - 64M of real memory and
129 64M of swap might just be enough, if your machine does nothing else! Some
130 people have reported needing as much as 256M of swap - if your compiler
131 bombs out with a "virtual memory exhausted" error compiling h245_*.cxx
132 and h225.cxx, then increase your swap space.
134 Less space is required if you build the debug version - Debug builds on 64M ram are
135 very achievable. Opt builds on 164M ram are doable, but only just.
137 6. The result should be an executable called simph323, which will be located
138 in a directory dependent on the platform, eg sample/simple/obj_linux_x86_d.
139 To run it, use the following command:
141 ./sample/simple/obj_linux_x86_r/simph323
143 and you should get the usage help text.
145 9. Now you're on your own!
149 Voice Age G.729 Codec
150 =====================
152 For the Windows system it is possible to also have a G.729 codec
153 for non-commercial use by adding the Voice Age G.729A library to the system.
156 1. Get the Voice Age G.729 library from http://www.voiceage.com/g729/
158 2. Unpack it somewhere, preferably at teh same level as OpenH323, eg if
159 c:\work\openh323, then c:\work\va_g729a
161 3. Re-run the configure program.
163 4. Recompile your project.
170 H263 is a video compression format which is especially suited for low
171 bandwidth situations, such as a dial up link. By adding the requisite
172 library, recompiling openh323 and ohphone applications, H263 support is
175 Three H.263 codecs are available in the Openh323 codebase:
177 1) A fully RFC2190 compliant version using FFMPEG
178 2) An older non-RFC2190 compliant version also using FFMPEG
179 3) A non-RFC2190 compliant version using vich263
181 1) Fully RFC2190 compliant using FFMPEG.
182 This is the only H.263 codec currently interoperable with other RFC2190 compliant
183 applications like NetMeeting. As such, it is the recommended H.263 codec for use
184 in all future applications based on OpenH323.
186 2) Non-RFC2190 compliant using FFMPEG.
187 This H263 codec was labelled as non standard. Some hacks were added to the packets
188 generated by ffmpeg to get it working in a voip environment.
190 1) + 2) FFMPEG license issue
191 FFMPEG is licensed as either LGPL or GPL, depending on which components were used
192 at built time. Please check the configure script for further information.
193 OpenH323 assumes a LGPL license, and dynamically loads the FFMPEG library at run-time
194 in accordance with those terms.
197 Andrew Morrow who did the hard part of the implementation reports that:
198 I got something working using vic's H.263 (not plus) in OpenH323.
200 It does not interoperate with NetMeeting, but it does interoperate with
206 The library was built with
209 ./configure --enable-shared --disable-a52 --disable-pp --disable-ffserver --disable-ffplay
213 The code is in the CVS, external/ffmpeg directory at sourceforge.
214 Instructions on using the cvs are at http://sourceforge.net/cvs/?group_id=80674
219 If you have the external directory on your box, with vich263 and ffmpeg, but do
220 not wish to enable ffmpeg or vich263, you can
226 On recompiling the openh323 directory, you will not do configure again, so
227 your ffmpeg and vich263 settings will remain.
229 Should you wish to build in support for all H263 codecs, do:
231 export H323_VICH263=1
232 export H323_AVCODEC=1
234 ./configure --avcodec-dir=<<dir>> --enable-rfc2190avcodec=<<dir>>
237 Now, if you just want one of the codecs, just have the appropriate export statement.
238 Note that when you do ./configure, there is a clear statement what codec is on.
239 If you wish to remove both codecs, (after doing a configure with them on), do
241 export H323_VICH263=""
242 export H323_AVCODEC=""
247 Now, these settings are fixed, and remain in place on subsequent makes. Thus,
248 on recompiling the openh323 dir, you don't need to rerun configure.
250 Now, to test the operation of the H263 codec. I used the command below in
251 the ohphone directory:
253 ./obj_linux_x86_r/ohphone -ln --videotest --videolocal \
254 --videoreceive sdl --videodevice fake --videoinput 1 \
257 This brings up a SDL display window with two copies of the same image. The
258 image on the right is generated by the fake video device, on channel 1.
259 The image on the left is the decoded form of an image that has been
262 Wait a while, and then type q, the display will tell you what bit rate
263 was achieved, and the frame rate. The achieved bit rate should always be
264 less than that specified in the --videobitrate option
266 Now, you can try the H261 codec instead. To use H261, add to the command
267 line -D 263, so your command line becomes:
269 ./obj_linux_x86_r/ohphone -ln --videotest --videolocal \
270 --videoreceive sdl --videodevice fake --videoinput 1 \
271 --videobitrate 24 -D 263
273 Get mean, set a bit rate of 12 Kilobits/sec
275 Now, you might have a problem with it not finding the libavcodec.so library.
276 In this case, you need to extend your LD_LIBRARY_PATH
278 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
280 or append to /etc/ld.so.conf the directory /usr/local/lib and rerun ldconfig
282 ldconfig -C /etc/ld.so.conf Do this command as root.
284 Alternatively, append to the configure command above the phrase
285 --prefix=/usr. This will cause all the ffmpeg stuff to go in system
286 directories, where it will be found guaranteed.
291 The ffmpeg codec is built with MinGW and MSys.
293 Move ffmpeg directory from c:\external to c:\msys\1.0\home\administrator
298 ./configure --extra-cflags="-mno-cygwin -mms-bitfields" --extra-ldflags="-Wl,--add-stdcall-alias" --enable-mingw32 --enable-shared --disable-a52 --disable-pp --disable-ffserver --disable-ffplay
302 Move ffmpeg back to c:\external
304 Move c:\external\ffmpeg\libavcodec.dll to c:\openh323\lib
307 Go to external\vich263
308 Open the libvich263 workspace.
309 Select batch build, buld release and debug.
310 Leave libvich263.lib where it puts this library.
312 Open up a dos terminal, and go to c:\openh323
316 Check that options are set correctly in c:\openh323\include\openh323buildopts.h
318 If it fails to build openh323buildopts.h, well, it is OK.
319 Copy from pwlib/tools/configure the files configure.cpp and configure.dsp to the directory c:\openh323
320 Open configure.dsp project in msvc, build and run configure.exe
322 Recompile the OpenH323Lib and OpenH323DLL projects to create new OpenH323 libraries.
327 License details and a precompiled FFMPEG library:
328 http://www.voxgratia.org/h263_codec.html
330 MinGW/MSys and FFMPEG library building instructions:
331 http://www.salyens.com/?page=ffcodec
338 Here are common errors you might encounter for both Windows and Unix builds.
341 "Makefile", line 175: Missing dependency operator
342 "Makefile", line 177: Need an operator
343 "Makefile", line 179: Missing dependency operator
344 "Makefile", line 181: Need an operator
345 "Makefile", line 183: Missing dependency operator
346 "Makefile", line 185: Need an operator
348 Indicates you are using BSD Unix's Make command. You need to use
351 Thinking there are missing files.
353 A number of files, eg h235.h, h225.h etc, are generated files that are
354 created during the build process. If they are missing then something
355 probably went wrong with installation of flex/bison.
359 LINK : fatal error LNK1181: cannot open input file "ptlib.lib"
360 Error executing link.exe.
362 Indicates you have not set the paths in MSVC directories.
365 Performing Bison Step
366 c:\tools\share\bison.simple: No such file or directory
368 Indicates you have not installed bison correctly. In particular the
369 bison.simple file must be available to bison. Check the bison
370 documentation for details on this.
372 Attempting to compile GUI systems under Unix.
374 There are a number of partial implementations of the GUI code in the
375 $PWLIBDIR/src/pwlib directory tree. These are not required to get the
376 OhPhone application compiled. If you get those systems from the CVS
377 then you are basically on your own. Do not ask for support unless you
378 intend to help with the implementation!
381 See the FAQ at http://www.openh323.org/~openh323/fom.cgi for more.
385 Example environment for sh/bash
386 -------------------------------
390 OPENH323DIR=$HOME/openh323
392 LD_LIBRARY_PATH=$PWLIBDIR/lib:$OPENH323DIR/lib
393 export LD_LIBRARY_PATH
394 Example environment for csh/tcsh:
396 setenv PWLIBDIR $HOME/pwlib
397 setenv OPENH323DIR $HOME/openh323
398 setenv LD_LIBRARY_PATH $PWLIBDIR/lib:$OPENH323DIR/lib
403 Bison problem under Unix
404 ------------------------
406 The bison.simple file on many releases will not compile with the options used
407 by the PWLib getdate.y grammar. The options are required to make the date
408 parser thread safe so it is necessary to edit the bison.simple file to fix
411 The file is usually at /usr/lib/bison.simple but in the tradition of unix
412 could actually be anywhere. We leave it up to you to find it.
416 /* Prevent warning if -Wstrict-prototypes. */
422 /* Prevent warning if -Wstrict-prototypes. */
424 #ifndef YYPARSE_PARAM
429 To prevent the incorrect function prototype from being defined. The getdate.y
430 should then produce a getdate.tab.c file that will actually compile.
438 The bulk of this library is licensed under the MPL (Mozilla Public License)
439 version 1.0. In simple terms this license allows you to use the library for
440 any purpose, commercial or otherwise, provided the library is kept in tact
441 as a separate entity and any changes made to the library are made publicly
442 available under the same (MPL) license. It is important to realise that that
443 refers to changes to the library and not your application that is merely
444 linked to the library.
446 Note that due to a restriction in the GPL, any application you write that
447 uses anything another than GPL, eg our library with MPL, is technically in
448 breach of the GPL license. However, it should be noted that MPL does not
449 care about the license of the final application, and as only the author of
450 the GPL application is in breach of his own license and is unlikely to sue
451 themselves for that breach, in practice there is no problem with a GPL
452 application using an MPL or any other commercial library.
456 Portions of this library are derived from TOAST, using the copyright:
458 Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
459 Technische Universitaet Berlin
461 Any use of this software is permitted provided that this notice is not
462 removed and that neither the authors nor the Technische Universitaet Berlin
463 are deemed to have made any representations as to the suitability of this
464 software for any purpose nor are held responsible for any defects of
465 this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
467 As a matter of courtesy, the authors request to be informed about uses
468 this software has found, about bugs in this software, and about any
469 improvements that may be of general interest.
473 Portions of this library is derived from vic, http://www-nrg.ee.lbl.gov/vic/
474 Their copyright notice is below.
476 * Copyright (c) 1993-1995 The Regents of the University of California.
477 * All rights reserved.
479 * Redistribution and use in source and binary forms, with or without
480 * modification, are permitted provided that the following conditions
482 * 1. Redistributions of source code must retain the above copyright
483 * notice, this list of conditions and the following disclaimer.
484 * 2. Redistributions in binary form must reproduce the above copyright
485 * notice, this list of conditions and the following disclaimer in the
486 * documentation and/or other materials provided with the distribution.
487 * 3. All advertising materials mentioning features or use of this software
488 * must display the following acknowledgement:
489 * This product includes software developed by the Network Research
490 * Group at Lawrence Berkeley National Laboratory.
491 * 4. Neither the name of the University nor of the Laboratory may be used
492 * to endorse or promote products derived from this software without
493 * specific prior written permission.
495 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
496 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
497 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
498 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
499 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
500 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
501 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
502 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
503 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
504 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
508 Building on a unix box - how do I use the CVS - quick start - with all H263 codecs
509 ---------------------------------------------------------------------------------
510 1)Remove all pwlib/openh323 from system directories.
511 (like /usr/local/src/ or /usr/include etc)
513 2)create a directory, (call it cvs_h323)
517 4)In cvs_h323, create a file called environment.
519 The contents of the file are::::: export PWLIBDIR=~/cvs_h323/pwlib
520 export OPENH323DIR=~/cvs_h323/openh323
522 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/cvs_h323/pwlib/lib
523 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/cvs_h323/openh323/lib:
524 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/cvs_h323/external/ffmpeg/libavcodec:
525 export CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openh323
527 5) source environment
529 6) cvs login (For the password, just press enter)
531 7) cvs -z3 co ptlib_unix openh323 contrib external
539 11) cd ../external/ffmpeg (Now, read above for building and installing ffmpeg
540 & vich263) If you don't want h263 codecs, skip this line.
544 13) export H323_VICH263=1; export H323_AVCODEC=1 (If you don't want h263 codecs, skip this line.)
546 14) ./configure --enable-rfc2190avcodec=~/cvs_h323/external/ffmpeg/libavcodec
547 (((There should be messages about finding vic & ffmpeg)))
551 16) cd ../contrib/openmcu (or ../contrib/ohphone, or whereever)