(*** This bug was imported into bugs.kde.org ***) Package: konqueror Version: unknown (using KDE 2.2.0 beta1) Severity: wishlist Installed from: compiled sources Compiler: gcc version 2.95.3 20010315 (SuSE) OS: Linux (i686) release 2.4.6 OS/Compiler notes: Now that we can drag and drop from a CD to mp3 and ogg wouldn't it be easy to create a service to convert wavs into mp3 or ogg ? e.g. you drag wav(s) to Services/Ogg-Converter and it is created in the same directory the wav resides. Or something like that. I would like that :-) (Submitted via bugs.kde.org) (Called from KBugReport dialog)
How about a konqueror service menu that could accomplish this? I made a simple one like so. [Desktop Entry] ServiceTypes=audio/x-wav Actions=convertToOgg [Desktop Action convertToOgg] Name=Convert to ogg Exec=oggenc %U Theres a very good Service menu how-to here http://developer.kde.org/documentation/tutorials/dot/servicemenus.html
Created attachment 3842 [details] service menu example Sample .desktop service menu file.
This is what I do, maybe someone can improve it, lame and oggenc have to be installed: $ cat kwavenc.desktop [Desktop Entry] ServiceTypes=audio/x-wav Actions=b64;b128;b192;lq;mq;hq;custom [Desktop Action b64] Name=make a 64kBit MP3 Name[de]=ein 64kBit MP3 erzeugen Icon=sound Exec=xterm -e "(echo m;echo 64;echo n)|wavenc %f" [Desktop Action b128] Name=make a 128kBit MP3 Name[de]=ein 128kBit MP3 erzeugen Icon=sound Exec=xterm -e "(echo m;echo 128;echo n)|wavenc %f" [Desktop Action b192] Name=make a 192kBit MP3 Name[de]=ein 192kBit MP3 erzeugen Icon=sound Exec=xterm -e "(echo m;echo 192;echo n)|wavenc %f" [Desktop Action custom] Name=make a customized MP3 or OGG Name[de]=ein MP3 oder OGG erzeugen, mehr Optionen Icon=sound Exec=xterm -e "wavenc %f" [Desktop Action lq] Name=make a low quality OGG Name[de]=ein sehr kleines OGG erzeugen Icon=sound Exec=xterm -e "(echo o;echo 0;echo n)|wavenc %f" [Desktop Action mq] Name=make a normal OGG Name[de]=ein normales OGG erzeugen Icon=sound Exec=xterm -e "(echo o;echo 4;echo n)|wavenc %f" [Desktop Action hq] Name=make a high quality OGG Name[de]=ein hochqualitatives OGG erzeugen Icon=sound Exec=xterm -e "(echo o;echo 7;echo n)|wavenc %f" $ cat wavenc #!/bin/bash export IFS=" " test -z "$1" && echo -e "\nusage: wavenc file.wav\n" && exit function makemp3() { temp=`echo $1|sed 's/.wav$/.mp3/g'` mp3name="`echo ${temp}|sed 's/.WAV$/.mp3/g'`" echo -e "\nbitrate? [32,40,48,56,64,80,96,112,128,160,192,224,256,320]" read -e bitrate echo echo "Stereo -> Mono? [y/N]" read -e mono if [ "${mono}" = "j" ] || [ "${mono}" = "y" ] then ifmono="-a" fi echo nice -10 lame -b ${bitrate} -h ${ifmono} "$1" "${mp3name}" } function makeogg() { temp=`echo $1|sed 's/.wav$/.ogg/g'` oggname="`echo ${temp}|sed 's/.WAV$/.ogg/g'`" echo -e "\nquality (higher is better)? [-1..10]" read -e quality echo echo "Stereo -> Mono? [y/N]" read -e mono if [ "${mono}" = "j" ] then ifmono="--downmix" fi echo nice -10 oggenc -q ${quality} ${ifmono} "$1" -o "${oggname}" } echo -e "\nMP3 or OGG? [m/o]" read -e enctype if [ "$enctype" = "o" ] then makeogg $1 exit fi
Maybe I try improve the service menu and put it on kde-apps.org