Encoding images to video with mencoder

Message boards : Tutorials : Encoding images to video with mencoder
Message board moderation

To post messages, you must log in.

AuthorMessage
r3nd3rm4n

Send message
Joined: 14 Nov 07
Posts: 36
Credit: 20,490
RAC: 0
Message 7140 - Posted: 11 Dec 2007, 19:55:20 UTC

Hi

If you have downloaded images with CATS (or wget) you can make an video with mencoder like this:

mencoder \"mf://*.png\" -mf fps=25 -vf scale=800:600 -o output.avi -ovc x264 -x264encopts bitrate=500


The result is a 800x600 x264 video with a 500kbits/s bitrate (x264 is a great codec!). If you want Xvid, take:

mencoder \"mf://*.png\" -mf fps=25 -vf scale=800:600 -o output.avi -ovc xvid -xvidencopts bitrate=500


If you mean imagemagick is better for scaling your images:

for pic in *.png ; do
convert $pic -scale widthxheight newdir/$pic
done

mencoder [options]


Bye
ID: 7140 · Rating: 1 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile Janus
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 16 Jun 04
Posts: 4556
Credit: 2,097,282
RAC: 0
Message 7152 - Posted: 13 Dec 2007, 17:13:34 UTC
Last modified: 13 Dec 2007, 17:16:20 UTC

This is indeed a nice way to create an animation from a set of images. Actually this is also how BURP does it \"behind the scenes\" when creating the movie files that can be downloaded from the webpage.

To be more exact here is an example of the set of settings we use for the FMP4 codec:

mencoder -mf w=1280:h=1024:fps=25:type=png -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:keyint=60:dia=2:vbitrate=960:mbqmin=1:vqmin=1:vqmax=2:mbqmax=2:vpass=0 -o /usr/burp/boinc/datacentre/sessions/697/produced/s000697_movie_mpeg4_q96.avi mf:///usr/burp/boinc/datacentre/sessions/697/temp/19686_*
ID: 7152 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile Istvan Burbank
Avatar

Send message
Joined: 3 Apr 08
Posts: 312
Credit: 58,920
RAC: 0
Message 8039 - Posted: 5 Apr 2008, 12:40:58 UTC

This may be an obvious question, but how do I use wget to download the images?
ID: 8039 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile Janus
Volunteer moderator
Project administrator
Avatar

Send message
Joined: 16 Jun 04
Posts: 4556
Credit: 2,097,282
RAC: 0
Message 8046 - Posted: 6 Apr 2008, 6:17:01 UTC - in response to Message 8039.  

This may be an obvious question, but how do I use wget to download the images?

Please use CATS to download the images. Currently this is more effecient than using wget since you can start downloading during the render and the data is dynamically compressed and uncompressed using lossless compression during the transmission.
ID: 8046 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Message boards : Tutorials : Encoding images to video with mencoder