Warning: session_start(): open(/tmp/sess_3s12dga8406akjkfbd5el8pu20, O_RDWR) failed: No space left on device (28) in /www/H01/htdocs/lib/base/lib_base.php on line 280
Amakode openDesktop.org
-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   
 
Home
Apps
Artwork
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


-
- Content .- Fans (1) . 

Amakode

   1.9  

Amarok Script

Score 69%
Link:  Link
Downloads:  2555
Submitted:  Nov 4 2006
Updated:  Mar 31 2009

Description:

Amakode is a script for Amarok 1 to transcode music. It uses various external executables to do the grunt work which you will need to install separately using your package manager. More installation details on the home page.




Changelog:

Musepack support thanks to Luigi Curzi and Louis-Guillaume Fortin.

mp4 bug fixes thanks to Michael Morris.




LicenseBSD
(Amakode)
Send to a friend
Subscribe
Other  Content  from tobydickenson
Report inappropriate content



goto page:  1  2  3  4 

-
.

 Bugfix

 
 by tecuya on: Jan 4 2007
 
Score 50%

Version 1.0 contains a bug which prevents using the lame encoder for mp3s (on my system, at least).


After making the following change, the script works perfectly:


--- Desktop/amakode/amakode.py 2006-11-03 15:39:10.000000000 -0800
+++ .kde/share/apps/amarok/scripts/amakode/amakode.py 2007-01-03
16:15:55.000000000 -0800
@@ -97,7 +97,7 @@

# Programs used to encode (from a wav stream)
encode = {}
- encode["mp3"] = ["lame", "--abr", "128", "-" "-"]
+ encode["mp3"] = ["lame", "--abr", "128", "-", "-"]
encode["ogg"] = ["oggenc", "-q", "2", "-"]
encode["mp4"] = ["faac", "-o", "/dev/stdout", "-"]
encode["m4a"] = encode["mp4"]


Reply to this

-
.

 suggestion

 
 by sulla on: Aug 19 2007
 
Score 50%
sullasulla
private

Hi!

A truly great script. It does what its supposed to do!

However, the typo (the forgotten comma) as mentioned above is still present in the script as of version 1.0 on 2007-08-19. A corrected version 1.0.1 would be nice.

Otherwise a *GREAT* script!

==========================
A suggestion to speed things up a bit:

Transcoding is a CPU-intensive job, I know. Is there a way to transcode certain formats directly into each other (ogg to mp3), i.e. without the intermediate step of conversion through a WAV file? This could speed up the process.

Also, could you rewrite the script so it uses multi-core CPUs? My CPU0 goes to 100% load, CPU1 stays at 1%... e.g. by calling the external transcoding programs in a way that they use a multi-threading mode? If this is not an option, could you make your script transcode as many tracks as there are processors in parallel? Like e.g. if you have 10 files in your job, you could start by sending 4 conversion jobs to a quad-core CPUs, and if one core finishes send the next job to it?

That would do the trick. And it might be easy to implement by adding a control-layer over the top conversion class which calls the conversion jobs and assigns them to a specific CPU.

Greetinx, Sulla


Reply to this

-

 Re: suggestion

 
 by DJOConnor on: Aug 20 2007
 
Score 50%

