diff options
author | John Van Sickle <john.vansickle@gmail.com> | 2010-01-19 22:05:02 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-19 22:05:02 +0000 |
commit | 49f6402236e0f90a19b5da954f94298c1a6b030d (patch) | |
tree | 1307e32a4db4e90096b866b7dc855e76ee126e2b /doc | |
parent | 731c04ad659715fa4353d53f2d06821602e6b573 (diff) | |
download | ffmpeg-49f6402236e0f90a19b5da954f94298c1a6b030d.tar.gz |
Improve section 3.2 of the faq by providing more useful examples and a
simple batch script to rename images to a numerical sequence.
Patch by John Van Sickle printf("%s.%s@%s.com", john, vansickle, gmail).
Originally committed as revision 21330 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'doc')
-rw-r--r-- | doc/faq.texi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/faq.texi b/doc/faq.texi index 79134427df..9d81a30d30 100644 --- a/doc/faq.texi +++ b/doc/faq.texi @@ -138,6 +138,25 @@ Notice that @samp{%d} is replaced by the image number. @file{img%03d.jpg} means the sequence @file{img001.jpg}, @file{img002.jpg}, etc... +If you have large number of pictures to rename, you can use the +following command to ease the burden. The command, using the bourne +shell syntax, symbolically links all files in the current directory +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 "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done +@end example + +If you want to sequence them by oldest modified first, substitute +@code{$(ls -r -t *jpg)} in place of @code{*jpg}. + +Then run: + +@example + 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. @section How do I encode movie to single pictures? |