[FFmpeg-cvslog] r21330 - trunk/doc/faq.texi

stefano subversion
Tue Jan 19 23:05:02 CET 2010


Author: stefano
Date: Tue Jan 19 23:05:02 2010
New Revision: 21330

Log:
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).

Modified:
   trunk/doc/faq.texi

Modified: trunk/doc/faq.texi
==============================================================================
--- trunk/doc/faq.texi	Tue Jan 19 20:41:24 2010	(r21329)
+++ trunk/doc/faq.texi	Tue Jan 19 23:05:02 2010	(r21330)
@@ -138,6 +138,25 @@ Notice that @samp{%d} is replaced by the
 
 @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
+ at file{img001.jpg}, @file{img002.jpg} and so on.
+
+ at example
+  x=1; for i in *jpg; do counter=$(printf %03d $x); ln "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
+ at end example
+
+If you want to sequence them by oldest modified first, substitute
+ at code{$(ls -r -t *jpg)} in place of @code{*jpg}.
+
+Then run:
+
+ at example
+  ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
+ at end example
+
 The same logic is used for any image format that ffmpeg reads.
 
 @section How do I encode movie to single pictures?



More information about the ffmpeg-cvslog mailing list