How to Encode Video

Many thanks to the author of this script, rivviepop @ BlackBerry Forums

This is a little script I wrote based on the parameters.

–SNIP–

Getting the right params to mencoder to produce top quality video is always a chore, but using method 1 in the original post is working wonderfully for me — I’ve converted all sorts of stuff (WMV/AVI/MPG/FLV/MOV) and so far only the FLV conversions have audio sync problems (nothing new). I’m even going to say that the videos look better (and run smoother!) on my Pearl than any S60 device I’ve used.

Stupid Bash Trick time — here’s a helper script, save it as “vid2bb.sh” somewhere in your $PATH on Linux/OSX. Make it executable then run with a simple “vid2bb.sh <FILE>” command, the output will be in the input directory.

 #!/bin/bash
 
 FILE=$1
 
 ## 8100, 240x260 res
 ## uncomment one of the below depending on your input format
 #RES=240:135             # resolution, 16:9 ratio
 RES=240:180             # resolution, 4:3 ratio
 
 ## 8800, 320x240 res
 ## uncomment one of the below depending on your input format
 #RES=320:180             # resolution, 16:9 ratio
 #RES=240:180             # resolution, 4:3 ratio
 
 ## generic
 ABR=64                  # audio bitrate
 VBR=230                 # video bitrate
 
 mencoder "$FILE" \
         -o "${FILE%.*}_bb.avi" \
         -of avi \
         -ovc lavc \
         -oac lavc \
         -lavcopts vcodec=mpeg4:vbitrate=$VBR:acodec=mp3:abitrate=$ABR \
         -vf scale=$RES
 
 

Note that the above takes the input filename, chops off the extension and adds a “_bb.avi” to the end of the output file to help you know which files are your BB ready ones. A quick sort, drag&drop and they’re on your device.

My setup is Fedora Core 6 with the FreshRPMS mplayer builds installed (which grabs all the latest libavcodec and so on), as well as the Essential codecs pack (from the MPlayer website) unxipped to /usr/lib/win32/ — these codecs always seem to produce better quality.

Antique 1910’s Radio Transformer - National Impedaformer Impedance Matching picture

Antique 1910’s Radio Transformer - National Impedaformer Impedance Matching

$46.00



Dielectric 600-P Smith Chart Impedance Plotter 300-1000 MC Raymond Maine Vintage picture

Dielectric 600-P Smith Chart Impedance Plotter 300-1000 MC Raymond Maine Vintage

$149.99



CU350/PT TA312/PT Field Phone Impedance Matching Network 5915003925981 Military picture

CU350/PT TA312/PT Field Phone Impedance Matching Network 5915003925981 Military

$39.98



Western Electric - 440-201 - Telephone Earpiece Receiver. Magnetic Low Impedance picture

Western Electric - 440-201 - Telephone Earpiece Receiver. Magnetic Low Impedance

$16.98



Vintage US Navy Bureau of Ord. Twin T Impedance Measuring Circuit Type 821-A picture

Vintage US Navy Bureau of Ord. Twin T Impedance Measuring Circuit Type 821-A

$184.79



10 New Nichicon UPW 4.7uf 50V  Radial Capacitors  low-impedance picture

10 New Nichicon UPW 4.7uf 50V Radial Capacitors low-impedance

$4.99



10 New Nichicon UPW 3.3 uf 50V  Radial Capacitors  low-impedance picture

10 New Nichicon UPW 3.3 uf 50V Radial Capacitors low-impedance

$4.99



10 New Nichicon UPW 6.8uf 100V  Radial Capacitors  low-impedance picture

10 New Nichicon UPW 6.8uf 100V Radial Capacitors low-impedance

$4.99



Raychem Capacitance - Impedance Calculator 1963 Coxial Cable Conductor Calif picture

Raychem Capacitance - Impedance Calculator 1963 Coxial Cable Conductor Calif

$18.70



David Clark Standard Noise-Attenuating Low Impedance Headset H10-76 picture

David Clark Standard Noise-Attenuating Low Impedance Headset H10-76

$275.00



deneme bonus