]> git.sesse.net Git - ffmpeg/blobdiff - doc/faq.texi
deprecate sws_scale_ordered(), as it now is a duplicate of sws_scale()
[ffmpeg] / doc / faq.texi
index 13eb0e1bb81511283d4b84af8e40da85e6fdcf9f..0c214227762cd588c2064b9f1e4add969336d44f 100644 (file)
@@ -16,17 +16,12 @@ Even if ffmpeg can read the file format, it may not support all its
 codecs. Please consult the supported codec list in the ffmpeg
 documentation.
 
-@section I get audio/video synchronization problems when grabbing.
-
-Currently, the grabbing stuff does not handle synchronisation
-correctly. You are free to correct it. A fix is planned.
-
 @section How do I encode JPEGs to another format ?
 
 If the JPEGs are named img1.jpg, img2.jpg, img3.jpg,..., use:
 
 @example
-  ffmpeg -i img%d.jpg /tmp/a.mpg
+  ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
 @end example
 
 @samp{%d} is replaced by the image number.
@@ -35,11 +30,41 @@ If the JPEGs are named img1.jpg, img2.jpg, img3.jpg,..., use:
 
 The same system is used for the other image formats.
 
+@section How do I encode movie to single pictures ?
+
+Use:
+
+@example
+  ffmpeg -i movie.mpg movie%d.jpg
+@end example
+
+The @file{movie.mpg} used as input will be converted to
+@file{movie1.jpg}, @file{movie2.jpg}, etc...
+
+Instead of relying on file format self-recognition, you may also use
+@table @option
+@item -vcodec ppm
+@item -vcodec png
+@item -vcodec mjpeg
+@end table
+to force the encoding.
+
+Applying that to the previous example:
+@example
+  ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
+@end example
+
+Beware that there is no "jpeg" codec. Use "mjpeg" instead.
+
 @section FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it ?
 
 No. FFmpeg only supports open source codecs. Windows DLLs are not
 portable, bloated and often slow.
 
+@section I get "Unsupported codec (id=86043) for input stream #0.1". What is the problem ?
+
+This is the Qcelp codec, FFmpeg has no support for that codec currently. Try mencoder/mplayer it might work.
+
 @section Why do I see a slight quality degradation with multithreaded MPEG* encoding ?
 
 For multithreaded MPEG* encoding, the encoded slices must be independent,
@@ -108,13 +133,13 @@ and pass 'combfilter=2'.
 
 @section I have a problem with an old version of ffmpeg; where should I report it?
 Nowhere. Upgrade to the latest release or if there is no recent release upgrade
-to CVS. You could also try to report it. Maybe you will get lucky and
+to Subversion HEAD. You could also try to report it. Maybe you will get lucky and
 become the first person in history to get an answer different from "upgrade
-to CVS".
+to Subversion HEAD".
 
 @section -f jpeg doesn't work.
 
-Try '-f image -img jpeg test%d.jpg'.
+Try '-f image2 test%d.jpg'.
 
 @section Why can I not change the framerate?
 
@@ -136,6 +161,76 @@ a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will
 force the fourcc 'xvid' to be stored as the video fourcc rather than the
 default.
 
+@section How do I encode videos which play on the iPod?
+
+@table @option
+@item needed stuff
+-acodec aac -vcodec mpeg4 width<=320 height<=240
+@item working stuff
+4mv, title
+@item non-working stuff
+B-frames
+@item example command line
+ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X output.mp4
+@end table
+
+@section How do I encode videos which play on the PSP?
+
+@table @option
+@item needed stuff
+-acodec aac -vcodec mpeg4 width*height<=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp
+@item working stuff
+4mv, title
+@item non-working stuff
+B-frames
+@item example command line
+ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200kb -ar 24000 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp output.mp4
+@item needed stuff for H.264
+-acodec aac -vcodec h264 width*height<=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
+@item working stuff for H.264
+title, loop filter
+@item non-working stuff for H.264
+CAVLC
+@item example command line
+ffmpeg -i input -acodec aac -ab 128 -vcodec h264 -b 1200kb -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
+@end table
+
+@section Which are good parameters for encoding high quality MPEG4?
+
+-mbd rd -flags +4mv+trell+aic -cmp 2 -subcmp 2 -g 300 -pass 1/2
+things to try: -bf 2, -flags qprd, -flags mv0, -flags skiprd
+
+@section Which are good parameters for encoding high quality MPEG1/MPEG2?
+
+-mbd rd -flags +trell -cmp 2 -subcmp 2 -g 100 -pass 1/2
+but beware the -g 100 might cause problems with some decoders
+things to try: -bf 2, -flags qprd, -flags mv0, -flags skiprd
+
+@section Interlaced video looks very bad when encoded with ffmpeg, whats wrong?
+
+You should use -flags +ilme+ildct and maybe -flags +alt for interlaced
+material, and try -top 0/1 if the result looks really trashed
+
+
+@section How can I read DirectShow files?
+
+If you have built FFmpeg with @code{./configure --enable-avisynth}
+(only possible on MinGW/Cygwin platforms),
+then you may use any file that DirectShow can read as input.
+(Be aware that this feature has been recently added,
+so you will need to help yourself in case of problems.)
+
+Just create an "input.avs" text file with this single line ...
+@example
+  DirectShowSource("C:\path to your file\yourfile.asf")
+@end example
+... and then feed that text file to FFmpeg:
+@example
+  ffmpeg -i input.avs
+@end example
+
+For ANY other help on Avisynth, please visit @url{http://www.avisynth.org/}.
+
 @chapter Development
 
 @section When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?
@@ -222,4 +317,13 @@ since MinGW does the job perfectly adequately. None of the core developers
 work with Visual C++ and thus this item is low priority. Should you find
 the silver bullet that solves this problem, feel free to shoot it at us.
 
+@section I have a file in memory / a API different from *open/*read/ libc how do i use it with libavformat ?
+
+You have to implement a URLProtocol, see libavformat/file.c in FFmpeg
+and libmpdemux/demux_lavf.c in MPlayer sources.
+
+@section I get "No compatible shell script interpreter found." in MSys.
+
+The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
+
 @bye