[MEncoder-users] 5s video from one picture (jpg)

Corey Hickey bugfood-ml at fatooh.org
Thu Mar 9 16:03:57 CET 2006

GeBu wrote:
> Hi, is it possible to create 5s video (MPEG-4 AVI) from one pictuture (jpg)?
> http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html I do not
> want to generate 125 pictures :-) .

If you're on Unix (or anywhere with a Unix-like shell), it's very easy
to make a pile of symlinks to (or, at worst, copies of) the original file.

For example:
mkdir d
cd d
for i in $(seq -w 1 125) ; do
  ln -s ../image.jpg $i.jpg
mencoder mf://*.jpg -mf fps=25 -ovc lavc -o ../out.avi \
  -lavcopts vcodec=mpeg4:vqscale=1
cd ..
rm -r d

Now, that's assuming that you need to have 25 fps for some reason. You
might be able to get away with making fewer images and lowering the fps,
depending on what you need this for. If that's the case, then I'm sure
you can make five copies by hand. ;)


More information about the MEncoder-users mailing list