[FFmpeg-user] randomly named png to mp4: ffmpeg
Leo Izen
leo.izen at gmail.com
Thu Jan 16 05:58:05 CET 2014
On 01/14/2014 08:02 PM, Tyler Rinker wrote:
> I have a directory with randomly named png files (`a.png b.png c.png`) I
> want to stitch together in a particular order.
You could possibly do this with a concat filter. Try creating a text
file "concat.txt" that contains three lines:
file 'a.png'
file 'b.png'
file 'c.png'
then, run
ffmpeg -framerate 10 -f concat -i concat.txt
and FFmpeg will concatenate the three "video sequences" (that is, single
images.) This seems a little bit like nuking a mosquito. Try this other
solution:
> cat C:\Users\trinker\Desktop\raw3*.png | ffmpeg -f image2pipe -r 1
> -vcodec png -i - -vcodec libx264 out.mp4
> cygwin warning:
> MS-DOS style path detected: C:\Users\trinker\Desktop\raw3*.png
> Preferred POSIX equivalent is:
> /cygdrive/c/Users/trinker/Desktop/raw3*.png
> CYGWIN environment variable option "nodosfilewarning" turns off this
> warning.
> Consult the user's guide for more details about POSIX paths:
> http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
> cat: C:\Users\trinker\Desktop\raw3*.png: No such file or directory
Microsoft Windows' CMD does not automatically expand wildcards: most
windows command line programs are written to do that. However, UNIX
shell scripts do. UNIX cat won't expand a wildcard because it assumes
the shell did it for you. This command might work as is if you run the
command in cygwin's bash (just type bash while in cmd), or you could
specify the file names individually.
However, if your PNG files are part of a file called list.txt, you can
run (probably only in cygwin's bash)
cat list.txt | xargs cat | ffmpeg -f image2pipe ...
where xargs will build the command line for cat from the contents of
list.txt (xargs is a pretty cool tool :D).
More information about the ffmpeg-user
mailing list