Archive for April, 2009

How to remux an avi with the right audio language track using MPlayer/Mencoder

Sunday, April 26th, 2009

MPlayer and Mencoder to the rescue again!

I downloaded a movie the other night which was advertised as having both Spanish and English soundtracks. I had found films like this before, but English had always been the first audio track, so had never been a problem. On this occasion, Spanish was the first audio track. I didn’t want to have to fiddle around with Geexbox getting the right language playing, so needed to sort this out, so that English was the audio track that played. I wasn’t too bothered about dropping the Spanish soundtrack.

Four “simple” steps.

  1. Confirm the aid number of the English language track. Running the video with mplayer in verbose mode produced enough information to find this easily, as track 2
    • mplayer -v inputvideo.avi
  2. Extract the english audio track from the avifile
    • mplayer -aid 2 -dumpaudio -dumpfile englishaudio.mp3  inputvideo.avi
  3. Copy the video track out without any sound
    • mencoder -ovc copy -nosound -o soundlessvideo.avi  inputvideo.avi
  4. Stick the soundless video and the English audio track back together
    • mencoder -ovc copy soundlessvideo.avi -oac copy -audiofile englishaudio.mp3  -o newvideo.avi

No encoding or transcoding going on, just demuxing and remuxing of the right parts. Apparently the use of -nosound can cause a/v sync issues, but in this case a/v sync was fine all the way through.

Found another way too, as doing the above with ac3 sound doesn’t sync well at all. Simply re-encode the audio and output to a new file:

mencoder -ovc copy  -oac mp3lame aid 2 inputfile.avi -o outputfile.avi

or to simply grab the second audio stream without encoding

mencoder -ovc copy -oac copy aid 2 inputfile.avi -o outputfile.avi

How to xfce 4.6 menu edit in Xubuntu 9.04 - Jaunty

Saturday, April 25th, 2009

I mithered on about this a bit in my last post, but after some searching and fiddling about, got to where I wanted to go. It didn’t help that on the xfce wiki a missing “/” in the code for copying a file meant any changes I made just didn’t work..

With xfce 4.6 you have the so called freedesktop.org standard for menus. I only use the right click on the desktop menu (and this will be my focus) that brings up a whole pile of extra stuff you only occasionally need, and seems to take for every to browse through the menu and sub-menu structure to find your app. The menu editor that was in earlier versions has disappeared, hopefully to come back in 4.8, but that is some time away.

The fixes and edits come in two parts.

  1. Remove the extra guff from the right click menu, but have it available if you need it
  2. Remove items, add items and reduce excess on the main applications menu (more…)

Xubuntu 9.04 - post installation setup

Friday, April 24th, 2009
  1. Get rid of that top panel! never been happy with two panels (but just watch me contradict myself later! :))
  2. Install the nvidia display driver for my Geoforce 6200 using the hardware drivers popup.
  3. Install xubuntu-restricted-extras for all the media stuff.
  4. Open up thunar and selected detailed view, and change the Location selector to toolbar style.  The Sidepane is set at shortcuts by default so that’s OK.
  5. Remove all the desktop icons, just like a clear desktop. That’s a right click on the desktop, choose Desktop Settings > icons, and untick the boxes.
  6. Install portmap and nfs-common for nfs client operability.
  7. Edit /etc/fstab to include all my local and network shares. I only use nfs on my LAN servers.
  8. Install rdesktop to access my ever-running Headless VBox XP on my server.
  9. Try out Vinagre. It actually works! I can easily vnc to my two servers.
  10. Try out totem. Wow! For the first time since I have used linux, totem actually played back everything i threw at it - avi,mpg,flv,wmv,ts - and it does dvb tv. More on that later. This won’t tear me away from mplayer though :)
  11. Install totem-xine to get the deinterlacing control for watching dvb tv.
  12. Edit the desktop configuration file for “Movie Player” Movie Player in /usr/share/applications so that totem runs the xine backend instead of the gstreamer one. Just add “-xine” after totem on line 3. This will change the action on the main menu icon. (more…)

Xubuntu 9.04 Alt CD Installation

Thursday, April 23rd, 2009

The Jaunty Jakalope has arrived, so I thought I would document my installation of the Xubuntu Alt CD version, which came down on the torrent earlier.

PC specs, Shuttle FN45 Mobo Athlon XP 1.4 overclocked to 1.9 with 1GB unmatched RAM, 250 GB HDD, multi booting with 8.10 and Arch

Start the Clock!

0:00:00

Boot up with the CD

Choose English, then press Enter for the default install of Xubuntu

Selected GB keyboard using defaults

Pick a name for your installation

Chose Manual partitioning (due to multi-boot environment) and went for Ext3 file system, and one partition for the whole install, but using the shared swap at the end of the drive.

0:04:00

Installing the base system

0:06:30

Set up a single user and password
(good to see Ubuntu has finally put in a check for weak passwords, but lets you have one nevertheless!)

0:07:00

Configuring apt / Scanning the mirror
(this always takes an age on my PCs, probably doesn’t help that I am torrenting the other 9.04 isos I need elsewhere on the LAN!)

0:24:00

Phew, finally, it takes so long you think the Pc has frozen, but be patient.
Select and install software

Done 60% after 10 minutes

0:37:00

Install GRUB Boot Loader

I like my grub from IBEX, so will install this GRUB to the install partition

0:40:00

Installation Complete

CD ejected, ready for reboot!

First Boot Times:

From Boot to Grub                   16.8 seconds

From Grub to GDM                   26.5 seconds

From Grub to Desktop             13.3 seconds

TOTAL                                      56.6 seconds

(A fully loaded Arch does this in 35 seconds, so given that the Boot to Grub time doesn’t change, Arch is still ahead on boot,something I was expecting to be faster on 9.04?)

Now it’s only been up a few hours and we already have 6 updates, all to do with Firefox.

Installing Brother DCP-540CN Printer on Arch-Linux (32 bit)

Saturday, April 18th, 2009

I really like my Brother MFP, and its even better that it works across a network and on Linux too! here’s how to get it installed on Arch.

(more…)

Oscar Winners

Saturday, April 18th, 2009

Started collecting oscar winning films, some way to go with this, but here is the list:

Key
@ On the way
# Already have

(more…)

XMLTV - the easy way…

Friday, April 17th, 2009

I had a lot of trouble in the past using the graphical front end for xmltv in Ubuntu, and ended up running the whole thing from the command line. This is how:

Install xmltv: (more…)

Adventures in Arch Linux

Wednesday, April 15th, 2009

Been an Ubuntu fan for over three years, but have always tried out the other distros. Until now I was not ready to try out Arch, it looked to geeky and to difficult, but Ubuntu/Xubuntu was starting to get to bulky and bloated, and I had started to lean towards lightweight installations, and console programs as a resource.

So Arch it had to be. I downloaded the latest release for hard drive installation, the core version from here, created a spare partition on my hard drive and set to..

I am not going to go through all the installation and configuration, just those points that I had to work at. For full details read and follow the Arch Beginners Guide. (more…)