Archive for December, 2009
Convert Quicktime Movies to AVI encoded with MPEG-4 (MOV to AVI) with Linux/Ubuntu
A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices.
AVI on the other hand is more widely accepted format. AVI, like MOV, is a media container that envelops encoded media. In this example we will convert Quicktime video (.mov) to .avi that contains media encoded with mpeg-4.
If you want to preserve the original quality and resolution with pcm_u8 (analog 8bit) audio:
ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 outputfile.avi
Obviously I would prefer something better for the sound so I normally use the mp3 as an audio codec. To do this make sure that you have the libmp3lame0 package installed to do that:
sudo apt-get install libmp3lame0
And then:
ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi
If you want to change the resolution then add the -s option and specify the horizontal and vertical resolution. Make sure to preserve the original aspect ratio:
ffmpeg -i inputfile.mov -s 960x540 -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi
Broadcom Wireless Chipset (BCM4311, BCM4312, BCM4321, and BCM4322) on Ubuntu Karmic.
If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install.
To get it working, you need to install the STA driver. You can get it from the Broadcom site:
http://www.broadcom.com/support/802.11/linux_sta.php
Follow the instructions in the README.txt file which is on same page.
After you have finished installing it the wireless will work, but only until the next reboot. To make this permanent follow these steps:
1. Run:
sudo rmmod ssb
For some reason you cannot blacklist the ssb module. It always runs on boot even if it is in the blacklist.conf file.
After that you need to run this to get rid of the ssb module permanently:
sudo update-initramfs -u
2. Now that we got rid of ssb, we need to make sure that lib80211 is loaded on boot. To do that add lib80211 to the end of the /etc/modules file:
echo "lib80211" | sudo tee -a /etc/modules
I went ahead and added wl to it as well:
echo "wl" | sudo tee -a /etc/modules
So the /etc/modules file looks like this:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
lp
rtc
lib80211
wl
3. Now we need to make sure that “insmod wl.ko” as specified in the README.txt file runs every time we boot. There might be a better way to do this but I just added it to the /etc/rc.local file.
Before I did this I copied the wl.ko file to the /lib/modules/2.6.31-14-generic/kernel/lib directory. This way we can get rid of the source files we downloaded from the Broadcom site along with the binaries we compiled and not worry about losing the wl.ko file:
sudo cp wl.ko /lib/modules/2.6.31-14-generic/kernel/lib
Then add the line “insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko” at the end of the rc.local file, right above the exit 0 line:
sudo gedit /etc/rc.local
Here is how the rc.local file looks:
cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko
exit 0
4. Last step is to pin down the linux kernel so that we don’t upgrade the kernel accidentally along with the other updates:
System -> Administration -> Synaptic Package Manager
Then click on the “Status” button and select “Installed”. Then search for “linux-”. Select all packages that start with “linux-” and then Package -> Lock Version.
Search
Archive
Recent Comments
- SteveO on Android applications that use the MyLocationOverlay class crash on the new Droid X
- dimitar on Clone Disk Drives with Ubuntu. Make an Exact Copy of Your Hard Drive.
- ranskalex on Clone Disk Drives with Ubuntu. Make an Exact Copy of Your Hard Drive.
- Jack on Quickly remove special characters from file names
- dimitar on Quickly remove special characters from file names
Categories
Blogroll
Online Tools
Other
BLOG ARCHIVE
- August 2010 (2)
- July 2010 (2)
- June 2010 (2)
- May 2010 (1)
- January 2010 (2)
- December 2009 (2)
- November 2009 (3)
- October 2009 (1)
- September 2009 (3)
- July 2009 (1)
- May 2009 (1)
- March 2009 (1)
- February 2009 (2)
- January 2009 (2)
- December 2008 (1)
- November 2008 (4)
- October 2008 (5)