~ubuntu-branches/ubuntu/oneiric/libav/oneiric

« back to all changes in this revision

Viewing changes to doc/general.texi

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-04-19 15:04:55 UTC
  • mfrom: (1.2.1 upstream)
  • mto: (1.3.4 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20110419150455-c1nac6gjm3t2aa4n
Tags: 4:0.7~b1-1
* New upstream version
* bump SONAME and SHLIBS
* configure flags --disable-stripping was removed upstream
* the MAINTAINERS file was removed upstream
* remove patch disable-configuration-warning.patch
* drop avfilter confflags, it is enable by default in 0.7
* libfaad wrapper has been removed upstream
* also update the *contents* of the lintian overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
@settitle General Documentation
4
4
@titlepage
5
 
@sp 7
6
5
@center @titlefont{General Documentation}
7
 
@sp 3
8
6
@end titlepage
9
7
 
 
8
@top
 
9
 
 
10
@contents
10
11
 
11
12
@chapter external libraries
12
13
 
13
 
FFmpeg can be hooked up with a number of external libraries to add support
 
14
Libav can be hooked up with a number of external libraries to add support
14
15
for more formats. None of them are used by default, their use has to be
15
16
explicitly requested by passing the appropriate flags to @file{./configure}.
16
17
 
17
18
@section OpenCORE AMR
18
19
 
19
 
FFmpeg can make use of the OpenCORE libraries for AMR-NB
 
20
Libav can make use of the OpenCORE libraries for AMR-NB
20
21
decoding/encoding and AMR-WB decoding.
21
22
 
22
23
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for
26
27
Note that OpenCORE is under the Apache License 2.0 (see
27
28
@url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
28
29
incompatible with the LGPL version 2.1 and GPL version 2. You have to
29
 
upgrade FFmpeg's license to LGPL version 3 (or if you have enabled
 
30
upgrade Libav's license to LGPL version 3 (or if you have enabled
30
31
GPL components, GPL version 3) to use it.
31
32
 
32
33
 
36
37
 
37
38
@section File Formats
38
39
 
39
 
FFmpeg supports the following file formats through the @code{libavformat}
 
40
Libav supports the following file formats through the @code{libavformat}
40
41
library:
41
42
 
42
43
@multitable @columnfractions .4 .1 .1 .4
49
50
@item American Laser Games MM   @tab   @tab X
50
51
    @tab Multimedia format used in games like Mad Dog McCree.
51
52
@item 3GPP AMR                  @tab X @tab X
 
53
@item Apple HTTP Live Streaming @tab   @tab X
52
54
@item ASF                       @tab X @tab X
53
55
@item AVI                       @tab X @tab X
54
56
@item AVISynth                  @tab   @tab X
60
62
    @tab Used in some games from Bethesda Softworks.
61
63
@item Bink                      @tab   @tab X
62
64
    @tab Multimedia format used by many games.
 
65
@item Bitmap Brothers JV        @tab   @tab X
 
66
    @tab Used in Z and Z95 games.
63
67
@item Brute Force & Ignorance   @tab   @tab X
64
68
    @tab Used in the game Flash Traffic: City of Angels.
65
69
@item Interplay C93             @tab   @tab X
77
81
    @tab Audio format used in some games by CRYO Interactive Entertainment.
78
82
@item D-Cinema audio            @tab X @tab X
79
83
@item Deluxe Paint Animation    @tab   @tab X
 
84
@item DFA                       @tab   @tab X
 
85
    @tab This format is used in Chronomaster game
80
86
@item DV video                  @tab X @tab X
81
87
@item DXA                       @tab   @tab X
82
88
    @tab This format is used in the non-Windows version of the Feeble Files
102
108
@item id Quake II CIN video     @tab   @tab X
103
109
@item id RoQ                    @tab X @tab X
104
110
    @tab Used in Quake III, Jedi Knight 2, other computer games.
105
 
@item IEC61937 encapsulation @tab X @tab
 
111
@item IEC61937 encapsulation @tab X @tab X
106
112
@item IFF                       @tab   @tab X
107
113
    @tab Interchange File Format
108
114
@item Interplay MVE             @tab   @tab X
109
115
    @tab Format used in various Interplay computer games.
110
116
@item IV8                       @tab   @tab X
111
117
    @tab A format generated by IndigoVision 8000 video server.
 
118
@item IVF (On2)                 @tab X @tab X
 
119
    @tab A format used by libvpx
112
120
@item LMLM4                     @tab   @tab X
113
121
    @tab Used by Linux Media Labs MPEG-4 PCI boards
 
122
@item LXF                       @tab   @tab X
 
123
    @tab VR native stream format, used by Leitch/Harris' video servers.
114
124
@item Matroska                  @tab X @tab X
115
125
@item Matroska audio            @tab X @tab
 
126
@item FFmpeg metadata           @tab X @tab X
 
127
    @tab Metadata in text format.
116
128
@item MAXIS XA                  @tab   @tab X
117
129
    @tab Used in Sim City 3000; file extension .xa.
118
130
@item MD Studio                 @tab   @tab X
 
131
@item Mobotix .mxg              @tab   @tab X
119
132
@item Monkey's Audio            @tab   @tab X
120
133
@item Motion Pixels MVI         @tab   @tab X
121
134
@item MOV/QuickTime/MP4         @tab X @tab X
154
167
@item QCP                       @tab   @tab X
155
168
@item raw ADTS (AAC)            @tab X @tab X
156
169
@item raw AC-3                  @tab X @tab X
157
 
@item raw Chinese AVS video     @tab   @tab X
 
170
@item raw Chinese AVS video     @tab X @tab X
158
171
@item raw CRI ADX               @tab X @tab X
159
172
@item raw Dirac                 @tab X @tab X
160
173
@item raw DNxHD                 @tab X @tab X
207
220
@item RL2                       @tab   @tab X
208
221
    @tab Audio and video format used in some games by Entertainment Software Partners.
209
222
@item RPL/ARMovie               @tab   @tab X
 
223
@item Lego Mindstorms RSO       @tab X @tab X
210
224
@item RTMP                      @tab X @tab X
211
225
    @tab Output is performed by publishing stream to RTMP server
212
 
@item RTP                       @tab   @tab X
 
226
@item RTP                       @tab X @tab X
213
227
@item RTSP                      @tab X @tab X
 
228
@item SAP                       @tab X @tab X
214
229
@item SDP                       @tab   @tab X
215
230
@item Sega FILM/CPK             @tab   @tab X
216
231
    @tab Used in many Sega Saturn console games.
226
241
@item Sony Wave64 (W64)         @tab   @tab X
227
242
@item SoX native format         @tab X @tab X
228
243
@item SUN AU format             @tab X @tab X
 
244
@item Text files                @tab   @tab X
229
245
@item THP                       @tab   @tab X
230
246
    @tab Used on the Nintendo GameCube.
231
247
@item Tiertex Limited SEQ       @tab   @tab X
235
251
@item WAV                       @tab X @tab X
236
252
@item WavPack                   @tab   @tab X
237
253
@item WebM                      @tab X @tab X
 
254
@item Windows Televison (WTV)   @tab   @tab X
238
255
@item Wing Commander III movie  @tab   @tab X
239
256
    @tab Multimedia format used in Origin's Wing Commander III computer game.
240
257
@item Westwood Studios audio    @tab   @tab X
241
258
    @tab Multimedia format used in Westwood Studios games.
242
259
@item Westwood Studios VQA      @tab   @tab X
243
260
    @tab Multimedia format used in Westwood Studios games.
 
261
@item xWMA                      @tab   @tab X
 
262
    @tab Microsoft audio container used by XAudio 2.
244
263
@item YUV4MPEG pipe             @tab X @tab X
245
264
@item Psygnosis YOP             @tab   @tab X
246
265
@end multitable
279
298
    @tab Portable GrayMap image
280
299
@item PGMYUV       @tab X @tab X
281
300
    @tab PGM with U and V components in YUV 4:2:0
 
301
@item PIC          @tab @tab X
 
302
    @tab Pictor/PC Paint
282
303
@item PNG          @tab X @tab X
283
304
    @tab 2/4 bpp not supported yet
284
305
@item PPM          @tab X @tab X
308
329
@item 8088flex TMV           @tab     @tab  X
309
330
@item 8SVX exponential       @tab     @tab  X
310
331
@item 8SVX fibonacci         @tab     @tab  X
 
332
@item A64 multicolor         @tab  X  @tab
 
333
    @tab Creates video suitable to be played on a commodore 64 (multicolor mode).
311
334
@item American Laser Games MM  @tab    @tab X
312
335
    @tab Used in games like Mad Dog McCree.
313
336
@item AMV Video              @tab     @tab  X
314
337
    @tab Used in Chinese MP3 players.
 
338
@item ANSI/ASCII art         @tab     @tab  X
315
339
@item Apple MJPEG-B          @tab     @tab  X
316
340
@item Apple QuickDraw        @tab     @tab  X
317
341
    @tab fourcc: qdrw
334
358
@item Bethesda VID video     @tab     @tab  X
335
359
    @tab Used in some games from Bethesda Softworks.
336
360
@item Bink Video             @tab     @tab  X
337
 
    @tab Support for version 'b' is missing.
 
361
@item Bitmap Brothers JV video  @tab   @tab X
338
362
@item Brute Force & Ignorance   @tab   @tab X
339
363
    @tab Used in the game Flash Traffic: City of Angels.
340
364
@item C93 video              @tab     @tab  X
343
367
    @tab fourcc: CSCD
344
368
@item CD+G                   @tab     @tab  X
345
369
    @tab Video codec for CD+G karaoke disks
346
 
@item Chinese AVS video      @tab     @tab  X
347
 
    @tab AVS1-P2, JiZhun profile
 
370
@item Chinese AVS video      @tab  E  @tab  X
 
371
    @tab AVS1-P2, JiZhun profile, encoding through external library libxavs
348
372
@item Delphine Software International CIN video  @tab     @tab  X
349
373
    @tab Codec used in Delphine Software International games.
350
374
@item Cinepak                @tab     @tab  X
351
375
@item Cirrus Logic AccuPak   @tab     @tab  X
352
376
    @tab fourcc: CLJR
353
377
@item Creative YUV (CYUV)    @tab     @tab  X
 
378
@item DFA                    @tab     @tab  X
 
379
    @tab Codec used in Chronomaster game.
354
380
@item Dirac                  @tab  E  @tab  E
355
381
    @tab supported through external libdirac/libschroedinger libraries
356
382
@item Deluxe Paint Animation @tab     @tab  X
407
433
    @tab Codec used in Worms games.
408
434
@item Kega Game Video (KGV1) @tab      @tab  X
409
435
    @tab Kega emulator screen capture codec.
 
436
@item Lagarith               @tab     @tab  X
410
437
@item LCL (LossLess Codec Library) MSZH  @tab     @tab  X
411
438
@item LCL (LossLess Codec Library) ZLIB  @tab  E  @tab  E
412
439
@item LOCO                   @tab     @tab  X
418
445
@item Miro VideoXL           @tab     @tab  X
419
446
    @tab fourcc: VIXL
420
447
@item MJPEG (Motion JPEG)    @tab  X  @tab  X
 
448
@item Mobotix MxPEG video    @tab     @tab  X
421
449
@item Motion Pixels video    @tab     @tab  X
422
450
@item MPEG-1 video           @tab  X  @tab  X
423
451
@item MPEG-1/2 video XvMC (X-Video Motion Compensation)  @tab     @tab  X
425
453
@item MPEG-2 video           @tab  X  @tab  X
426
454
@item MPEG-4 part 2          @tab  X  @tab  X
427
455
    @ libxvidcore can be used alternatively for encoding.
428
 
@item MPEG-4 part 2 Microsoft variant version 1  @tab  X  @tab  X
 
456
@item MPEG-4 part 2 Microsoft variant version 1  @tab     @tab  X
429
457
@item MPEG-4 part 2 Microsoft variant version 2  @tab  X  @tab  X
430
458
@item MPEG-4 part 2 Microsoft variant version 3  @tab  X  @tab  X
431
459
@item Nintendo Gamecube THP video  @tab     @tab  X
437
465
    @tab fourcc: VP50
438
466
@item On2 VP6                @tab     @tab  X
439
467
    @tab fourcc: VP60,VP61,VP62
440
 
@item VP8                    @tab  X  @tab  X
441
 
    @tab fourcc: VP80, de/encoding supported through external library libvpx
 
468
@item VP8                    @tab  E  @tab  X
 
469
    @tab fourcc: VP80, encoding supported through external library libvpx
442
470
@item planar RGB             @tab     @tab  X
443
471
    @tab fourcc: 8BPS
444
472
@item Q-team QPEG            @tab     @tab  X
450
478
    @tab fourcc: 'smc '
451
479
@item QuickTime video (RPZA) @tab     @tab  X
452
480
    @tab fourcc: rpza
 
481
@item R10K AJA Kona 10-bit RGB Codec     @tab     @tab  X
453
482
@item R210 Quicktime Uncompressed RGB 10-bit     @tab     @tab  X
454
483
@item Raw Video              @tab  X  @tab  X
455
484
@item RealVideo 1.0          @tab  X  @tab  X
491
520
    @tab not completely working
492
521
@item Wing Commander III / Xan  @tab     @tab  X
493
522
    @tab Used in Wing Commander III .MVE files.
 
523
@item Wing Commander IV / Xan  @tab     @tab  X
 
524
    @tab Used in Wing Commander IV.
494
525
@item Winnov WNV1            @tab     @tab  X
495
526
@item WMV7                   @tab  X  @tab  X
496
527
@item YAMAHA SMAF            @tab  X  @tab  X
511
542
@item Name @tab Encoding @tab Decoding @tab Comments
512
543
@item 8SVX audio             @tab     @tab  X
513
544
@item AAC                    @tab  E  @tab  X
514
 
    @tab encoding supported through external library libfaac
 
545
    @tab encoding supported through external library libfaac and libvo-aacenc
515
546
@item AC-3                   @tab IX  @tab  X
516
547
@item ADPCM 4X Movie         @tab     @tab  X
517
548
@item ADPCM CDROM XA         @tab     @tab  X
525
556
@item ADPCM Electronic Arts R2  @tab     @tab  X
526
557
@item ADPCM Electronic Arts R3  @tab     @tab  X
527
558
@item ADPCM Electronic Arts XAS @tab     @tab  X
 
559
@item ADPCM G.722            @tab  X  @tab  X
528
560
@item ADPCM G.726            @tab  X  @tab  X
529
561
@item ADPCM IMA AMV          @tab     @tab  X
530
562
    @tab Used in AMV files
558
590
@item ADPCM Yamaha           @tab  X  @tab  X
559
591
@item AMR-NB                 @tab  E  @tab  X
560
592
    @tab encoding supported through external library libopencore-amrnb
561
 
@item AMR-WB                 @tab     @tab  E
562
 
    @tab decoding supported through external library libopencore-amrwb
 
593
@item AMR-WB                 @tab  E  @tab  X
 
594
    @tab encoding supported through external library libvo-amrwbenc
563
595
@item Apple lossless audio   @tab  X  @tab  X
564
596
    @tab QuickTime fourcc 'alac'
565
597
@item Atrac 1                @tab     @tab  X
584
616
@item DV audio               @tab     @tab  X
585
617
@item Enhanced AC-3          @tab     @tab  X
586
618
@item FLAC (Free Lossless Audio Codec)  @tab  X  @tab  IX
587
 
@item G.729                  @tab     @tab  X
588
 
@item GSM                    @tab  E  @tab  E
589
 
    @tab supported through external library libgsm
590
 
@item GSM Microsoft variant  @tab  E  @tab  E
591
 
    @tab supported through external library libgsm
 
619
@item GSM                    @tab  E  @tab  X
 
620
    @tab encoding supported through external library libgsm
 
621
@item GSM Microsoft variant  @tab  E  @tab  X
 
622
    @tab encoding supported through external library libgsm
592
623
@item IMC (Intel Music Coder)  @tab     @tab  X
593
624
@item MACE (Macintosh Audio Compression/Expansion) 3:1  @tab     @tab  X
594
625
@item MACE (Macintosh Audio Compression/Expansion) 6:1  @tab     @tab  X
631
662
@item QCELP / PureVoice      @tab     @tab  X
632
663
@item QDesign Music Codec 2  @tab     @tab  X
633
664
    @tab There are still some distortions.
634
 
@item RealAudio 1.0 (14.4K)  @tab     @tab  X
 
665
@item RealAudio 1.0 (14.4K)  @tab  X  @tab  X
635
666
    @tab Real 14400 bit/s codec
636
667
@item RealAudio 2.0 (28.8K)  @tab     @tab  X
637
668
    @tab Real 28800 bit/s codec
642
673
@item Sierra VMD audio       @tab     @tab  X
643
674
    @tab Used in Sierra VMD files.
644
675
@item Smacker audio          @tab     @tab  X
645
 
@item Sonic                  @tab  X  @tab  X
646
 
    @tab experimental codec
647
 
@item Sonic lossless         @tab  X  @tab  X
648
 
    @tab experimental codec
649
676
@item Speex                  @tab     @tab  E
650
677
    @tab supported through external library libspeex
651
678
@item True Audio (TTA)       @tab     @tab  X
673
700
 
674
701
@multitable @columnfractions .4 .1 .1 .1 .1
675
702
@item Name @tab Muxing @tab Demuxing @tab Encoding @tab Decoding
676
 
@item SSA/ASS      @tab X @tab X
 
703
@item SSA/ASS      @tab X @tab X @tab X @tab X
677
704
@item DVB          @tab X @tab X @tab X @tab X
678
705
@item DVD          @tab X @tab X @tab X @tab X
679
706
@item PGS          @tab   @tab   @tab   @tab X
 
707
@item SubRip (SRT) @tab X @tab X @tab   @tab X
680
708
@item XSUB         @tab   @tab   @tab X @tab X
681
709
@end multitable
682
710
 
686
714
 
687
715
@multitable @columnfractions .4 .1
688
716
@item Name         @tab Support
 
717
@item Apple HTTP Live Streaming @tab X
689
718
@item file         @tab X
690
719
@item Gopher       @tab X
691
720
@item HTTP         @tab X
 
721
@item MMS          @tab X
692
722
@item pipe         @tab X
693
723
@item RTP          @tab X
694
724
@item TCP          @tab X
703
733
@multitable @columnfractions .4 .1 .1
704
734
@item Name              @tab Input  @tab Output
705
735
@item ALSA              @tab X      @tab X
706
 
@item BEOS audio        @tab X      @tab X
707
736
@item BKTR              @tab X      @tab
708
737
@item DV1394            @tab X      @tab
709
738
@item JACK              @tab X      @tab
720
749
 
721
750
@chapter Platform Specific information
722
751
 
723
 
@section BeOS
724
 
 
725
 
BeOS support is broken in mysterious ways.
726
 
 
727
752
@section DOS
728
753
 
729
754
Using a cross-compiler is preferred for various reasons.
730
755
 
731
756
@subsection DJGPP
732
757
 
733
 
FFmpeg cannot be compiled because of broken system headers, add
 
758
Libav cannot be compiled because of broken system headers, add
734
759
@code{--extra-cflags=-U__STRICT_ANSI__} to the configure options as a
735
760
workaround.
736
761
 
737
762
@section OS/2
738
763
 
739
 
For information about compiling FFmpeg on OS/2 see
 
764
For information about compiling Libav on OS/2 see
740
765
@url{http://www.edm2.com/index.php/FFmpeg}.
741
766
 
742
767
@section Unix-like
743
768
 
744
 
Some parts of FFmpeg cannot be built with version 2.15 of the GNU
 
769
Some parts of Libav cannot be built with version 2.15 of the GNU
745
770
assembler which is still provided by a few AMD64 distributions. To
746
771
make sure your compiler really uses the required version of gas
747
772
after a binutils upgrade, run:
756
781
 
757
782
@subsection BSD
758
783
 
759
 
BSD make will not build FFmpeg, you need to install and use GNU Make
 
784
BSD make will not build Libav, you need to install and use GNU Make
760
785
(@file{gmake}).
761
786
 
762
787
@subsubsection FreeBSD
769
794
 
770
795
@subsection (Open)Solaris
771
796
 
772
 
GNU Make is required to build FFmpeg, so you have to invoke (@file{gmake}),
 
797
GNU Make is required to build Libav, so you have to invoke (@file{gmake}),
773
798
standard Solaris Make will not work. When building with a non-c99 front-end
774
799
(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
775
800
or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
782
807
bash ./configure
783
808
@end example
784
809
 
 
810
@subsection Darwin (MacOS X, iPhone)
 
811
 
 
812
MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
 
813
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
 
814
assembler functions. Just download the Perl script and put it somewhere
 
815
in your PATH, Libav's configure will pick it up automatically.
 
816
 
785
817
@section Windows
786
818
 
787
 
To get help and instructions for building FFmpeg under Windows, check out
788
 
the FFmpeg Windows Help Forum at
789
 
@url{http://ffmpeg.arrozcru.org/}.
790
 
 
791
819
@subsection Native Windows compilation
792
820
 
793
 
FFmpeg can be built to run natively on Windows using the MinGW tools. Install
 
821
Libav can be built to run natively on Windows using the MinGW tools. Install
794
822
the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
795
823
You can find detailed installation
796
824
instructions in the download section and the FAQ.
797
825
 
798
 
FFmpeg does not build out-of-the-box with the packages the automated MinGW
 
826
Libav does not build out-of-the-box with the packages the automated MinGW
799
827
installer provides. It also requires coreutils to be installed and many other
800
828
packages updated to the latest version. The minimum version for some packages
801
829
are listed below:
807
835
@item mingw-runtime 3.15
808
836
@end itemize
809
837
 
810
 
FFmpeg automatically passes @code{-fno-common} to the compiler to work around
 
838
Libav automatically passes @code{-fno-common} to the compiler to work around
811
839
a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
812
840
 
813
841
Within the MSYS shell, configure and make with:
838
866
where SDL was installed. Verify that @file{sdl-config} can be launched from
839
867
the MSYS command line.
840
868
 
841
 
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
 
869
@item By using @code{./configure --enable-shared} when configuring Libav,
842
870
you can build libavutil, libavcodec and libavformat as DLLs.
843
871
 
844
872
@end itemize
845
873
 
846
874
@subsection Microsoft Visual C++ compatibility
847
875
 
848
 
As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
 
876
As stated in the FAQ, Libav will not compile under MSVC++. However, if you
849
877
want to use the libav* libraries in your own applications, you can still
850
878
compile those applications using MSVC++. But the libav* libraries you link
851
879
to @emph{must} be built with MinGW. However, you will not be able to debug
853
881
symbols generated by GCC.
854
882
We strongly recommend you to move over from MSVC++ to MinGW tools.
855
883
 
856
 
This description of how to use the FFmpeg libraries with MSVC++ is based on
 
884
This description of how to use the Libav libraries with MSVC++ is based on
857
885
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
858
886
you might have to modify the procedures slightly.
859
887
 
860
888
@subsubsection Using static libraries
861
889
 
862
 
Assuming you have just built and installed FFmpeg in @file{/usr/local}.
 
890
Assuming you have just built and installed Libav in @file{/usr/local}.
863
891
 
864
892
@enumerate
865
893
 
870
898
@item Write the source code for your application, or, for testing, just
871
899
copy the code from an existing sample application into the source file
872
900
that MSVC++ has already created for you. For example, you can copy
873
 
@file{libavformat/output-example.c} from the FFmpeg distribution.
 
901
@file{libavformat/output-example.c} from the Libav distribution.
874
902
 
875
903
@item Open the "Project / Properties" dialog box. In the "Configuration"
876
904
combo box, select "All Configurations" so that the changes you make will
877
905
affect both debug and release builds. In the tree view on the left hand
878
906
side, select "C/C++ / General", then edit the "Additional Include
879
 
Directories" setting to contain the path where the FFmpeg includes were
 
907
Directories" setting to contain the path where the Libav includes were
880
908
installed (i.e. @file{c:\msys\1.0\local\include}).
881
909
Do not add MinGW's include directory here, or the include files will
882
910
conflict with MSVC's.
884
912
@item Still in the "Project / Properties" dialog box, select
885
913
"Linker / General" from the tree view and edit the
886
914
"Additional Library Directories" setting to contain the @file{lib}
887
 
directory where FFmpeg was installed (i.e. @file{c:\msys\1.0\local\lib}),
 
915
directory where Libav was installed (i.e. @file{c:\msys\1.0\local\lib}),
888
916
the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
889
917
and the directory where MinGW's GCC libs are installed
890
918
(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
901
929
 
902
930
@item Click "OK" to close the "Project / Properties" dialog box.
903
931
 
904
 
@item MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
 
932
@item MSVC++ lacks some C99 header files that are fundamental for Libav.
905
933
Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
906
934
and install it in MSVC++'s include directory
907
935
(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
908
936
 
909
937
@item MSVC++ also does not understand the @code{inline} keyword used by
910
 
FFmpeg, so you must add this line before @code{#include}ing libav*:
 
938
Libav, so you must add this line before @code{#include}ing libav*:
911
939
@example
912
940
#define inline _inline
913
941
@end example
940
968
@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
941
969
from @file{Microsoft (R) Library Manager}, this means your environment
942
970
variables are set up correctly, the @file{Microsoft (R) Library Manager}
943
 
is on the path and will be used by FFmpeg to create
 
971
is on the path and will be used by Libav to create
944
972
MSVC++-compatible import libraries.
945
973
 
946
 
@item Build FFmpeg with
 
974
@item Build Libav with
947
975
 
948
976
@example
949
977
./configure --enable-shared --enable-memalign-hack
960
988
the static libraries, as described above. But in Step 4,
961
989
you should only need to add the directory where the LIB files are installed
962
990
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
963
 
installed in the @file{bin} directory. And instead of adding @file{libxx.a}
964
 
files, you should add @file{avcodec.lib}, @file{avformat.lib}, and
965
 
@file{avutil.lib}. There should be no need for @file{libmingwex.a},
 
991
installed in the @file{bin} directory. And instead of adding the static
 
992
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
 
993
(@file{avcodec.lib}, @file{avformat.lib}, and
 
994
@file{avutil.lib}). Note that you should not use the GCC import
 
995
libraries (@file{libxxx.dll.a} files), as these will give you undefined
 
996
reference errors. There should be no need for @file{libmingwex.a},
966
997
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
967
998
statically linked into the DLLs. The @file{bin} directory contains a bunch
968
999
of DLL files, but the ones that are actually used to run your application
969
1000
are the ones with a major version number in their filenames
970
1001
(i.e. @file{avcodec-51.dll}).
971
1002
 
 
1003
Libav headers do not declare global data for Windows DLLs through the usual
 
1004
dllexport/dllimport interface. Such data will be exported properly while
 
1005
building, but to use them in your MSVC++ code you will have to edit the
 
1006
appropriate headers and mark the data as dllimport. For example, in
 
1007
libavutil/pixdesc.h you should have:
 
1008
@example
 
1009
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
 
1010
@end example
 
1011
 
 
1012
Note that using import libraries created by dlltool requires
 
1013
the linker optimization option to be set to
 
1014
"References: Keep Unreferenced Data (/OPT:NOREF)", otherwise
 
1015
the resulting binaries will fail during runtime. This isn't
 
1016
required when using import libraries generated by lib.exe.
 
1017
 
972
1018
@subsection Cross compilation for Windows with Linux
973
1019
 
974
1020
You must use the MinGW cross compilation tools available at
975
1021
@url{http://www.mingw.org/}.
976
1022
 
977
 
Then configure FFmpeg with the following options:
 
1023
Then configure Libav with the following options:
978
1024
@example
979
1025
./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
980
1026
@end example
981
1027
(you can change the cross-prefix according to the prefix chosen for the
982
1028
MinGW tools).
983
1029
 
984
 
Then you can easily test FFmpeg with Wine
 
1030
Then you can easily test Libav with Wine
985
1031
(@url{http://www.winehq.com/}).
986
1032
 
987
1033
@subsection Compilation under Cygwin
992
1038
Install your Cygwin with all the "Base" packages, plus the
993
1039
following "Devel" ones:
994
1040
@example
995
 
binutils, gcc4-core, make, subversion, mingw-runtime, texi2html
 
1041
binutils, gcc4-core, make, git, mingw-runtime, texi2html
996
1042
@end example
997
1043
 
998
1044
And the following "Utils" one:
1015
1061
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
1016
1062
@end example
1017
1063
 
1018
 
If you want to build FFmpeg with additional libraries, download Cygwin
 
1064
If you want to build Libav with additional libraries, download Cygwin
1019
1065
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
1020
1066
@example
1021
1067
libogg-devel, libvorbis-devel
1025
1071
(@url{http://sourceware.org/cygwinports/}) :
1026
1072
 
1027
1073
@example
1028
 
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libfaad-devel, libgsm-devel,
 
1074
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
1029
1075
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
1030
1076
libxvidcore-devel
1031
1077
@end example