]> 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 fc836624842e428c57f66032384f52d9dbd3e46c..0c214227762cd588c2064b9f1e4add969336d44f 100644 (file)
@@ -30,19 +30,16 @@ If the JPEGs are named img1.jpg, img2.jpg, img3.jpg,..., use:
 
 The same system is used for the other image formats.
 
-(Note: you need -f image2 for all image formats except GIF; see next section).
+@section How do I encode movie to single pictures ?
 
-@section Only GIF is listed by -format. Is that the only accepted image format?
+Use:
 
-No, there are more; they are listed among the video codecs:
-  jpeg, png, ppm, pbm, pam, pgm.
-
-For example:
 @example
-  ffmpeg -f image2 -i menu.png -f image2 menu.jpg
+  ffmpeg -i movie.mpg movie%d.jpg
 @end example
 
-The @file{menu.png} used as input will be converted to @file{menu.jpg}.
+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
@@ -54,7 +51,7 @@ to force the encoding.
 
 Applying that to the previous example:
 @example
-  ffmpeg -f image2 -vcodec png -i menu.png -f image2 -vcodec mjpeg menu.jpg
+  ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
 @end example
 
 Beware that there is no "jpeg" codec. Use "mjpeg" instead.
@@ -174,7 +171,7 @@ default.
 @item non-working stuff
 B-frames
 @item example command line
-ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X output.mp4
+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?
@@ -187,7 +184,7 @@ ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200 -mbd 2 -flags +4mv+tre
 @item non-working stuff
 B-frames
 @item example command line
-ffmpeg -i input -acodec aac -ab 128 -vcodec mpeg4 -b 1200 -ar 24000 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -title X -f psp output.mp4
+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
@@ -195,9 +192,26 @@ 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 1200 -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
+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}
@@ -308,4 +322,8 @@ the silver bullet that solves this problem, feel free to shoot it at us.
 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