Posts Tagged ‘ubuntu’

Convert audio from WMV files to MP3

Sunday, February 25th, 2007

A while back some radio station website or somewhere had a video in WMV of KT Tunstall performing Black Horse and the Cherry Tree and I wanted the music for a plane ride today.

Usually I’d use vsound, I’ve been able do save the audio track of a video in realplayer, but for some reason it wasn’t working for gxine.

Anthony Barker’s blog had the concise steps needed to use mplayer to grab the sound.


mplayer -dumpfile outfile.dat -dumpstream some-video.wmv

mplayer -vo null -vc null -ao pcm -ao pcm:file=audio.wav outfile.dat

lame audio.wav audio.mp3

rm outfile.dat

Building F-Spot from source on Ubuntu

Thursday, February 8th, 2007

The instructions How to Build F-Spot from HEAD are mostly correct for Ubuntu/Edgy and Ubuntu/Feisty, but leave out a number of packages that need to be installed before autogen.sh is run.

Be sure to also install the following packages:

sudo apt-get install mono-devel \
libglib2.0-dev libmono-dev libmono-system-runtime2.0-cil \
libexif-dev libgnomeui-dev liblcms1-dev libgphoto2-2-dev \
libusb-dev

And instead of make install, use make -k install since it will attempt to run scrollkeeper which attempts to update /var/lib/scrollkeeper/scrollkeeper_docs.

The offending line is: scrollkeeper-update -p /var/lib/scrollkeeper -o /home/marc/unstable/f-spot/share/omf/f-spot

Ubuntu/Edgy & Belkin Wireless G (F5D7000) ver 5000

Tuesday, January 23rd, 2007

The Belkin Wireless G PCI Card (F5D7000 v.5000) works great out of the box with Ubuntu/Edgy.

It uses that ath_pci kernel module and here is the relevant bit from /var/log/messages:

[17179594.568000] wlan: 0.8.6.0 (EXPERIMENTAL)
[17179594.576000] ath_rate_sample: 1.2
[17179594.596000] ath_pci: 0.9.6.0 (EXPERIMENTAL)
[17179594.600000] ACPI: PCI Interrupt 0000:02:0b.0[A] -> GSI 22 (level, low) -> IRQ 185
[17179595.180000] Build date: Jun 15 2006
[17179595.180000] Debugging version (IEEE80211)
[17179595.180000] ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
[17179595.180000] ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
[17179595.180000] ath0: H/W encryption support: WEP AES AES_CCM TKIP
[17179595.180000] ath0: mac 7.8 phy 4.5 radio 5.6
[17179595.180000] ath0: Use hw queue 1 for WME_AC_BE traffic
[17179595.180000] ath0: Use hw queue 0 for WME_AC_BK traffic
[17179595.180000] ath0: Use hw queue 2 for WME_AC_VI traffic
[17179595.180000] ath0: Use hw queue 3 for WME_AC_VO traffic
[17179595.180000] ath0: Use hw queue 8 for CAB traffic
[17179595.180000] ath0: Use hw queue 9 for beacons
[17179595.180000] Debugging version (ATH)
[17179595.180000] ath0: Atheros 5212: mem=0x41000000, irq=185


$ sudo lspci -vvx
....
0000:02:0b.0 Ethernet controller: Atheros Communications, Inc.: Unknown device 001a (rev 01)
Subsystem: Belkin: Unknown device 700c
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 0x08 (32 bytes)
Interrupt: pin A routed to IRQ 185
Region 0: Memory at 41000000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=2 PME-
00: 8c 16 1a 00 06 01 90 02 01 00 00 02 08 a8 00 00
10: 00 00 00 41 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 01 50 00 00 99 17 0c 70
30: 00 00 00 00 44 00 00 00 00 00 00 00 05 01 0a 1c

Ubuntu/Edgy & Belkin Wireless G (F5D7010) ver 5100

Saturday, January 20th, 2007

The Belkin Wireless G Notebook Card (F5D7010) ver 5100 works great out of the box with Ubuntu/Edgy.