AFAIK there is no [easy] way to transcode :(

If you want to try running more than one job concurrently edit the script and change 'maxjobs = 1' to whatever number you want. (No more than the number of cores I'd say).

Note that it does run the decoder & encoder together in a pipe so it should utilise at least 2 cores by default.


Reply to this

-

 Re: Re: suggestion

 
 by DJOConnor on: Aug 20 2007
 
Score 50%

I just tried it myself and it appears that amarok doesn't issue multiple transcode requests :(

Also, while it will use 2 cores by default, the problem is most likely that an mp3 decode uses sod all CPU so you don't gain much.


Reply to this

-
.

 Enhancement

 
 by BoredByPolitics on: Aug 26 2007
 
Score 50%

Great script (after discovering and fixing the lame encoder typo bug).

However, on my system (Ubuntu 7.04) I found that the dcop transcodingFinished message wasn't being picked up correctly by Amarok - it was assuming that the transcoding had failed.

To resolve this I've made a few changes to incorporate the adjusted dcopext.py script, so that shelling out to execute dcop isn't required. Here's the patch (not including dcopext.py - you can get that from http://www.kde-apps.org/content/show.php/Local+Lyrics?content=37981)

Quote:

diff -uN -x '*.pyc' ./amakode/amakode.py /home/pete/.kde/share/apps/amarok/scripts/amakode/amakode.py
--- ./amakode/amakode.py 2007-08-20 03:47:19.000000000 +0100
+++ /home/pete/.kde/share/apps/amarok/scripts/amakode/amakode.py 2007-08-23 22:30:40.000000000 +0100
@@ -2,6 +2,10 @@

############################################################################
# Transcoder for Amarok
+# v1.2 (Pete Jewell boredbypolitics@gmail.com)
+# - Refixed typo in lame encoder (missing a comma)
+# - Added dcopext.py and associated code to replace
+# existing dcop code.
# v1.1
# - Fixed typo in lame encoder (tcuya from kde-apps.org)
# - Made setting maxjobs easier, although Amarok doesn't appear to issue
@@ -52,6 +56,7 @@
import urllib
import urlparse
import re
+from dcopext import DCOPClient, DCOPApp

class QueueMgr:
queuedjobs = []
@@ -103,7 +108,7 @@

# Programs used to encode (from a wav stream)
encode = {}
- encode["mp3"] = ["lame", "--abr", "128", "-" "-"]
+ encode["mp3"] = ["lame", "--abr", "128", "-", "-"]
encode["ogg"] = ["oggenc", "-q", "2", "-"]
encode["mp4"] = ["faac", "-o", "/dev/stdout", "-"]
encode["m4a"] = encode["mp4"]
@@ -228,7 +233,7 @@
newjob = TranscodeJob(args[1], args[2])
except:
log.debug("Can't create transcoding job")
- os.system("dcop amarok mediabrowser transcodingFinished " + re.escape(args[1]) + "\"\"")
+ ok, void = transcodingFinished(re.escape(args[1]), "")

self.queue.add(newjob)

@@ -236,10 +241,10 @@
""" Report to amarok that the job is done """
if (job.errormsg == None):
log.debug("Job " + job.inurl + " completed successfully")
- os.system("dcop amarok mediabrowser transcodingFinished " + re.escape(job.inurl) + " " + re.escape(job.outurl))
+ ok, void = transcodingFinished(job.inurl, job.outurl)
else:
log.debug("Job " + job.inurl + " failed - " + job.errormsg)
- os.system("dcop amarok mediabrowser transcodingFinished " + re.escape(job.inurl) + "\"\"")
+ ok, void = transcodingFinished(job.inurl, "")

def quit(self):
log.debug("quitting")
@@ -284,11 +289,23 @@
""" Report to amarok that the job is done """
if (job.errormsg == None):
log.debug("Job " + job.inurl + " completed successfully")
- log.debug("dcop amarok mediabrowser transcodingFinished " + job.inurl + " " + job.outurl)
+ ok, void = transcodingFinished(job.inurl, job.outurl)
else:
log.debug("Job " + job.inurl + " failed - " + job.errormsg)
- log.debug("dcop amarok mediabrowser transcodingFinished " + job.inurl + "\"\"")
+ ok, void = transcodingFinished(job.inurl, "")
+
+def initDCOP(dcopClient=None):
+ if dcopClient is None:
+ dcopClient = DCOPClient()
+ dcopClient.attach()
+
+ return DCOPApp('amarok',dcopClient)

+# Global Variables
+
+amarok = initDCOP()
+transcodingFinished = amarok.mediabrowser.transcodingFinished
+
if __name__ == "__main__":
initLog()
signal.signal(signal.SIGINT, onStop)


Reply to this

-

 Re: Enhancement

 
 by matter on: Oct 26 2007
 
Score 50%

I'm pretty sure I've got everything plugged in correctly, but I feel like there's something missing - namely because dcopext.py calls DCOPClient from dcop - so Amarok is giving me a bunch of errors about not having a dcop when I'm trying to run the program, as well as all kinds of strange errors like:

Quote:

Traceback (most recent call last):
File "/home/matter/.kde/share/apps/amarok/scripts/amakodz/amakodz.py", line 71, in <module>
from dcopext import DCOPClient, DCOPApp
File "/home/matter/.kde/share/apps/amarok/scripts/amakodz/dcopext.py", line 37, in <module>
from kdecore import dcop_add, dcop_next
ImportError: No module named kdecore


Sorry, but this is starting to frustrate me - probably because I'm not a python coder. If you could help clarify this for me I would much appreciate it - Thanks!


-Matter
Reply to this

-

 Re: Enhancement

 
 by DJOConnor on: Nov 12 2007
 
Score 50%

I am not sure why dcop isn't failing for you. I did look at using the dcop library but it was an optional extra whereas dcop is installed by kdebase so everyone has it.


Reply to this

-

 Temporary files

 
 by mikealeonetti on: Oct 11 2007
 
Score 50%

I see there is something commented out about making the destination file have the same name as the source but a difference extension. Is there a way to make that work?


Reply to this

-

 m4a and mp4 conversi

 
 by NicoLaus on: Nov 7 2007
 
Score 50%

In order to create valid m4a files, the option "-w" has to be specified as well if the output is stdout so the right line for faac would be:

Quote:
encode["mp4"] = ["faac", "-w", "-o", "/dev/stdout", "-"]


also is it possible to keep the file infos eg id3tags and write them into the converted file? (I'm not really familiar with Python, otherwise I'd integrate it myself)


Reply to this

-

 Re: m4a and mp4 conversi

 
 by DJOConnor on: Nov 12 2007
 
Score 50%


WRT the faac line - yes I found that one when I was testing my changes for tags, thanks :)


Reply to this

-
.

 How to launch ?

 
 by nonolemono on: Dec 12 2007
 
Score 50%

Hi all,

this scripts seems really nice but I can't figure out how to feed it with songs.
When I installed it then click start, nothing happens.
I mean, no new window, no context menu ?

Hope someone can give me the way...

Nono


Reply to this

goto page:  1  2  3  4 

Add commentBack




-



 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Artwork
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Content RSS   
Events RSS   

Participate
Groups
Forum
Add Content
Public API
About openDesktop.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2007-2016 openDesktop.org Team  
All rights reserved. openDesktop.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
openDesktop is a trademark of the openDesktop.org Team