You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

878 lines
21KB

  1. <HTML>
  2. <HEAD>
  3. <!-- Created by texi2html 1.56k from ffmpeg-doc.texi on 19 November 2002 -->
  4. <TITLE>FFmpeg Documentation</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <H1>FFmpeg Documentation</H1>
  8. <P>
  9. <P><HR><P>
  10. <H1>Table of Contents</H1>
  11. <UL>
  12. <LI><A NAME="TOC1" HREF="ffmpeg-doc.html#SEC1">1. Introduction</A>
  13. <LI><A NAME="TOC2" HREF="ffmpeg-doc.html#SEC2">2. Quick Start</A>
  14. <UL>
  15. <LI><A NAME="TOC3" HREF="ffmpeg-doc.html#SEC3">2.1 Video and Audio grabbing</A>
  16. <LI><A NAME="TOC4" HREF="ffmpeg-doc.html#SEC4">2.2 Video and Audio file format convertion</A>
  17. </UL>
  18. <LI><A NAME="TOC5" HREF="ffmpeg-doc.html#SEC5">3. Invocation</A>
  19. <UL>
  20. <LI><A NAME="TOC6" HREF="ffmpeg-doc.html#SEC6">3.1 Syntax</A>
  21. <LI><A NAME="TOC7" HREF="ffmpeg-doc.html#SEC7">3.2 Main options</A>
  22. <LI><A NAME="TOC8" HREF="ffmpeg-doc.html#SEC8">3.3 Video Options</A>
  23. <LI><A NAME="TOC9" HREF="ffmpeg-doc.html#SEC9">3.4 Audio Options</A>
  24. <LI><A NAME="TOC10" HREF="ffmpeg-doc.html#SEC10">3.5 Advanced options</A>
  25. <LI><A NAME="TOC11" HREF="ffmpeg-doc.html#SEC11">3.6 Protocols</A>
  26. </UL>
  27. <LI><A NAME="TOC12" HREF="ffmpeg-doc.html#SEC12">4. Tips</A>
  28. <LI><A NAME="TOC13" HREF="ffmpeg-doc.html#SEC13">5. Supported File Formats and Codecs</A>
  29. <UL>
  30. <LI><A NAME="TOC14" HREF="ffmpeg-doc.html#SEC14">5.1 File Formats</A>
  31. <LI><A NAME="TOC15" HREF="ffmpeg-doc.html#SEC15">5.2 Video Codecs</A>
  32. <LI><A NAME="TOC16" HREF="ffmpeg-doc.html#SEC16">5.3 Audio Codecs</A>
  33. </UL>
  34. <LI><A NAME="TOC17" HREF="ffmpeg-doc.html#SEC17">6. Platform Specific information</A>
  35. <UL>
  36. <LI><A NAME="TOC18" HREF="ffmpeg-doc.html#SEC18">6.1 Linux</A>
  37. <LI><A NAME="TOC19" HREF="ffmpeg-doc.html#SEC19">6.2 BSD</A>
  38. <LI><A NAME="TOC20" HREF="ffmpeg-doc.html#SEC20">6.3 Windows</A>
  39. <LI><A NAME="TOC21" HREF="ffmpeg-doc.html#SEC21">6.4 MacOS X</A>
  40. <LI><A NAME="TOC22" HREF="ffmpeg-doc.html#SEC22">6.5 BeOS</A>
  41. </UL>
  42. <LI><A NAME="TOC23" HREF="ffmpeg-doc.html#SEC23">7. Developpers Guide</A>
  43. <UL>
  44. <LI><A NAME="TOC24" HREF="ffmpeg-doc.html#SEC24">7.1 API</A>
  45. <LI><A NAME="TOC25" HREF="ffmpeg-doc.html#SEC25">7.2 Integrating libavcodec or libavformat in your program</A>
  46. <LI><A NAME="TOC26" HREF="ffmpeg-doc.html#SEC26">7.3 Coding Rules</A>
  47. <LI><A NAME="TOC27" HREF="ffmpeg-doc.html#SEC27">7.4 Submitting patches</A>
  48. <LI><A NAME="TOC28" HREF="ffmpeg-doc.html#SEC28">7.5 Regression tests</A>
  49. </UL>
  50. </UL>
  51. <P><HR><P>
  52. <P>
  53. FFmpeg Documentation
  54. <H1><A NAME="SEC1" HREF="ffmpeg-doc.html#TOC1">1. Introduction</A></H1>
  55. <P>
  56. FFmpeg is a very fast video and audio converter. It can also grab from
  57. a live audio/video source.
  58. The command line interface is designed to be intuitive, in the sense
  59. that ffmpeg tries to figure out all the parameters, when
  60. possible. You have usually to give only the target bitrate you want.
  61. <P>
  62. FFmpeg can also convert from any sample rate to any other, and resize
  63. video on the fly with a high quality polyphase filter.
  64. <H1><A NAME="SEC2" HREF="ffmpeg-doc.html#TOC2">2. Quick Start</A></H1>
  65. <H2><A NAME="SEC3" HREF="ffmpeg-doc.html#TOC3">2.1 Video and Audio grabbing</A></H2>
  66. <P>
  67. FFmpeg can use a video4linux compatible video source and any Open Sound
  68. System audio source:
  69. <PRE>
  70. ffmpeg /tmp/out.mpg
  71. </PRE>
  72. <P>
  73. Note that you must activate the right video source and channel
  74. before launching ffmpeg. You can use any TV viewer such as xawtv by
  75. Gerd Knorr which I find very good. You must also set correctly the
  76. audio recording levels with a standard mixer.
  77. <H2><A NAME="SEC4" HREF="ffmpeg-doc.html#TOC4">2.2 Video and Audio file format convertion</A></H2>
  78. <P>
  79. * ffmpeg can use any supported file format and protocol as input:
  80. <P>
  81. Examples:
  82. <P>
  83. * You can input from YUV files:
  84. <PRE>
  85. ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
  86. </PRE>
  87. <P>
  88. It will use the files:
  89. <PRE>
  90. /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
  91. /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
  92. </PRE>
  93. <P>
  94. The Y files use twice the resolution of the U and V files. They are
  95. raw files, without header. They can be generated by all decent video
  96. decoders. You must specify the size of the image with the '-s' option
  97. if ffmpeg cannot guess it.
  98. <P>
  99. * You can input from a RAW YUV420P file:
  100. <PRE>
  101. ffmpeg -i /tmp/test.yuv /tmp/out.avi
  102. </PRE>
  103. <P>
  104. The RAW YUV420P is a file containing RAW YUV planar, for each frame first
  105. come the Y plane followed by U and V planes, which are half vertical and
  106. horizontal resolution.
  107. <P>
  108. * You can output to a RAW YUV420P file:
  109. <PRE>
  110. ffmpeg -i mydivx.avi -o hugefile.yuv
  111. </PRE>
  112. <P>
  113. * You can set several input files and output files:
  114. <PRE>
  115. ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
  116. </PRE>
  117. <P>
  118. Convert the audio file a.wav and the raw yuv video file a.yuv
  119. to mpeg file a.mpg
  120. <P>
  121. * You can also do audio and video convertions at the same time:
  122. <PRE>
  123. ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
  124. </PRE>
  125. <P>
  126. Convert the sample rate of a.wav to 22050 Hz and encode it to MPEG audio.
  127. <P>
  128. * You can encode to several formats at the same time and define a
  129. mapping from input stream to output streams:
  130. <PRE>
  131. ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
  132. </PRE>
  133. <P>
  134. Convert a.wav to a.mp2 at 64 kbits and b.mp2 at 128 kbits. '-map
  135. file:index' specify which input stream is used for each output
  136. stream, in the order of the definition of output streams.
  137. <P>
  138. * You can transcode decrypted VOBs
  139. <PRE>
  140. ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
  141. </PRE>
  142. <P>
  143. This is a typicall DVD ripper example, input from a VOB file, output
  144. to an AVI file with MPEG-4 video and MP3 audio, note that in this
  145. command we use B frames so the MPEG-4 stream is DivX5 compatible, GOP
  146. size is 300 that means an INTRA frame every 10 seconds for 29.97 fps
  147. input video. Also the audio stream is MP3 encoded so you need LAME
  148. support which is enabled using <CODE>--enable-mp3lame</CODE> when
  149. configuring. The mapping is particullary usefull for DVD transcoding
  150. to get the desired audio language.
  151. <P>
  152. NOTE: to see the supported input formats, use <CODE>ffmpeg -formats</CODE>.
  153. <H1><A NAME="SEC5" HREF="ffmpeg-doc.html#TOC5">3. Invocation</A></H1>
  154. <H2><A NAME="SEC6" HREF="ffmpeg-doc.html#TOC6">3.1 Syntax</A></H2>
  155. <P>
  156. The generic syntax is:
  157. <PRE>
  158. ffmpeg [[options][-i input_file]]... {[options] output_file}...
  159. </PRE>
  160. <P>
  161. If no input file is given, audio/video grabbing is done.
  162. <P>
  163. As a general rule, options are applied to the next specified
  164. file. For example, if you give the '-b 64' option, it sets the video
  165. bitrate of the next file. Format option may be needed for raw input
  166. files.
  167. <P>
  168. By default, ffmpeg tries to convert as losslessly as possible: it
  169. uses the same audio and video parameter fors the outputs as the one
  170. specified for the inputs.
  171. <H2><A NAME="SEC7" HREF="ffmpeg-doc.html#TOC7">3.2 Main options</A></H2>
  172. <DL COMPACT>
  173. <DT><SAMP>`-L'</SAMP>
  174. <DD>
  175. show license
  176. <DT><SAMP>`-h'</SAMP>
  177. <DD>
  178. show help
  179. <DT><SAMP>`-formats'</SAMP>
  180. <DD>
  181. show available formats, codecs, protocols, ...
  182. <DT><SAMP>`-f fmt'</SAMP>
  183. <DD>
  184. force format
  185. <DT><SAMP>`-i filename'</SAMP>
  186. <DD>
  187. input file name
  188. <DT><SAMP>`-y'</SAMP>
  189. <DD>
  190. overwrite output files
  191. <DT><SAMP>`-t duration'</SAMP>
  192. <DD>
  193. set the recording time in seconds. <CODE>hh:mm:ss[.xxx]</CODE> syntax is also
  194. supported.
  195. <DT><SAMP>`-title string'</SAMP>
  196. <DD>
  197. set the title
  198. <DT><SAMP>`-author string'</SAMP>
  199. <DD>
  200. set the author
  201. <DT><SAMP>`-copyright string'</SAMP>
  202. <DD>
  203. set the copyright
  204. <DT><SAMP>`-comment string'</SAMP>
  205. <DD>
  206. set the comment
  207. <DT><SAMP>`-b bitrate'</SAMP>
  208. <DD>
  209. set video bitrate (in kbit/s)
  210. </DL>
  211. <H2><A NAME="SEC8" HREF="ffmpeg-doc.html#TOC8">3.3 Video Options</A></H2>
  212. <DL COMPACT>
  213. <DT><SAMP>`-s size'</SAMP>
  214. <DD>
  215. set frame size [160x128]
  216. <DT><SAMP>`-r fps'</SAMP>
  217. <DD>
  218. set frame rate [25]
  219. <DT><SAMP>`-b bitrate'</SAMP>
  220. <DD>
  221. set the video bitrate in kbit/s [200]
  222. <DT><SAMP>`-vn'</SAMP>
  223. <DD>
  224. disable video recording [no]
  225. <DT><SAMP>`-bt tolerance'</SAMP>
  226. <DD>
  227. set video bitrate tolerance (in kbit/s)
  228. <DT><SAMP>`-sameq'</SAMP>
  229. <DD>
  230. use same video quality as source (implies VBR)
  231. <DT><SAMP>`-pass n'</SAMP>
  232. <DD>
  233. select the pass number (1 or 2). It is useful to do two pass encoding. The statistics of the video are recorded in the first pass and the video at the exact requested bit rate is generated in the second pass.
  234. <DT><SAMP>`-passlogfile file'</SAMP>
  235. <DD>
  236. select two pass log file name
  237. </DL>
  238. <H2><A NAME="SEC9" HREF="ffmpeg-doc.html#TOC9">3.4 Audio Options</A></H2>
  239. <DL COMPACT>
  240. <DT><SAMP>`-ab bitrate'</SAMP>
  241. <DD>
  242. set audio bitrate (in kbit/s)
  243. <DT><SAMP>`-ar freq'</SAMP>
  244. <DD>
  245. set the audio sampling freq [44100]
  246. <DT><SAMP>`-ab bitrate'</SAMP>
  247. <DD>
  248. set the audio bitrate in kbit/s [64]
  249. <DT><SAMP>`-ac channels'</SAMP>
  250. <DD>
  251. set the number of audio channels [1]
  252. <DT><SAMP>`-an'</SAMP>
  253. <DD>
  254. disable audio recording [no]
  255. </DL>
  256. <H2><A NAME="SEC10" HREF="ffmpeg-doc.html#TOC10">3.5 Advanced options</A></H2>
  257. <DL COMPACT>
  258. <DT><SAMP>`-map file:stream'</SAMP>
  259. <DD>
  260. set input stream mapping
  261. <DT><SAMP>`-g gop_size'</SAMP>
  262. <DD>
  263. set the group of picture size
  264. <DT><SAMP>`-intra'</SAMP>
  265. <DD>
  266. use only intra frames
  267. <DT><SAMP>`-qscale q'</SAMP>
  268. <DD>
  269. use fixed video quantiser scale (VBR)
  270. <DT><SAMP>`-qmin q'</SAMP>
  271. <DD>
  272. min video quantiser scale (VBR)
  273. <DT><SAMP>`-qmax q'</SAMP>
  274. <DD>
  275. max video quantiser scale (VBR)
  276. <DT><SAMP>`-qdiff q'</SAMP>
  277. <DD>
  278. max difference between the quantiser scale (VBR)
  279. <DT><SAMP>`-qblur blur'</SAMP>
  280. <DD>
  281. video quantiser scale blur (VBR)
  282. <DT><SAMP>`-qcomp compression'</SAMP>
  283. <DD>
  284. video quantiser scale compression (VBR)
  285. <DT><SAMP>`-vd device'</SAMP>
  286. <DD>
  287. set video device
  288. <DT><SAMP>`-vcodec codec'</SAMP>
  289. <DD>
  290. force video codec
  291. <DT><SAMP>`-me method'</SAMP>
  292. <DD>
  293. set motion estimation method
  294. <DT><SAMP>`-bf frames'</SAMP>
  295. <DD>
  296. use 'frames' B frames (only MPEG-4)
  297. <DT><SAMP>`-hq'</SAMP>
  298. <DD>
  299. activate high quality settings
  300. <DT><SAMP>`-4mv'</SAMP>
  301. <DD>
  302. use four motion vector by macroblock (only MPEG-4)
  303. <DT><SAMP>`-ad device'</SAMP>
  304. <DD>
  305. set audio device
  306. <DT><SAMP>`-acodec codec'</SAMP>
  307. <DD>
  308. force audio codec
  309. <DT><SAMP>`-deinterlace'</SAMP>
  310. <DD>
  311. deinterlace pictures
  312. <DT><SAMP>`-benchmark'</SAMP>
  313. <DD>
  314. add timings for benchmarking
  315. <DT><SAMP>`-hex'</SAMP>
  316. <DD>
  317. dump each input packet
  318. <DT><SAMP>`-psnr'</SAMP>
  319. <DD>
  320. calculate PSNR of compressed frames
  321. <DT><SAMP>`-vstats'</SAMP>
  322. <DD>
  323. dump video coding statistics to file
  324. </DL>
  325. <H2><A NAME="SEC11" HREF="ffmpeg-doc.html#TOC11">3.6 Protocols</A></H2>
  326. <P>
  327. The filename can be <TT>`-'</TT> to read from the standard input or to write
  328. to the standard output.
  329. <P>
  330. ffmpeg handles also many protocols specified with the URL syntax.
  331. <P>
  332. Use 'ffmpeg -formats' to have a list of the supported protocols.
  333. <P>
  334. The protocol <CODE>http:</CODE> is currently used only to communicate with
  335. ffserver (see the ffserver documentation). When ffmpeg will be a
  336. video player it will also be used for streaming :-)
  337. <H1><A NAME="SEC12" HREF="ffmpeg-doc.html#TOC12">4. Tips</A></H1>
  338. <UL>
  339. <LI>For streaming at very low bit rate application, use a low frame rate
  340. and a small gop size. This is especially true for real video where
  341. the Linux player does not seem to be very fast, so it can miss
  342. frames. An example is:
  343. <PRE>
  344. ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm
  345. </PRE>
  346. <LI>The parameter 'q' which is displayed while encoding is the current
  347. quantizer. The value of 1 indicates that a very good quality could
  348. be achieved. The value of 31 indicates the worst quality. If q=31
  349. too often, it means that the encoder cannot compress enough to meet
  350. your bit rate. You must either increase the bit rate, decrease the
  351. frame rate or decrease the frame size.
  352. <LI>If your computer is not fast enough, you can speed up the
  353. compression at the expense of the compression ratio. You can use
  354. '-me zero' to speed up motion estimation, and '-intra' to disable
  355. completly motion estimation (you have only I frames, which means it
  356. is about as good as JPEG compression).
  357. <LI>To have very low bitrates in audio, reduce the sampling frequency
  358. (down to 22050 kHz for mpeg audio, 22050 or 11025 for ac3).
  359. <LI>To have a constant quality (but a variable bitrate), use the option
  360. '-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
  361. quality).
  362. <LI>When converting video files, you can use the '-sameq' option which
  363. uses in the encoder the same quality factor than in the decoder. It
  364. allows to be almost lossless in encoding.
  365. </UL>
  366. <H1><A NAME="SEC13" HREF="ffmpeg-doc.html#TOC13">5. Supported File Formats and Codecs</A></H1>
  367. <P>
  368. You can use the <CODE>-formats</CODE> option to have an exhaustive list.
  369. <H2><A NAME="SEC14" HREF="ffmpeg-doc.html#TOC14">5.1 File Formats</A></H2>
  370. <P>
  371. FFmpeg supports the following file formats thru the <CODE>libavformat</CODE>
  372. library.
  373. <TABLE BORDER>
  374. <TR><TD>Supported File Format </TD><TD> Encoding </TD><TD> Decoding </TD><TD> Comments</TD>
  375. </TR>
  376. <TR><TD>MPEG audio </TD><TD> X </TD><TD> X</TD>
  377. </TR>
  378. <TR><TD>MPEG1 systems </TD><TD> X </TD><TD> X</TD>
  379. </TD><TD> muxed audio and video
  380. </TR>
  381. <TR><TD>MPEG2 PS </TD><TD> X </TD><TD> X</TD>
  382. </TD><TD> also known as <CODE>VOB</CODE> file
  383. </TR>
  384. <TR><TD>MPEG2 TS </TD><TD> </TD><TD> X</TD>
  385. </TD><TD> also known as DVB Transport Stream
  386. </TR>
  387. <TR><TD>ASF</TD><TD> X </TD><TD> X</TD>
  388. </TR>
  389. <TR><TD>AVI</TD><TD> X </TD><TD> X</TD>
  390. </TR>
  391. <TR><TD>WAV</TD><TD> X </TD><TD> X</TD>
  392. </TR>
  393. <TR><TD>Macromedia Flash</TD><TD> X </TD><TD> X</TD>
  394. </TD><TD> Only embedded audio is decoded
  395. </TR>
  396. <TR><TD>Real Audio and Video </TD><TD> X </TD><TD> X</TD>
  397. </TR>
  398. <TR><TD>PGM, YUV, PPM, JPEG images </TD><TD> X </TD><TD> X</TD>
  399. </TR>
  400. <TR><TD>Animated GIF </TD><TD> X </TD><TD></TD>
  401. </TD><TD> Only uncompressed GIFs are generated
  402. </TR>
  403. <TR><TD>Raw AC3 </TD><TD> X </TD><TD> X</TD>
  404. </TR>
  405. <TR><TD>Raw MJPEG </TD><TD> X </TD><TD> X</TD>
  406. </TR>
  407. <TR><TD>Raw MPEG video </TD><TD> X </TD><TD> X</TD>
  408. </TR>
  409. <TR><TD>Raw PCM8/16 bits, mulaw/Alaw</TD><TD> X </TD><TD> X</TD>
  410. </TR>
  411. <TR><TD>SUN AU format </TD><TD> X </TD><TD> X</TD>
  412. </TR>
  413. <TR><TD>Quicktime </TD><TD> </TD><TD> X</TD>
  414. </TR>
  415. <TR><TD>MPEG4 </TD><TD> </TD><TD> X</TD>
  416. </TD><TD> MPEG4 is a variant of Quicktime
  417. </TR>
  418. <TR><TD>Raw MPEG4 video </TD><TD> </TD><TD> X</TD>
  419. </TD><TD> Only small files are supported.
  420. </TR>
  421. <TR><TD>DV </TD><TD> </TD><TD> X</TD>
  422. </TD><TD> Only the video track is decoded.
  423. </TR></TABLE>
  424. <P>
  425. <CODE>X</CODE> means that the encoding (resp. decoding) is supported.
  426. <H2><A NAME="SEC15" HREF="ffmpeg-doc.html#TOC15">5.2 Video Codecs</A></H2>
  427. <TABLE BORDER>
  428. <TR><TD>Supported Codec </TD><TD> Encoding </TD><TD> Decoding </TD><TD> Comments</TD>
  429. </TR>
  430. <TR><TD>MPEG1 video </TD><TD> X </TD><TD> X</TD>
  431. </TR>
  432. <TR><TD>MPEG2 video </TD><TD> </TD><TD> X</TD>
  433. </TR>
  434. <TR><TD>MPEG4 </TD><TD> X </TD><TD> X </TD><TD> Also known as DIVX4/5</TD>
  435. </TR>
  436. <TR><TD>MSMPEG4 V1 </TD><TD> X </TD><TD> X</TD>
  437. </TR>
  438. <TR><TD>MSMPEG4 V2 </TD><TD> X </TD><TD> X</TD>
  439. </TR>
  440. <TR><TD>MSMPEG4 V3 </TD><TD> X </TD><TD> X </TD><TD> Also known as DIVX3</TD>
  441. </TR>
  442. <TR><TD>WMV7 </TD><TD> X </TD><TD> X</TD>
  443. </TR>
  444. <TR><TD>H263(+) </TD><TD> X </TD><TD> X </TD><TD> Also known as Real Video 1.0</TD>
  445. </TR>
  446. <TR><TD>MJPEG </TD><TD> X </TD><TD> X</TD>
  447. </TR>
  448. <TR><TD>DV </TD><TD> </TD><TD> X</TD>
  449. </TR></TABLE>
  450. <P>
  451. <CODE>X</CODE> means that the encoding (resp. decoding) is supported.
  452. <P>
  453. Check at <A HREF="http://www.mplayerhq.hu/~michael/codec-features.html">http://www.mplayerhq.hu/~michael/codec-features.html</A> to
  454. get a precise comparison of FFmpeg MPEG4 codec compared to the other
  455. solutions.
  456. <H2><A NAME="SEC16" HREF="ffmpeg-doc.html#TOC16">5.3 Audio Codecs</A></H2>
  457. <TABLE BORDER>
  458. <TR><TD>Supported Codec </TD><TD> Encoding </TD><TD> Decoding </TD><TD> Comments</TD>
  459. </TR>
  460. <TR><TD>MPEG audio layer 2 </TD><TD> IX </TD><TD> IX</TD>
  461. </TR>
  462. <TR><TD>MPEG audio layer 1/3 </TD><TD> IX </TD><TD> IX</TD>
  463. </TD><TD> MP3 encoding is supported thru the external library LAME
  464. </TR>
  465. <TR><TD>AC3 </TD><TD> IX </TD><TD> X</TD>
  466. </TD><TD> liba52 is used internally for decoding.
  467. </TR>
  468. <TR><TD>Vorbis </TD><TD> X </TD><TD></TD>
  469. </TD><TD> encoding is supported thru the external library libvorbis.
  470. </TR></TABLE>
  471. <P>
  472. <CODE>X</CODE> means that the encoding (resp. decoding) is supported.
  473. <P>
  474. <CODE>I</CODE> means that an integer only version is available too (ensures highest
  475. performances on systems without hardware floating point support).
  476. <H1><A NAME="SEC17" HREF="ffmpeg-doc.html#TOC17">6. Platform Specific information</A></H1>
  477. <H2><A NAME="SEC18" HREF="ffmpeg-doc.html#TOC18">6.1 Linux</A></H2>
  478. <P>
  479. ffmpeg should be compiled with at least GCC 2.95.3. GCC 3.2 is the
  480. prefered compiler now for ffmpeg. All futur optimizations will depend on
  481. features only found in GCC 3.2.
  482. <H2><A NAME="SEC19" HREF="ffmpeg-doc.html#TOC19">6.2 BSD</A></H2>
  483. <H2><A NAME="SEC20" HREF="ffmpeg-doc.html#TOC20">6.3 Windows</A></H2>
  484. <H2><A NAME="SEC21" HREF="ffmpeg-doc.html#TOC21">6.4 MacOS X</A></H2>
  485. <H2><A NAME="SEC22" HREF="ffmpeg-doc.html#TOC22">6.5 BeOS</A></H2>
  486. <P>
  487. The configure script should guess the configuration itself.
  488. Networking support is currently not finished.
  489. errno issues fixed by Andrew Bachmann.
  490. <P>
  491. Old stuff:
  492. <P>
  493. François Revol - revol at free dot fr - April 2002
  494. <P>
  495. The configure script should guess the configuration itself,
  496. however I still didn't tested building on net_server version of BeOS.
  497. <P>
  498. ffserver is broken (needs poll() implementation).
  499. <P>
  500. There is still issues with errno codes, which are negative in BeOs, and
  501. that ffmpeg negates when returning. This ends up turning errors into
  502. valid results, then crashes.
  503. (To be fixed)
  504. <H1><A NAME="SEC23" HREF="ffmpeg-doc.html#TOC23">7. Developpers Guide</A></H1>
  505. <H2><A NAME="SEC24" HREF="ffmpeg-doc.html#TOC24">7.1 API</A></H2>
  506. <UL>
  507. <LI>libavcodec is the library containing the codecs (both encoding and
  508. decoding). See <TT>`libavcodec/apiexample.c'</TT> to see how to use it.
  509. <LI>libavformat is the library containing the file formats handling (mux and
  510. demux code for several formats). (no example yet, the API is likely to
  511. evolve).
  512. </UL>
  513. <H2><A NAME="SEC25" HREF="ffmpeg-doc.html#TOC25">7.2 Integrating libavcodec or libavformat in your program</A></H2>
  514. <P>
  515. You can integrate all the source code of the libraries to link them
  516. statically to avoid any version problem. All you need is to provide a
  517. 'config.mak' and a 'config.h' in the parent directory. See the defines
  518. generated by ./configure to understand what is needed.
  519. <P>
  520. You can use libavcodec or libavformat in your commercial program, but
  521. <EM>any patch you make must be published</EM>. The best way to proceed is
  522. to send your patches to the ffmpeg mailing list.
  523. <H2><A NAME="SEC26" HREF="ffmpeg-doc.html#TOC26">7.3 Coding Rules</A></H2>
  524. <P>
  525. ffmpeg is programmed in ANSI C language. GCC extensions are
  526. tolerated. Indent size is 4. The TAB character should not be used.
  527. <P>
  528. The presentation is the one specified by 'indent -i4 -kr'.
  529. <P>
  530. Main priority in ffmpeg is simplicity and small code size (=less
  531. bugs).
  532. <P>
  533. Comments: for functions visible from other modules, use the JavaDoc
  534. format (see examples in <TT>`libav/utils.c'</TT>) so that a documentation
  535. can be generated automatically.
  536. <H2><A NAME="SEC27" HREF="ffmpeg-doc.html#TOC27">7.4 Submitting patches</A></H2>
  537. <P>
  538. When you submit your patch, try to send a unified diff (diff '-u'
  539. option). I cannot read other diffs :-)
  540. <P>
  541. Run the regression tests before submitting a patch so that you can
  542. verify that there is no big problems.
  543. <P>
  544. Except if your patch is really big and adds an important feature, by
  545. submitting it to me, you accept implicitely to put it under my
  546. copyright. I prefer to do this to avoid potential problems if
  547. licensing of ffmpeg changes.
  548. <P>
  549. Patches should be posted as base64 encoded attachments (or any other
  550. encoding which ensures that the patch wont be trashed during
  551. transmission) to the ffmpeg-devel mailinglist, see
  552. <A HREF="http://lists.sourceforge.net/lists/listinfo/ffmpeg-devel">http://lists.sourceforge.net/lists/listinfo/ffmpeg-devel</A>
  553. <H2><A NAME="SEC28" HREF="ffmpeg-doc.html#TOC28">7.5 Regression tests</A></H2>
  554. <P>
  555. Before submitting a patch (or commiting with CVS), you should at least
  556. test that you did not break anything.
  557. <P>
  558. The regression test build a synthetic video stream and a synthetic
  559. audio stream. Then there are encoded then decoded with all codecs or
  560. formats. The CRC (or MD5) of each generated file is recorded in a
  561. result file. Then a 'diff' is launched with the reference results and
  562. the result file.
  563. <P>
  564. Run 'make test' to test all the codecs.
  565. <P>
  566. Run 'make libavtest' to test all the codecs.
  567. <P>
  568. [Of course, some patches may change the regression tests results. In
  569. this case, the regression tests reference results shall be modified
  570. accordingly].
  571. <P><HR><P>
  572. This document was generated on 19 November 2002 using
  573. <A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A>&nbsp;1.56k.
  574. </BODY>
  575. </HTML>