Unfortunately in the MythTV system I want it for has an old PCI/PCMCIA adapter that only accepts 16-bit PCMCIA cards, so this 32-bit one won’t fit.

Below is some info that my help you debug your configuration:

It uses the ath_pci kernel module.


$ lsmod|grep -i ath
ath_pci 97184 0
ath_rate_sample 15616 1 ath_pci
wlan 204764 4 wlan_scan_sta,ath_pci,ath_rate_sample
ath_hal 192080 3 ath_pci,ath_rate_sample

The relevant part of /var/log/messages:


Jan 23 20:54:31 localhost kernel: [17180392.280000] pccard: CardBus card inserted into slot 1
Jan 23 20:54:31 localhost kernel: [17180392.284000] PCI: Enabling device 0000:06:00.0 (0000 -> 0002)
Jan 23 20:54:31 localhost kernel: [17180392.284000] ACPI: PCI Interrupt 0000:06:00.0[A] -> Link [C17E] -> GSI 11 (level, low) -> IRQ 11
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: H/W encryption support: WEP AES AES_CCM TKIP
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: mac 7.8 phy 4.5 radio 5.6
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Use hw queue 1 for WME_AC_BE traffic
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Use hw queue 0 for WME_AC_BK traffic
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Use hw queue 2 for WME_AC_VI traffic
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Use hw queue 3 for WME_AC_VO traffic
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Use hw queue 8 for CAB traffic
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Use hw queue 9 for beacons
Jan 23 20:54:31 localhost kernel: [17180393.176000] wifi0: Atheros 5212: mem=0x16000000, irq=11


$ sudo lspci -vvx
...
06:00.0 Ethernet controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)
Subsystem: Belkin Unknown device 701d
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 128 bytes
Interrupt: pin A routed to IRQ 11
Region 0: Memory at 16000000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=2 PME-
00: 8c 16 1a 00 06 00 90 02 01 00 00 02 20 a8 00 00
10: 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 01 50 00 00 99 17 1d 70
30: 00 00 00 00 44 00 00 00 00 00 00 00 0b 01 0a 1c

Seven and a half terabyte of storage?!

Friday, January 12th, 2007


$ sudo sshfs marc@192.168.1.200:/home/marc -o allow_other /media/homeserver/home/marc
Password:
$ df -h /media/homeserver/home/marc/
Filesystem Size Used Avail Use% Mounted on
sshfs#marc@192.168.1.200:/home/marc
7.5T 0 7.5T 0% /media/homeserver/home/marc
$

Most exciting upgrade to Ubuntu/Edgy

Friday, October 27th, 2006

This morning I had a free hour and this is how I upgraded my hp compaq nc6000 laptop from Ubuntu/Dapper to Ubuntu/Edgy. After updating /etc/apt/sources.list to point to the edgy repos…

sudo apt-get update && sudo apt-get -dy dist-upgrade && sudo apt-get dist-upgrade

Well there was a conflict between x11-common and xinit which both wanted to provide the man page XSession.5.gz.

11:45am Wendy calls me and says the school just called and Griffin is in a ambulance on the way to the hospital and to meet her there. He accidentally ate something that contained pineapple — to which he has a severe allergic reactions to.

11:49 I’m on the road approaching the hospital and get a call on my cell phone. The woman says she is the school nurse and starts saying my son is having an allergic reaction. I interrupt her and say ‘Yes, I just talked to my wife and I’ll meet the ambulance at the hospital’. She says ‘Well, your son is sitting here with me in my office.’ Then we realize she is the school nurse from a different chool and is talking about Trevor who is having an allergic reaction! Trevor had his bee/wasp allergy shot earlier this morning and is reacting to that. Since he too was having difficulty breathing, he too is sent via ambulance to the ER.

12:05 — Wendy and I both arrive at the ER before either of the kids do. Explain to the ER admitting person that yes both boys are ours, they are coming from different schools, with the same problem (allergic reaction, breathing difficulty), but different reasons (food allergy vs reaction to allergy desensitizing injection).

