Convert to MP3 Konqueror Service Menu

I wanted an easy way to convert music to MP3 from various formats under Konqueror in KDE on Kubuntu Linux.  I found an interesting post about creating a KDE Service Menu which got me started in the right direction.  However, I didn’t like the way ffmpeg converted to 64kbps MP3 quality and the bad sounding results regardless of the bitrate settings that I chose.  I tried lame, and was quite pleased with the results.  I also didn’t like the way the service menu used the entire filename without stripping the dotted extension, so I copied another service menu perl example.  My “Convert to MP3” service menu script goes into the following location:

/usr/share/apps/konqueror/servicemenus/

File convertmp3.desktop:

[Desktop Entry]
ServiceTypes=audio/*
Actions=convertToMP3

[Desktop Action convertToMP3]
Name=Convert to MP3
Exec=lame -V2 %f "`echo %f | perl -pe 's/\.[^.]+$//'`.mp3"

Enjoy!

About skarg

I write software for a living. So, I dedicated some web space for some stuff that I have worked on. I mostly write embedded C for PC based controllers, but I have dabbled in a few other areas as well.
This entry was posted in Linux, Music. Bookmark the permalink.

One Response to Convert to MP3 Konqueror Service Menu

  1. idatwhiteboy says:

    thank you man! searched for a while and found another solution at kde.org, but it was much more time consuming with the issue of installing dependencies that had a final result that was unsatisfactory compared to your solution. With your solution it only took a minute and the options for quality make this not only optimal, but the best solution in my opinion. Thanks again, take care.

Leave a Reply

Your email address will not be published. Required fields are marked *