Convert avi to mp4 format

Posted by Justin | New User Information,Tutorials | Monday 29 December 2008 9:09 pm

I can’t say as I “support” Apple, but from what I’ve seen they still make a very handy media device in the iPod Classic, iPod Nano and Touch. This “quickie” simply makes the file format for movies handy for moving them to your iPod device.

I’m in the habbit of taking my new DVD movies and converting them to digital copies for my family media server so I can stream them around my house. Normally I simply rip them to avi and that’s it. I’ve been using my Ubuntu box more and more and my MacBook Pro less and less (simply because my Ubuntu box has muliple monitors and has my favorite OS on board).

I have been using iSquint to convert my avi movies to mp4 for my iPod(s) in Mac OS X; but it has a pain to fire up my MacBook Pro, convert them, and upload them to my iPod(s).

My movie server is a 233mhz machine with limited ram but lots of storage. I’ve ran this command on it, but it generally takes about 12 hours to convert a 700mb movie to mp4 format from avi, divx or xvid. Needless to say this command isn’t speedy, but it’s reliable and if your original avi is in good shape, it’ll do fine. My 2.6ghz box takes about 30′ish minutes to convert the file format.

Simply make sure you’ve got ffmpeg installed along with all the neccisary codecs to handle mp4 (ubuntu-restricted-extra, transcode, w32codecs and the gstreamers are my norm).

Then navigate to the location for your movie; in my case it is /media/movies.

$ cd /media/movies

Then simply use the -i switch to indicate this is your “input file” and it will all look like this:

$ ffmpeg -i original.avi new-original.mp4

You will see a readout of what ffmpeg is doing and eventually it’ll tell you success and you’ll now have your original avi and the new mp4.

You can also look in the man pages for ffmpeg (man ffmpeg). I get all discombobulated when I look in there, so I depend on the knowledge of others to learn how to manipulate movies with ffmpeg. It’s really powerful but the simply command I use as an example above does the job for converting to a more iPod friendly format.

After it is converted simply fire up Amarok and drop it on your device.

Cheers,

Justin

P.S. I’ve recently tried this with .wma, .divx, .xvid, .flv, .swf and .asf with similar results. Just remember, the quality is about adiquate for an iPod, but not for full screen TV viewing (audio seems good, video looks a little too jpeg’ish).

Merging Multiple avi files into ONE!

Posted by Justin | Tutorials | Friday 26 December 2008 10:18 pm

I was wondering around our Movie server today and realized I had a bunch of movies that were split into multiple parts. Either from how they were downloaded, or so they’d fit on a standard 700mb disc.

Anyhow, from this link (HERE) I got it all sorted out!

If you use Ubuntu; simply install ubuntu-restricted-extras and transcode (if it’s available). If you use Debian generic (I use Lenny on my internal servers) just add the debian-multimedia repositories (http://debian-multimedia.org/) deb http://www.debian-multimedia.org lenny main (I added this to /etc/apt/sources.d/debian-multimedia.list). Then “sudo aptitude update && sudo aptitude install debian-multimedia-keyring && sudo aptitude install transcode”. This will update your repositories to include the newly added debian-multimedia repo, then install the GPG key for that new repo and finally install transcode (well, it’ll ask you if you want to install the extra goodies that come with it) and set you up for the grand fanaly.

To combine your avi files simply run:

avimerge -o combined-movie.avi -i moviepart1.avi moviepart2.avi moviepart3.avi moviepart4.avi (etc…) you can add as many as you like (I’m unaware of a limit) but it’ll make sure your sound stays reasonable join them together and name them what ever you indicated where I wrote combined-movie.avi.

This may work with other formats, but I have yet to try it out. I’m a fan of using ffmpeg to convert my flv files from youtube and the like to a more usable mpeg or avi format.

Enjoy,

Justin

VirtualBox in Ubuntu Intrepid Ibex (8.10)

Posted by Justin | Application Tests,Experiments,Troubleshooting,Tutorials | Thursday 18 December 2008 11:17 pm

I’m a glutton for punishment I guess; but when a new version of what ever I’m using comes out, I must have it! In this case I’ve been running Ubuntu’s Intrepid Ibex 8.10 and VirtualBox 1.0.6 with XP inside (friggin’ Garmin Forerunner 405 w/not work with my Mac or this Linux box). All was working great, UNTIL I upgraded to VirtualBox 2.1.0.

USB has always been touch and go with me and VirtualBox but this time there wasn’t much on the WWW to help a guy out. Until I Googled my brains out! That’s when I ran across David Grant’s blog with just such a fix. Here is the link for his tutorial.

All you need to do in Ibex to get usb working with the non OSE version of VirtualBox (EG Download the package from VirtualBox.org so you may enable USB support. I never understood why someone would want to install the default package provided by Ubuntu when you can just as easily install it yourself with the .deb package provided by Sun/VirtualBox.

Anyhow; fire up your favorite terminal and lets get to the dirt:

First find out what the <GID> is for your vboxuser group -

$ grep vbox /etc/group
vboxusers:x:127:justin
(mine is 127)

Second fire up nano or gedit (gedit is just too slow for me) -

$ sudo nano -w /etc/init.d/mountkernfs.sh
or for the CLI challanged:
$ sudo gedit /etc/init.d/mountkernfs.sh

You’ll want to add this next line, just below the line where /proc is mounted -

domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=<gid>,devmode=664

Change the <gid> to match yours from our first entry and save this duck.

Reboot and fire up that V-Box dawg! I struggled with this for about a week until I found Dave’s tutorial. In’Google Grand?

Justin

P.S. I hear there is some experimental OpenGL action going on in this version of VirtualBox as well. Hopefully it wont be long until I can fire up a clean install of Windows ’98 and run me some Carmageddon II: Carpocalypse Now!! HELL YEAH!

Next Page »