[ubuntu-uk] Converting many .jpgs to mpeg4 without using wildcards
Kris Marsh
moogman at gmail.com
Mon Jun 4 13:36:39 BST 2007
On 6/4/07, Dominic Forrest <dominic.forrest at ntlworld.com> wrote:
>
> Hi,
> I need to regularly convert a few hundred/thousand .jpgs to a mpeg4
> (or other) video. These files are selected as the result of a mysql
> query from perl and sit within a number of directories along with many
> more images which will not form part of the video - hence I cannot use
> wildcards with ffmpeg (or any other tool). I can easily list all the
> filenames in order to a file but am unable to find a way to use this
> file (which currently has the full path to one jpg on each line) as
> input to ffmpeg.
>
> Currently the only way I have found to do this is to copy all the files
> (or create links) to a new directory which then allows me to use
> wildcards - however this seems horribly inefficient!
>
> Any thoughts or solutions welcomed!
>
>
> Dom
>
> --
> ubuntu-uk at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
> https://wiki.kubuntu.org/UKTeam/
>
Hi Dom.
You could use $(cat file). A quick example should illustrate this for you:
kmarsh at kris:~$ echo "one" > file1
kmarsh at kris:~$ echo "two" > file2
kmarsh at kris:~$ echo -e "file1\nfile2" > files
kmarsh at kris:~$ cat $(cat files)
one
two
kmarsh at kris:~$
Dump your mysql output to a file, and then use $(cat file) in place of
where your wildcard/files would be.
Any good? :-)
Kris
More information about the ubuntu-uk
mailing list