Wednesday, July 11, 2012

Best headphones under USD100

http://reviews.cnet.com/2300-6468_7-10011889.html?tag=mncol

Tuesday, March 20, 2012

Extracting Pages from PDF

First, install PDFTK on Linux.

Then, do this command:

pdftk foo.pdf cat 2-3 output abstract.pdf dont_ask

Where foo.pdf is the original PDF file, 2-3 is the range of pages (you can type 2-end to extract to EOF), and abstract.pdf is the output PDF file.

Saturday, March 10, 2012

FFMPEG Convert AVI to JPEG

$ ffmpeg -i input.avi -qscale 1 -qcomp 0 file-%03d.jpg


  • qscale[:stream_specifier] q (output,per-stream)’
    • Use fixed quality scale (VBR). The meaning of q is codec-dependent.
    • qscale constant quality buf variable bitrate. n = 1 for best quality, n = 31 for worst quality
  • qcomp compression
    • video quantizer scale compression (VBR) (default 0.5). Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0
  • qblur blur
    • video quantizer scale blur (VBR) (range 0.0 - 1.0)
    • Previously tested with qblur option of 0 and 1, and outputs were exactly the same

Friday, March 9, 2012

Converting HD720 to 320x240

$ ffmpeg -i input.avi -vcodec huffyuv -vf "crop:960;720:0:0" -y intermediate.avi
$ ffmpeg -i intermediate.avi -vcodec libx264 -s qvga -y output.m4v

HuffYUV is a lossless codec. From Wikipedia:

Huffyuv (or HuffYUV) is a lossless video codec created by Ben Rudiak-Gould which is meant to replace uncompressed YCbCr as a video capture format.

Despite the "YUV" in the name, it does not compress the YUV color space, but YCbCr.[citation needed] The codec can also compress in the RGB color space.



-vf "..." replaces -croptop, -cropbottom, -padtop, -padbottom etc of older versions of FFMPEG

Monday, February 27, 2012

KISS (Keep It Simple Stupid) FFMPEG

How to remove jitter from the first couple of seconds of Nikon DSLR video, and keep only 60 seconds.

$ lav2yuv +n DSC_0000.AVI > dsc0000.yuv
$ ffmpeg -i dsc0000.yuv -ss 3 -t 60 -y -s vga dsc0000.mp4
$ mediainfo dsc0000.mp4

...asumming you want to convert the MJPEG original to MPEG-4, of course....

By the way, my Nikon outputs 1280x720 HD video (hd720 in FFMPEG-speak). No Full HD (aka hd1080) from this baby.