[MPlayer-users] periodically appending jpeg images to a video

Joey Parrish joey.parrish at gmail.com
Sat May 12 22:45:26 CEST 2007


On 5/12/07, noah at noah.org <noah at noah.org> wrote:
> Is it possible to append JPEG images to the end of a video?
>
> I am collecting time-lapse images over several weeks from a camera.
> I want to keep an up to date video of all the images.

If you want to append these frames without re-encoding, then you
either want something lossless or you want ovc copy.

Assuming:
1) your latest jpeg is latest.jpg
2) your latest video is latest.avi
3) creating a temp file called previous.avi is okay

Try this:

#!/bin/bash
if test -f latest.avi; then
  mv latest.avi previous.avi
  prepend="previous.avi"
fi
mencoder -ovc copy "$prepend" mf://latest.jpg -mf fps=25 -o latest.avi
if test -f previous.avi; then
  rm previous.avi
fi

If this doesn't work, replace -ovc copy with some lossless codec and try again.

--Joey



More information about the MPlayer-users mailing list