Long story short, after evaluation, some benedril and alburterol breathing treatments, we were sent home.

Around 3pm I worked through a few iterations of apt-get update, apt-get dist-upgrade, apt-get -f install, aptitude dist-upgrade, I have a fully upgraded from Ubuntu/Dapper to Ubuntu/Edgy.

There are a bunch of new, interesting packages to take a look out. The list is here: EdgyConfiguration

Now that was a stressful upgrade.

Converting Creative MuVo WAV to a ‘real’ WAV

Tuesday, October 10th, 2006

I recently recorded an event using my little Creative MuVo TX FM mp3 player. It created a 22M WAV file of reasonable quality, but lame and audacity had problems converting it to an MP3 file.

The work around is to open the original wav file with audacity and then File->Export as WAV. The resulting wav file is about four times as large, but is in a usable format. From there use your favorite tools to create an OGG or MP3 file.

It appears the problem has to do with the way the MuVo encodes the wav:



VOC001-original.wav: RIFF (little-endian) data, WAVE audio, IMA ADPCM, mono 8000 Hz
VOC001-clean.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

Logitech USB headset & Ubuntu/Linux

Wednesday, September 13th, 2006

My wife had an unused Logitech Stereo USB Headset 250 kicking around the house that I took into the office today. Joy of joys! Ubuntu/Dapper recognized it and both the headset *and* microphone work out of the box.

Just like Microsoft Windows ;-)

Democracyplayer on Ubuntu/Dapper

Friday, September 8th, 2006

The good folks at GetDemocracyNow.com provide debian packages for Ubuntu/Dapper, but didn’t get the dependencies quite right. After intalling the two democracyplayer packages from their Ubuntu download page, I needed to also install the following packages:

$ sudo apt-get install libboost-python1.33.1 libgtk-mozembed-ruby mozilla-psm

There is a ton of great content!

Moving photos around behind f-spot’s back

Sunday, July 2nd, 2006

I’ve been using f-spot since it showed up in Ubuntu/Breezy and have been keeping all my photos in a directory structure like this:

/PHOTOS/Photos/2006.06.30/
/PHOTOS/Photos/2006.07.01/

But sometimes I’ve forgotten to unclick the “Copy file to the Photos folder” box in the photos import dialog and end up with photos under ~/Photos/. Recently I checked and found there were almost a gigabytes worth of photos under there.

So this is what I did to move them to under /PHOTOS/Photos/ and keep all the tags and metadata correct.

  • Back up /home and /PHOTOS to an external USB. I love rsnapshot.
    $ rsnapshot daily
  • make an extra backup of the f-spot database
    $ cp ~/.gnome2/f-spot/photos.db photos-backup.db
  • Start poking around the f-spot database and updating it.
    $ sqlite3 ~/.gnome2/f-spot/photos.db
    sqlite> .schema photos
    CREATE TABLE photos ( id INTEGER PRIMARY KEY NOT NULL,
    time INTEGER NOT NULL,
    directory_path STRING NOT NULL,
    name STRING NOT NULL,
    description TEXT NOT NULL,
    default_version_id INTEGER NOT NULL
    );
  • See how many photos are in ~/Photos…
    sqlite> select count(*) from photos where directory_path like '/home/marc/Photos/%';
    260
  • Take a look at a few of them to see the path names…
    sqlite> select directory_path from photos where directory_path like '/home/marc/Photos/%' limit 0,10;
  • Update the pathname to my prefered one. I’ve added an ‘a’ to the end just so I won’t overwrite an existing directory.
    sqlite> update photos set directory_path = "/PHOTOS/Photos/2006.06.22a" where directory_path = "/home/marc/Photos/2006/6/22";
    sqlite> .quit
  • Make the directory and move the files to the new location…
    mkdir /PHOTOS/Photos/2006.06.22a
    mv -v /home/marc/Photos/2006/6/22/HPIM117* /PHOTOS/Photos/2006.06.22a
  • Repeat for each directory. I did it all within emacs’ shell so cut-n-paste made it a snap.