Converting Audio files to G.722 for use with Asterisk

Note to myself:

How to convert random audio files to G.722 with Asterisk

First convert the input file to a 16kHz mono signed linear wave file:

sox input.foo -r 16000 -c 1 -t sw output.sln16

and in the Asterisk CLI:

file convert /path/to/input.sln16 /path/to/output.g722

Preparing a bootable SeaTools USB drive in Fedora

Before you return your drive to Seagate for repairs they ask you to run their diagnostics tool called SeaTools. My ThinkPad X200 doesn’t have an optical drive but since they dropped support for floppy disks there’s no other chance than using the ISO Seagate provides. Because I’m too lazy to actually get up from my bed and shove that ThinkPad into it’s docking bay (which has an optical drive) and also because I didn’t want to waste a CD-R on this 7 MB tool I decided to find a way to make it boot from USB.

SYSLINUX and MEMDISK to the rescue!

  1. Format your USB drive with the FAT file system. Make sure you erase the bootsector and mark the partition bootable afterwards.
  2. Install SYSLINUX: yum install syslinux
  3. Install the SYSLINUX MBR onto your device: cat /usr/share/syslinux/mbr.bin > /dev/sdX
  4. Install SYSLINUX onto your USB drive: syslinux /dev/sdX
  5. Copy the MEMDISK bootloader from /usr/share/syslinux/memdisk to your drive’s root
  6. Now copy the SeaTools ISO to your USB drive
  7. At the root of your device create a file called syslinux.cfg with the following content:
    DEFAULT SeaTools
    LABEL SeaTools
      LINUX memdisk
      INITRD SeaToolsDOS223ALL.ISO
      APPEND iso
  8. Now you should be able to boot from your USB drive

FrOSCon 2010

This year’s FrOSCon is being held on August 21 and 22 in St. Augustin near Bonn, Germany. As usual Fedora will have a booth there. Additionally we share a developers room with the guys from Geany and Xfce, so happy hacking will be guaranteed :)

In my opinion FrOSCon is one of the best Open Source events in Germany and the third largest (after LinuxTag and Chemnitzer Linux Tage) also.

If you’re interested in paying a visit or helping out at the booth you can pre-register here: https://fedoraproject.org/wiki/FrOSCon_2010 (Helping out at the booth gives you free admission to the event). Four Fedora Ambassadors have already signed up.

I hope to see many of you guys there and I’m really looking forward to this event!

Vuvuzela Filter using Fedora

If you, like me, like to watch the world cup in South Africa but hate the monotonous sound of the so called Vuvuzelas this post is for you.

I will show you how to filter out the noise using your Fedora machine:

First we need to install the necessary tools and add ourselves to the jackuser group:

yum install jack-rack qjackctl pulseaudio-module-jack ladspa-swh-plugins
gpasswd -a felix jackuser

Of course these commands need to be run as root and you need to replace felix with your username. After you’re done with that you need to log off for the changes to become effective.

Now launch QJackctl from the Applications menu and start configuring it. The following screenshots show my settings. The don’t necessarily need to be your settings, so this is a little bit trial and error.

After you changed the settings you can start the Jack daemon by pressing “Start” in the QJackctl window.

Now you fire up Jack-Rack from the Applications Menu as well. For anything to happen with your audio within Jack-Rack you need to connect your audio devices to the Jack connection of Jack-Rack. This can be done using QJackctl. See below screenshot on how I connected Jack-Rack with my sound devices:

And finally you need to add the filters to Jack-Rack. I used a serial setup of four “Mag’s Notch Filter”. You can add them by clicking on the “+” button at the top left of the Jack-Rack window. Then go to Frequency -> Filters -> Notch -> Mag’s Notch Filter.

Here’s a screenshot of my filter settings:

Frequencies are 233, 466, 932 and 1864 Hz.

Kudos for the information on frequencies go to Surfpoeten.de.

Now you need to hook up the sound output of your TV or cable/sattelite receiver to your computer’s audio input and in turn connect your computer’s audio output to some speakers or headphones.

I usually leave both filters at the end of the rack disabled as that allows for more atmosphere while keeping the vuvuzelas down :D

It’s not perfect but seems to work okay. If you manage to tweak your setup to achive a better sound feel free to add your findings to the comments.

And now enjoy the next world cup game without those annoying vuvuzelas :P

Edit

Here’s a command line for mplayer to achieve the same within mplayer:

mplayer -af pan=1:0.5:0.5,sinesuppress=233:0.01,sinesuppress=466:0.01,sinesuppress=932:0.01,sinesuppress=1864:0.01,sinesuppress=232:0.01,sinesuppress=465:0.01,sinesuppress=931:0.01,sinesuppress=1863:0.01,sinesuppress=234:0.01,sinesuppress=467:0.01,sinesuppress=933:0.01,sinesuppress=1865:0.01

Found by Thomas Moschny at http://pastebin.com/KunkS0uk

Setting Font Settings for GDM

Did you ever feel like changing the font settings in GDM? If you’re a user of NVIDIA’s proprietary driver GDM will show enormously large fonts if you’re using a display with a high number of DPI. Also enabling font smoothing using subpixel rendering might be desireable. To achieve both just run the following commands as root:

gconftool-2 --direct --config-source xml:readwrite:/var/lib/gdm/.gconf -s --type=string /desktop/gnome/font_rendering/hinting full
gconftool-2 --direct --config-source xml:readwrite:/var/lib/gdm/.gconf -s --type=string /desktop/gnome/font_rendering/antialiasing rgba
gconftool-2 --direct --config-source xml:readwrite:/var/lib/gdm/.gconf -s --type=string /desktop/gnome/font_rendering/rgba_order rgb
gconftool-2 --direct --config-source xml:readwrite:/var/lib/gdm/.gconf -s --type=int /desktop/gnome/font_rendering/dpi 96
chown -R gdm:gdm /var/lib/gdm/.gconf
restorecon -r /var/lib/gdm

Cloud Computing

Cloud Computing is basically about not caring on which server you dump your files. That’s about all it is. Sorry, Guys.

Western Digital sent replacement hard drive to 127.0.0.1

I ordered a replacement drive for a WD drive that was failing. I must admit that choosing desktop hard drives for a server might not have been the best choice but since it’s only for my school and cost ist the primary factor it was the only choice I had.

I selected WD’s pre-exchange service where you enter your credit card number and they send you a new drive right away. After you received the new drive you have 30 days to send the defective drive to them.

So now here’s what happened:

  • I ordered the replacement drive
  • The drive is shipped via UPS
  • I get a tracking number and link to check the shipment status
  • Didn’t check on it for a while
  • 20 days later I recieved an email stating “Thank you for sending in your defective device” and I was like w00t!
  • Called WD support to get the status because the tracking shows that the drive was shipped to a place about 200km from where I live.
  • Guy tells me that everything is 100% fine, my credit card will not be charged because they already received the defective device.
  • I told him that I did not receive a replacement drive and that the defective one is still producing bad blocks in my server
  • He promised to call me back

Turns out that they sent the replacement drive to their own logistics center. Of course it contained the RMA number and barcode. So the people there scanned it into their systems believing it was the defective drive I sent.

Well done, WD!

NetworkManager rocks!

Ladies and Gentlemen, this is by far my favorite F13 Feature. The mobile broadband signal strength display. Although the applet icon could use some polish. I’d prefer if the “H” for HSDPA was on a Black Background and the signal bars were in a dark grey to match the new GNOME Icons in F13.