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.

854 lines
21KB

  1. \input texinfo @c -*- texinfo -*-
  2. @settitle FFmpeg Documentation
  3. @titlepage
  4. @sp 7
  5. @center @titlefont{FFmpeg Documentation}
  6. @sp 3
  7. @end titlepage
  8. @chapter Introduction
  9. FFmpeg is a very fast video and audio converter. It can also grab from
  10. a live audio/video source.
  11. The command line interface is designed to be intuitive, in the sense
  12. that FFmpeg tries to figure out all parameters that can possibly be
  13. derived automatically. You usually only have to specify the target
  14. bitrate you want.
  15. FFmpeg can also convert from any sample rate to any other, and resize
  16. video on the fly with a high quality polyphase filter.
  17. @chapter Quick Start
  18. @c man begin EXAMPLES
  19. @section Video and Audio grabbing
  20. FFmpeg can grab video and audio from devices given that you specify the input
  21. format and device.
  22. @example
  23. ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
  24. @end example
  25. Note that you must activate the right video source and channel before
  26. launching FFmpeg with any TV viewer such as xawtv
  27. (@url{http://bytesex.org/xawtv/}) by Gerd Knorr. You also
  28. have to set the audio recording levels correctly with a
  29. standard mixer.
  30. @section X11 grabbing
  31. FFmpeg can grab the X11 display.
  32. @example
  33. ffmpeg -f x11grab -s cif -i :0.0 /tmp/out.mpg
  34. @end example
  35. 0.0 is display.screen number of your X11 server, same as
  36. the DISPLAY environment variable.
  37. @example
  38. ffmpeg -f x11grab -s cif -i :0.0+10,20 /tmp/out.mpg
  39. @end example
  40. 0.0 is display.screen number of your X11 server, same as the DISPLAY environment
  41. variable. 10 is the x-offset and 20 the y-offset for the grabbing.
  42. @section Video and Audio file format conversion
  43. * FFmpeg can use any supported file format and protocol as input:
  44. Examples:
  45. * You can use YUV files as input:
  46. @example
  47. ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
  48. @end example
  49. It will use the files:
  50. @example
  51. /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
  52. /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
  53. @end example
  54. The Y files use twice the resolution of the U and V files. They are
  55. raw files, without header. They can be generated by all decent video
  56. decoders. You must specify the size of the image with the @option{-s} option
  57. if FFmpeg cannot guess it.
  58. * You can input from a raw YUV420P file:
  59. @example
  60. ffmpeg -i /tmp/test.yuv /tmp/out.avi
  61. @end example
  62. test.yuv is a file containing raw YUV planar data. Each frame is composed
  63. of the Y plane followed by the U and V planes at half vertical and
  64. horizontal resolution.
  65. * You can output to a raw YUV420P file:
  66. @example
  67. ffmpeg -i mydivx.avi hugefile.yuv
  68. @end example
  69. * You can set several input files and output files:
  70. @example
  71. ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
  72. @end example
  73. Converts the audio file a.wav and the raw YUV video file a.yuv
  74. to MPEG file a.mpg.
  75. * You can also do audio and video conversions at the same time:
  76. @example
  77. ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
  78. @end example
  79. Converts a.wav to MPEG audio at 22050Hz sample rate.
  80. * You can encode to several formats at the same time and define a
  81. mapping from input stream to output streams:
  82. @example
  83. ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0
  84. @end example
  85. Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map
  86. file:index' specifies which input stream is used for each output
  87. stream, in the order of the definition of output streams.
  88. * You can transcode decrypted VOBs
  89. @example
  90. ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec libmp3lame -ab 128k snatch.avi
  91. @end example
  92. This is a typical DVD ripping example; the input is a VOB file, the
  93. output an AVI file with MPEG-4 video and MP3 audio. Note that in this
  94. command we use B-frames so the MPEG-4 stream is DivX5 compatible, and
  95. GOP size is 300 which means one intra frame every 10 seconds for 29.97fps
  96. input video. Furthermore, the audio stream is MP3-encoded so you need
  97. to enable LAME support by passing @code{--enable-libmp3lame} to configure.
  98. The mapping is particularly useful for DVD transcoding
  99. to get the desired audio language.
  100. NOTE: To see the supported input formats, use @code{ffmpeg -formats}.
  101. @c man end
  102. @chapter Invocation
  103. @section Syntax
  104. The generic syntax is:
  105. @example
  106. @c man begin SYNOPSIS
  107. ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}...
  108. @c man end
  109. @end example
  110. @c man begin DESCRIPTION
  111. As a general rule, options are applied to the next specified
  112. file. Therefore, order is important, and you can have the same
  113. option on the command line multiple times. Each occurrence is
  114. then applied to the next input or output file.
  115. * To set the video bitrate of the output file to 64kbit/s:
  116. @example
  117. ffmpeg -i input.avi -b 64k output.avi
  118. @end example
  119. * To force the frame rate of the input and output file to 24 fps:
  120. @example
  121. ffmpeg -r 24 -i input.avi output.avi
  122. @end example
  123. * To force the frame rate of the output file to 24 fps:
  124. @example
  125. ffmpeg -i input.avi -r 24 output.avi
  126. @end example
  127. * To force the frame rate of input file to 1 fps and the output file to 24 fps:
  128. @example
  129. ffmpeg -r 1 -i input.avi -r 24 output.avi
  130. @end example
  131. The format option may be needed for raw input files.
  132. By default, FFmpeg tries to convert as losslessly as possible: It
  133. uses the same audio and video parameters for the outputs as the one
  134. specified for the inputs.
  135. @c man end
  136. @c man begin OPTIONS
  137. @section Main options
  138. @table @option
  139. @item -L
  140. Show license.
  141. @item -h
  142. Show help.
  143. @item -version
  144. Show version.
  145. @item -formats
  146. Show available formats, codecs, protocols, ...
  147. @item -f fmt
  148. Force format.
  149. @item -i filename
  150. input filename
  151. @item -y
  152. Overwrite output files.
  153. @item -t duration
  154. Restrict the transcoded/captured video sequence
  155. to the duration specified in seconds.
  156. @code{hh:mm:ss[.xxx]} syntax is also supported.
  157. @item -fs limit_size
  158. Set the file size limit.
  159. @item -ss position
  160. Seek to given time position in seconds.
  161. @code{hh:mm:ss[.xxx]} syntax is also supported.
  162. @item -itsoffset offset
  163. Set the input time offset in seconds.
  164. @code{[-]hh:mm:ss[.xxx]} syntax is also supported.
  165. This option affects all the input files that follow it.
  166. The offset is added to the timestamps of the input files.
  167. Specifying a positive offset means that the corresponding
  168. streams are delayed by 'offset' seconds.
  169. @item -title string
  170. Set the title.
  171. @item -timestamp time
  172. Set the timestamp.
  173. @item -author string
  174. Set the author.
  175. @item -copyright string
  176. Set the copyright.
  177. @item -comment string
  178. Set the comment.
  179. @item -album string
  180. Set the album.
  181. @item -track number
  182. Set the track.
  183. @item -year number
  184. Set the year.
  185. @item -v verbose
  186. Control amount of logging.
  187. @item -target type
  188. Specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd",
  189. "ntsc-svcd", ... ). All the format options (bitrate, codecs,
  190. buffer sizes) are then set automatically. You can just type:
  191. @example
  192. ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
  193. @end example
  194. Nevertheless you can specify additional options as long as you know
  195. they do not conflict with the standard, as in:
  196. @example
  197. ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
  198. @end example
  199. @item -dframes number
  200. Set the number of data frames to record.
  201. @item -scodec codec
  202. Force subtitle codec ('copy' to copy stream).
  203. @item -newsubtitle
  204. Add a new subtitle stream to the current output stream.
  205. @item -slang code
  206. Set the ISO 639 language code (3 letters) of the current subtitle stream.
  207. @end table
  208. @section Video Options
  209. @table @option
  210. @item -b bitrate
  211. Set the video bitrate in bit/s (default = 200 kb/s).
  212. @item -vframes number
  213. Set the number of video frames to record.
  214. @item -r fps
  215. Set frame rate (Hz value, fraction or abbreviation), (default = 25).
  216. @item -s size
  217. Set frame size. The format is @samp{wxh} (ffserver default = 160x128, ffmpeg default = same as source).
  218. The following abbreviations are recognized:
  219. @table @samp
  220. @item sqcif
  221. 128x96
  222. @item qcif
  223. 176x144
  224. @item cif
  225. 352x288
  226. @item 4cif
  227. 704x576
  228. @item qqvga
  229. 160x120
  230. @item qvga
  231. 320x240
  232. @item vga
  233. 640x480
  234. @item svga
  235. 800x600
  236. @item xga
  237. 1024x768
  238. @item uxga
  239. 1600x1200
  240. @item qxga
  241. 2048x1536
  242. @item sxga
  243. 1280x1024
  244. @item qsxga
  245. 2560x2048
  246. @item hsxga
  247. 5120x4096
  248. @item wvga
  249. 852x480
  250. @item wxga
  251. 1366x768
  252. @item wsxga
  253. 1600x1024
  254. @item wuxga
  255. 1920x1200
  256. @item woxga
  257. 2560x1600
  258. @item wqsxga
  259. 3200x2048
  260. @item wquxga
  261. 3840x2400
  262. @item whsxga
  263. 6400x4096
  264. @item whuxga
  265. 7680x4800
  266. @item cga
  267. 320x200
  268. @item ega
  269. 640x350
  270. @item hd480
  271. 852x480
  272. @item hd720
  273. 1280x720
  274. @item hd1080
  275. 1920x1080
  276. @end table
  277. @item -aspect aspect
  278. Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
  279. @item -croptop size
  280. Set top crop band size (in pixels).
  281. @item -cropbottom size
  282. Set bottom crop band size (in pixels).
  283. @item -cropleft size
  284. Set left crop band size (in pixels).
  285. @item -cropright size
  286. Set right crop band size (in pixels).
  287. @item -padtop size
  288. Set top pad band size (in pixels).
  289. @item -padbottom size
  290. Set bottom pad band size (in pixels).
  291. @item -padleft size
  292. Set left pad band size (in pixels).
  293. @item -padright size
  294. Set right pad band size (in pixels).
  295. @item -padcolor (hex color)
  296. Set color of padded bands. The value for padcolor is expressed
  297. as a six digit hexadecimal number where the first two digits
  298. represent red, the middle two digits green and last two digits
  299. blue (default = 000000 (black)).
  300. @item -vn
  301. Disable video recording.
  302. @item -bt tolerance
  303. Set video bitrate tolerance (in bit/s).
  304. @item -maxrate bitrate
  305. Set max video bitrate (in bit/s).
  306. @item -minrate bitrate
  307. Set min video bitrate (in bit/s).
  308. @item -bufsize size
  309. Set video buffer verifier buffer size (in bits).
  310. @item -vcodec codec
  311. Force video codec to @var{codec}. Use the @code{copy} special value to
  312. tell that the raw codec data must be copied as is.
  313. @item -sameq
  314. Use same video quality as source (implies VBR).
  315. @item -pass n
  316. Select the pass number (1 or 2). It is useful to do two pass
  317. encoding. The statistics of the video are recorded in the first
  318. pass and the video is generated at the exact requested bitrate
  319. in the second pass.
  320. @item -passlogfile file
  321. Set two pass logfile name to @var{file}.
  322. @item -newvideo
  323. Add a new video stream to the current output stream.
  324. @end table
  325. @section Advanced Video Options
  326. @table @option
  327. @item -pix_fmt format
  328. Set pixel format. Use 'list' as parameter to show all the supported
  329. pixel formats.
  330. @item -sws_flags flags
  331. Set SwScaler flags (only available when compiled with SwScaler support).
  332. @item -g gop_size
  333. Set the group of pictures size.
  334. @item -intra
  335. Use only intra frames.
  336. @item -vdt n
  337. Discard threshold.
  338. @item -qscale q
  339. Use fixed video quantizer scale (VBR).
  340. @item -qmin q
  341. minimum video quantizer scale (VBR)
  342. @item -qmax q
  343. maximum video quantizer scale (VBR)
  344. @item -qdiff q
  345. maximum difference between the quantizer scales (VBR)
  346. @item -qblur blur
  347. video quantizer scale blur (VBR)
  348. @item -qcomp compression
  349. video quantizer scale compression (VBR)
  350. @item -lmin lambda
  351. minimum video lagrange factor (VBR)
  352. @item -lmax lambda
  353. max video lagrange factor (VBR)
  354. @item -mblmin lambda
  355. minimum macroblock quantizer scale (VBR)
  356. @item -mblmax lambda
  357. maximum macroblock quantizer scale (VBR)
  358. These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units,
  359. but you may use the QP2LAMBDA constant to easily convert from 'q' units:
  360. @example
  361. ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
  362. @end example
  363. @item -rc_init_cplx complexity
  364. initial complexity for single pass encoding
  365. @item -b_qfactor factor
  366. qp factor between P- and B-frames
  367. @item -i_qfactor factor
  368. qp factor between P- and I-frames
  369. @item -b_qoffset offset
  370. qp offset between P- and B-frames
  371. @item -i_qoffset offset
  372. qp offset between P- and I-frames
  373. @item -rc_eq equation
  374. Set rate control equation (@pxref{FFmpeg formula
  375. evaluator}) (default = @code{tex^qComp}).
  376. @item -rc_override override
  377. rate control override for specific intervals
  378. @item -me_method method
  379. Set motion estimation method to @var{method}.
  380. Available methods are (from lowest to best quality):
  381. @table @samp
  382. @item zero
  383. Try just the (0, 0) vector.
  384. @item phods
  385. @item log
  386. @item x1
  387. @item hex
  388. @item umh
  389. @item epzs
  390. (default method)
  391. @item full
  392. exhaustive search (slow and marginally better than epzs)
  393. @end table
  394. @item -dct_algo algo
  395. Set DCT algorithm to @var{algo}. Available values are:
  396. @table @samp
  397. @item 0
  398. FF_DCT_AUTO (default)
  399. @item 1
  400. FF_DCT_FASTINT
  401. @item 2
  402. FF_DCT_INT
  403. @item 3
  404. FF_DCT_MMX
  405. @item 4
  406. FF_DCT_MLIB
  407. @item 5
  408. FF_DCT_ALTIVEC
  409. @end table
  410. @item -idct_algo algo
  411. Set IDCT algorithm to @var{algo}. Available values are:
  412. @table @samp
  413. @item 0
  414. FF_IDCT_AUTO (default)
  415. @item 1
  416. FF_IDCT_INT
  417. @item 2
  418. FF_IDCT_SIMPLE
  419. @item 3
  420. FF_IDCT_SIMPLEMMX
  421. @item 4
  422. FF_IDCT_LIBMPEG2MMX
  423. @item 5
  424. FF_IDCT_PS2
  425. @item 6
  426. FF_IDCT_MLIB
  427. @item 7
  428. FF_IDCT_ARM
  429. @item 8
  430. FF_IDCT_ALTIVEC
  431. @item 9
  432. FF_IDCT_SH4
  433. @item 10
  434. FF_IDCT_SIMPLEARM
  435. @end table
  436. @item -er n
  437. Set error resilience to @var{n}.
  438. @table @samp
  439. @item 1
  440. FF_ER_CAREFUL (default)
  441. @item 2
  442. FF_ER_COMPLIANT
  443. @item 3
  444. FF_ER_AGGRESSIVE
  445. @item 4
  446. FF_ER_VERY_AGGRESSIVE
  447. @end table
  448. @item -ec bit_mask
  449. Set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
  450. the following values:
  451. @table @samp
  452. @item 1
  453. FF_EC_GUESS_MVS (default = enabled)
  454. @item 2
  455. FF_EC_DEBLOCK (default = enabled)
  456. @end table
  457. @item -bf frames
  458. Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
  459. @item -mbd mode
  460. macroblock decision
  461. @table @samp
  462. @item 0
  463. FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg).
  464. @item 1
  465. FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
  466. @item 2
  467. FF_MB_DECISION_RD: rate distortion
  468. @end table
  469. @item -4mv
  470. Use four motion vector by macroblock (MPEG-4 only).
  471. @item -part
  472. Use data partitioning (MPEG-4 only).
  473. @item -bug param
  474. Work around encoder bugs that are not auto-detected.
  475. @item -strict strictness
  476. How strictly to follow the standards.
  477. @item -aic
  478. Enable Advanced intra coding (h263+).
  479. @item -umv
  480. Enable Unlimited Motion Vector (h263+)
  481. @item -deinterlace
  482. Deinterlace pictures.
  483. @item -ilme
  484. Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
  485. Use this option if your input file is interlaced and you want
  486. to keep the interlaced format for minimum losses.
  487. The alternative is to deinterlace the input stream with
  488. @option{-deinterlace}, but deinterlacing introduces losses.
  489. @item -psnr
  490. Calculate PSNR of compressed frames.
  491. @item -vstats
  492. Dump video coding statistics to @file{vstats_HHMMSS.log}.
  493. @item -vstats_file file
  494. Dump video coding statistics to @var{file}.
  495. @item -vhook module
  496. Insert video processing @var{module}. @var{module} contains the module
  497. name and its parameters separated by spaces.
  498. @item -top n
  499. top=1/bottom=0/auto=-1 field first
  500. @item -dc precision
  501. Intra_dc_precision.
  502. @item -vtag fourcc/tag
  503. Force video tag/fourcc.
  504. @item -qphist
  505. Show QP histogram.
  506. @item -vbsf bitstream filter
  507. Bitstream filters available are "dump_extra", "remove_extra", "noise".
  508. @end table
  509. @section Audio Options
  510. @table @option
  511. @item -aframes number
  512. Set the number of audio frames to record.
  513. @item -ar freq
  514. Set the audio sampling frequency (default = 44100 Hz).
  515. @item -ab bitrate
  516. Set the audio bitrate in bit/s (default = 64k).
  517. @item -ac channels
  518. Set the number of audio channels (default = 1).
  519. @item -an
  520. Disable audio recording.
  521. @item -acodec codec
  522. Force audio codec to @var{codec}. Use the @code{copy} special value to
  523. specify that the raw codec data must be copied as is.
  524. @item -newaudio
  525. Add a new audio track to the output file. If you want to specify parameters,
  526. do so before @code{-newaudio} (@code{-acodec}, @code{-ab}, etc..).
  527. Mapping will be done automatically, if the number of output streams is equal to
  528. the number of input streams, else it will pick the first one that matches. You
  529. can override the mapping using @code{-map} as usual.
  530. Example:
  531. @example
  532. ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio
  533. @end example
  534. @item -alang code
  535. Set the ISO 639 language code (3 letters) of the current audio stream.
  536. @end table
  537. @section Advanced Audio options:
  538. @table @option
  539. @item -atag fourcc/tag
  540. Force audio tag/fourcc.
  541. @item -absf bitstream filter
  542. Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".
  543. @end table
  544. @section Subtitle options:
  545. @table @option
  546. @item -scodec codec
  547. Force subtitle codec ('copy' to copy stream).
  548. @item -newsubtitle
  549. Add a new subtitle stream to the current output stream.
  550. @item -slang code
  551. Set the ISO 639 language code (3 letters) of the current subtitle stream.
  552. @end table
  553. @section Audio/Video grab options
  554. @table @option
  555. @item -vc channel
  556. Set video grab channel (DV1394 only).
  557. @item -tvstd standard
  558. Set television standard (NTSC, PAL (SECAM)).
  559. @item -isync
  560. Synchronize read on input.
  561. @end table
  562. @section Advanced options
  563. @table @option
  564. @item -map input stream id[:input stream id]
  565. Set stream mapping from input streams to output streams.
  566. Just enumerate the input streams in the order you want them in the output.
  567. [input stream id] sets the (input) stream to sync against.
  568. @item -map_meta_data outfile:infile
  569. Set meta data information of outfile from infile.
  570. @item -debug
  571. Print specific debug info.
  572. @item -benchmark
  573. Add timings for benchmarking.
  574. @item -dump
  575. Dump each input packet.
  576. @item -hex
  577. When dumping packets, also dump the payload.
  578. @item -bitexact
  579. Only use bit exact algorithms (for codec testing).
  580. @item -ps size
  581. Set packet size in bits.
  582. @item -re
  583. Read input at native frame rate. Mainly used to simulate a grab device.
  584. @item -loop_input
  585. Loop over the input stream. Currently it works only for image
  586. streams. This option is used for automatic FFserver testing.
  587. @item -loop_output number_of_times
  588. Repeatedly loop output for formats that support looping such as animated GIF
  589. (0 will loop the output infinitely).
  590. @item -threads count
  591. Thread count.
  592. @item -vsync parameter
  593. Video sync method. Video will be stretched/squeezed to match the timestamps,
  594. it is done by duplicating and dropping frames. With -map you can select from
  595. which stream the timestamps should be taken. You can leave either video or
  596. audio unchanged and sync the remaining stream(s) to the unchanged one.
  597. @item -async samples_per_second
  598. Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps,
  599. the parameter is the maximum samples per second by which the audio is changed.
  600. -async 1 is a special case where only the start of the audio stream is corrected
  601. without any later correction.
  602. @item -copyts
  603. Copy timestamps from input to output.
  604. @item -shortest
  605. Finish encoding when the shortest input stream ends.
  606. @item -dts_delta_threshold
  607. Timestamp discontinuity delta threshold.
  608. @item -muxdelay seconds
  609. Set the maximum demux-decode delay.
  610. @item -muxpreload seconds
  611. Set the initial demux-decode delay.
  612. @end table
  613. @node FFmpeg formula evaluator
  614. @section FFmpeg formula evaluator
  615. When evaluating a rate control string, FFmpeg uses an internal formula
  616. evaluator.
  617. The following binary operators are available: @code{+}, @code{-},
  618. @code{*}, @code{/}, @code{^}.
  619. The following unary operators are available: @code{+}, @code{-},
  620. @code{(...)}.
  621. The following functions are available:
  622. @table @var
  623. @item sinh(x)
  624. @item cosh(x)
  625. @item tanh(x)
  626. @item sin(x)
  627. @item cos(x)
  628. @item tan(x)
  629. @item exp(x)
  630. @item log(x)
  631. @item squish(x)
  632. @item gauss(x)
  633. @item abs(x)
  634. @item max(x, y)
  635. @item min(x, y)
  636. @item gt(x, y)
  637. @item lt(x, y)
  638. @item eq(x, y)
  639. @item bits2qp(bits)
  640. @item qp2bits(qp)
  641. @end table
  642. The following constants are available:
  643. @table @var
  644. @item PI
  645. @item E
  646. @item iTex
  647. @item pTex
  648. @item tex
  649. @item mv
  650. @item fCode
  651. @item iCount
  652. @item mcVar
  653. @item var
  654. @item isI
  655. @item isP
  656. @item isB
  657. @item avgQP
  658. @item qComp
  659. @item avgIITex
  660. @item avgPITex
  661. @item avgPPTex
  662. @item avgBPTex
  663. @item avgTex
  664. @end table
  665. @c man end
  666. @ignore
  667. @setfilename ffmpeg
  668. @settitle FFmpeg video converter
  669. @c man begin SEEALSO
  670. ffserver(1), ffplay(1) and the HTML documentation of @file{ffmpeg}.
  671. @c man end
  672. @c man begin AUTHOR
  673. Fabrice Bellard
  674. @c man end
  675. @end ignore
  676. @section Protocols
  677. The filename can be @file{-} to read from standard input or to write
  678. to standard output.
  679. FFmpeg also handles many protocols specified with an URL syntax.
  680. Use 'ffmpeg -formats' to see a list of the supported protocols.
  681. The protocol @code{http:} is currently used only to communicate with
  682. FFserver (see the FFserver documentation). When FFmpeg will be a
  683. video player it will also be used for streaming :-)
  684. @chapter Tips
  685. @itemize
  686. @item For streaming at very low bitrate application, use a low frame rate
  687. and a small GOP size. This is especially true for RealVideo where
  688. the Linux player does not seem to be very fast, so it can miss
  689. frames. An example is:
  690. @example
  691. ffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
  692. @end example
  693. @item The parameter 'q' which is displayed while encoding is the current
  694. quantizer. The value 1 indicates that a very good quality could
  695. be achieved. The value 31 indicates the worst quality. If q=31 appears
  696. too often, it means that the encoder cannot compress enough to meet
  697. your bitrate. You must either increase the bitrate, decrease the
  698. frame rate or decrease the frame size.
  699. @item If your computer is not fast enough, you can speed up the
  700. compression at the expense of the compression ratio. You can use
  701. '-me zero' to speed up motion estimation, and '-intra' to disable
  702. motion estimation completely (you have only I-frames, which means it
  703. is about as good as JPEG compression).
  704. @item To have very low audio bitrates, reduce the sampling frequency
  705. (down to 22050 kHz for MPEG audio, 22050 or 11025 for AC3).
  706. @item To have a constant quality (but a variable bitrate), use the option
  707. '-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
  708. quality).
  709. @item When converting video files, you can use the '-sameq' option which
  710. uses the same quality factor in the encoder as in the decoder.
  711. It allows almost lossless encoding.
  712. @end itemize
  713. @bye