Ian Mallett wrote:
Also, the video quality is reaaaaaallly bad (and the whole 800 frames is
less than 1 MB). I'd like to trade some space for some quality. Also,
changing:
ffmpeg -f image2 -r 60 -i frame%d.png -r 59 video.mpg
to:
ffmpeg -f image2 -r 60 -i frame%d.png -r 59 video.avi
Causes the resultant movie to not work. What's that about?
I haven't used ffmpeg like this (I mainly use mencoder for encoding
video -- it comes with mplayer). Perhaps it is compiling a motion-jpeg
movie. It might be possible to have motion-jpeg inside avi containers,
but I'm not sure how to best do this with ffmpeg. If using mencoder I'd
need to specify a video codec if I was going to make an avi movie.
Here's how I'd make a 59 frames per sec video from a lot of images in
the current directory using mencoder:
mencoder "mf://*.jpg" -mf fps=59 -o output.avi -ovc lavc -lavcopts
vcodec=mpeg4
Perhaps you need to do something along those lines with ffmpeg.
Obviously the switches will be different for ffmpeg. I'm no expert
though, so studying the docs carefully would be required.
To get around the quality issue, perhaps you need to save the pictures
at a lower frame rate to give your machine more time. Encoding the video
at a lower framerate works just fine. In the example I gave you'd just
substitute the lower fps number to match the frame collection rate. The
human eye can't really see flickering faster than about 12 frames per
second. The main reason to use higher rates is that fast motion can look
jumpy otherwise. Even that can be worked around if you can add
motion-blur, but that's likely way beyond what is needed or could be
done here. :)
Cheers,
- Miriam
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blog: http://miriam_e.livejournal.com