# Render a video from a series of images

Maintained by the libav group there is a great tool called avconv. Every time I had to convert some video format to another avconv worked for me. This included being able to convert mp4 to (good quality) wmv or creating a video out of a series of images.

Imagine you want to create a timelapse and take a series of pictures to do so. Then you end up with images called something like: Capture_%09d.png. The %09d refers to an integer value with a padding of zeros so that the number will always have 9 digits. This follows the same definition as C printf() function. Creating a video from a series of images is now really easy:

avconv -r 60 -i Capture_%09d.png -s 1280x720 Video_720p.mp4

-r X : framerate of input stream is X fps
-i : define input video; a series of images in this case
-s WxH : set the resolution, can also be 1920x1080 for 1080p

And that is it! The neat thing about avconv is that the default values used for the output format are almost always on point for what you need.

But if you need to adjust something, like bitrate, avconv will always allow you to do that. Down to the rarest parameters!

avconv -i video_in.mp4 -qscale 2 -s 1280x720 video_out_720p.wmv

-qscale 2 : ensure high quality. values in [2 5] seem to be fine
-s WxH : scale video (optional)

# ps2pdf converter

converting ps or eps files to pdf always left me with the wrong cropping of the image/page and with a white border that messes up the formatiing. To avoid this I convert the files using the following command:

ps2pdf -dPDFSETTINGS=/prepress-dEPSCrop test.eps

# Mindbaffling

Hi,

this morning I read about something really crazy you can do in C++ which involves bitshifting a float number and subtracting it from a magic number to get $$\frac{1}{\sqrt{x}}$$. You can find the explanation here, very cool: link

cheers