Summary: | converting to mp3 or ogg as a service ? | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | jochen |
Component: | general | Assignee: | Aaron J. Seigo <aseigo> |
Status: | RESOLVED WORKSFORME | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | service menu example |
Description
jochen
2001-07-21 17:29:13 UTC
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 |