split an audio file using ffmpeg

February 8th, 2010

To split an audio (.mp3 in my case) into subcomponents (to extract portions of the file), you can do it very easily:

  1. ensure ffmpeg is installed with appropriate codecs (see convert .flv file into .mp3 file (ie. extract sound from .flv file)
  2. open a terminal and run :
     ffmpeg -f mp3 -i /path/to/file.mp3 -t  hh:mm:ss[.xxx] -ss hh:mm:ss[.xxx] -o /path/to/save.mp3

    where:

    • “-t” option is for the duration of your split
    • “-ss” option is where you want your split to start (optional if you want to start at beginning of the file)
    • “hh:mm:ss[.xxx]” is a time format where you replace hh, mm, ss, xxx with corresponding hours, minutes, seconds, milliseconds respectively. Milliseconds are in squared brackets to highlight that they are optionals and when specified, must be prepended by a dot.

sources

  • man ffmpeg

install thunderbird-3 on lucid through apt

February 8th, 2010

Thunderbird-3 is out for quite a moment right now, and carries with it a remarkable imap support (far better than current implementation on thunderbird-2). And you know what? You’re still stuck with thunderbird2 on lucid lynx.

If you still want to install thunderbird natively and try all the super cool new featues (did I speak about the incredibly improved imap support?), proceed as follow:

  1. edit /etc/apt/sources.list (sudo vi /etc/apt/sources.list) and append the following two lines:

    deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu lucid main
    deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu lucid main

  2. add corresponding pgp key:
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247510BE
  3. update apt:
    sudo apt-get update
  4. install thunderbird-3:
    sudo apt-get install thunderbird-3.0 thunderbird-3.0-gnome-support

    note: if you run “apt-cache search ^thunderbird”, you will see that even newest versions of thunderbird are listed (such as v3.1). Pick up the one you prefer. As of today, stable release is 3.0.1 => I installed v3.0, 3.1 is still in beta. Beta versions are available because we added a daily mozilla repository.

  5. open newly installed thunderbird: alt+F2: “thunderbird-3.0″

That’s it.

Note

Note that doing it this way, (rather than installing a tar file) apt is still in control of installed softwares.
Of importance is also the fact that currently installed thunderbird is still there (on v2). I did not uninstalled it, because ubuntu package managers will automatically upgrade it to a later version when they find it appropriate, whereas newly installed version (v3.0) has version on its package name => it won’t automatically upgrade from v3.0 to v3.1.
By keeping generic “thunderbird”  package installed, when I will see it upgrade to v3.0 I will simply remove all previously 3.0 specific installed packages and continue with generic package. We have best of both world: easy update and still outstanding imap support in the mean time.

sources

convert .flv file into .mp3 file (ie. extract sound from .flv file)

January 28th, 2010

Let’s say you want to extract sound track of you .flv file and save it under .mp3 format.

It should be very easy if you follow these steps:

  1. ensure ffmpeg package is installed (audio/video converter) along with libavcodec-extra-52 package (which contains mp4 codec)
    sudo apt-get install ffmpeg libavcodec-extra-52
  2. run the following command:
    ffmpeg -i video1.flv -f mp3 track1.mp3

That’s it!
Your file should be converted by now.

Note

At first, I had the following error when running ffmpeg:

Unsupported codec for output stream #0.0

This was solved by installing  ”libavcodec-extra-52” package as suggested above.

sources

how to extract tar.gz file to a specified location [solved]

January 24th, 2010

To extract a .tar file to a specified location, simply specify your target directory to -C option.

example: tar -xzf  mytarfile.tar.gz  -C /tmp

sources

see pdfs within firefox browser under linux

January 24th, 2010

Under linux, if you surf the web using firefox, with default installation pdfs cannot directly be viewed within the browser as done under windows. They are either downloaded or opened within a standalone running application such as Adobe Reader.

If you still want to be able to read your pdf without leaving your firefox window, you simply need to install mozplugger package.

Do as follow:

  1. open a terminal
  2. run “sudo apt-get install mozplugger”
  3. restart firefox

That’s it!

sources

  • “apt-cache show mozplugger”

wifi no longer working on ubuntu 10.04 (Lucid)

January 23rd, 2010

Under Ubuntu 9.10, wifi worked out of the box by enabling Broadcom STA wireless driver (System / Administration / Hardware Drivers / activating “Broadcom STA wireless driver”).

Under Ubuntu 10.4, when I try to activate the driver, the following error occurs: “Sorry, installation of this driver failed. Please have a look at the log file for details: /var/log/jockey.log” => I no longer can use my wifi card (which worked great on ubuntu 9.10).

Here is corresponding bug report: https://bugs.launchpad.net/ubuntu/+bug/511379

What’s interesting is jockey.log content:

2010-01-22 23:01:35,364 WARNING: modinfo for module wl failed: ERROR: modinfo: could not find module wl
2010-01-22 23:01:35,365 WARNING: /sys/module/wl/drivers does not exist, cannot rebind wl driver

I will try to update this post as soon as a solution is provided.

sources

encode a cd in mp3 with ubuntu

January 17th, 2010

To encode a cd in mp3 under ubuntu, I use wonderful Sound Juicer app.

  1. install sound juicer: sudo apt-get install soud-juicer
  2. install mp3 codec for encoding: sudo apt-get install gstreamer0.10-plugins-ugly-multiverse
  3. (re)start sound-juicer (applications/sound & video/music extraction)
  4. click on /edit/preferences/edit profiles => select “CD Quality, mp3″ then “close”
  5. select mp3 format in drop down list
  6. click on “close”
  7. insert your music cd and start ripping it!

sources

usb pen ubuntu no longer boots [solved]

January 16th, 2010

Today started badly. I plugged my usb stick on a computer as a regular usb stick. I removed it without unmounting it at first, then I inserted it on my computer to boot into my ubuntu installed on that stick and it no longer booted!!!!

I kept getting that ugly “No operating system found!” error.

I checked all usb ports and got the same error message.

Finally here is what I did:

  1. insert my usb stick on a computer already running debian/ubuntu
  2. stick automatically got mounted to /media/disk => I looked for its name using “mount -l” and found out it is mapped to “/dev/sdb1″
  3. unmount it (sudo umount /media/disk)
  4. searched for errors:
    sudo fsck -t ext3 /dev/sdb1

    ubuntu was intalled on the usb pen using an ext3 filetype
    => no errors were found

    fsck 1.40.8 (13-Mar-2008)
    /dev/sdb1 : clean, 161474/230608 files, 823156/921721 blocs

  5. checked that my first usb pen partition was still bootable:
    sudo cfdisk /dev/sdb

    Surprise!!! it was no longer bootable => I flagged the first partition as bootable and wrote data to disk.

  6. I tried to boot from the usb pen => it did not work => something else is missing
  7. Inserted back my usb pen on my debian computer, and reinstalled grub on it:
    sudo grub-install --no-floppy --root-directory=/media/disk /dev/sdb
  8. I unmounted the usb pen, tried to boot and it worked just as before!!!

Good luck.

sources

ip phone thomson st2022 frozen on “loading” with empty circles

December 8th, 2009

After several electricity cuts, my voip phone (thomson st2022) hung on “Loading” with empty circles and with the 3rd bottom at the bottom of the phone turned on with a green light, and did not go any further. I tried rebooting it several times, but each time it hung on “Loading” after no more than 5 seconds. I left it that way an entire day, nothing changed.

It was not a problem of ip-address nor internet access, the boot process did not even go up to these steps. I contacted my service provider and they answered with a solution that actually worked for me pretty well!

To force a hard reboot of your thomson st2022 voip phone, do as follow:

  1. power off the device
  2. power it on & keep pressing down both the speaker button (green) and silence bottom (above it, red) during the entire boot process
  3. wait until your phone successfully rebooted (you should be able to access the admin menu on your phone right now)

That’s it!

flash player working fine with FF but not with opera

August 12th, 2009

Here is what I did :

  1. install ubuntu 9.04 (+ update it) on a usb stick (my hdd is almost dead, too bad) and boot on the brand new system
  2. install opera (v9.64) from www.opera.com (.deb version)
  3. install flash player (v10) from www.adobe.com/fr/products/flashplayer
  4. restart opera

I tried flash player going to adobe website, and it did not work! It worked with FF, but not with Opera.
Going to Tools/Preferences/Content/Plugin-options correctly listed shockwave plugins

Shockwave Flash
application/futuresplash spl
application/x-shockwave-flash swf
/usr/lib/mozilla/plugins/flashplugin-alternative.so

. I even copied plugin file (.so) into opera plugin folder (/usr/lib/opera/plugins) but it did not work.
To have flash plugin work with Opera, I performed a new install of Opera directly from opera repository (as explained here: https://help.ubuntu.com/community/OperaBrowser

It appears that installing manually downloaded deb file resulted in having the package ‘opera-static’ installed instead of ‘opera’ package, and flash player did not work for me with opera-static package.

=> I did the following:

  1. run “sudo apt-get remove opera-static” to remove opera-static package
  2. run “sudo gedit /etc/apt/sources.list” and add the following line: deb http://deb.opera.com/opera/ stable non-free
  3. run “wget -O – http://deb.opera.com/archive.key | sudo apt-key add -” to add opera signature key for packages
  4. run “sudo apt-get update; sudo apt-get install debian-archive-keyring opera” to install ‘normal’ (eg. non-static) opera package

That’s it.
Starting freshly installed opera, I went to flashplayer page and it got correctly displayed.

sources