|
|
|
@ -105,7 +105,7 @@ For example, img1.jpg, img2.jpg, img3.jpg,... |
|
|
|
|
Then you may run: |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg |
|
|
|
|
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
Notice that @samp{%d} is replaced by the image number. |
|
|
|
@ -118,7 +118,7 @@ the sequence. This is useful if your sequence does not start with |
|
|
|
|
example will start with @file{img100.jpg}: |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg |
|
|
|
|
ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
If you have large number of pictures to rename, you can use the |
|
|
|
@ -128,7 +128,7 @@ that match @code{*jpg} to the @file{/tmp} directory in the sequence of |
|
|
|
|
@file{img001.jpg}, @file{img002.jpg} and so on. |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done |
|
|
|
|
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
If you want to sequence them by oldest modified first, substitute |
|
|
|
@ -137,7 +137,7 @@ If you want to sequence them by oldest modified first, substitute |
|
|
|
|
Then run: |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg |
|
|
|
|
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
The same logic is used for any image format that ffmpeg reads. |
|
|
|
@ -145,7 +145,7 @@ The same logic is used for any image format that ffmpeg reads. |
|
|
|
|
You can also use @command{cat} to pipe images to ffmpeg: |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg |
|
|
|
|
cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
@section How do I encode movie to single pictures? |
|
|
|
@ -153,7 +153,7 @@ You can also use @command{cat} to pipe images to ffmpeg: |
|
|
|
|
Use: |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
ffmpeg -i movie.mpg movie%d.jpg |
|
|
|
|
ffmpeg -i movie.mpg movie%d.jpg |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
The @file{movie.mpg} used as input will be converted to |
|
|
|
@ -169,7 +169,7 @@ to force the encoding. |
|
|
|
|
|
|
|
|
|
Applying that to the previous example: |
|
|
|
|
@example |
|
|
|
|
ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg |
|
|
|
|
ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
Beware that there is no "jpeg" codec. Use "mjpeg" instead. |
|
|
|
@ -227,11 +227,11 @@ then you may use any file that DirectShow can read as input. |
|
|
|
|
|
|
|
|
|
Just create an "input.avs" text file with this single line ... |
|
|
|
|
@example |
|
|
|
|
DirectShowSource("C:\path to your file\yourfile.asf") |
|
|
|
|
DirectShowSource("C:\path to your file\yourfile.asf") |
|
|
|
|
@end example |
|
|
|
|
... and then feed that text file to ffmpeg: |
|
|
|
|
@example |
|
|
|
|
ffmpeg -i input.avs |
|
|
|
|
ffmpeg -i input.avs |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
For ANY other help on AviSynth, please visit the |
|
|
|
@ -497,7 +497,7 @@ An easy way to get the full list of required libraries in dependency order |
|
|
|
|
is to use @code{pkg-config}. |
|
|
|
|
|
|
|
|
|
@example |
|
|
|
|
c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec) |
|
|
|
|
c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec) |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
See @file{doc/example/Makefile} and @file{doc/example/pc-uninstalled} for |
|
|
|
|