Amarok Shouter
Amarok 1.x Scripts
Score 50%
Description:

This script was written as a vehicle for learning python, I'm open to suggestions, comments and anything not overly abusive. With disclaimer out of
the way, forward with the details: this script will start a small server from within amaroK and serve music streams on a specified port. Stream sources are configurable: current options are for "live" streams as well as a snapshotted playlist. This works with a bevy of different user agents.

Comments and feedback will be much appreciated.
Last changelog:

12 years ago

Oct 3, 2006
* fixed unsupported operand error on startup
+ added README.

Aug 30, 2005
- fixed executable bits on non-executable files

Aug 28, 2005
- beta2 Bumped to 0.2.0

0.2.0 beta2, 2005
- Added fix from ShadowFiend
- Tweaked static playlist management. Static playlist clients should now *never* be dropped because of buffer underruns.

0.2.0-beta, 2005
August 12th
Added link to 0.2.0-beta. This is somewhat experimental. It works for me, but as I don't currently have access to a machine with Winamp/WMP I'm posting this as a beta to see if any problems come up. This includes fixes for client side buffer-overruns which result in a repeat of the trailing 10% of each song, and some simple burst-on-connect handling. These changes will be committed to amaroK SVN when I get my DSL at home up and running.

*June 23, 2005 update*
- Re-uploaded 0.1.4. It looks like it never made it there the first time.

cyruspy

7 years ago

Hi, should this work with Qt4?, on openSUSE 11.2 there's only python-qt4, no qt3 anymore.

Report

LinDevel

9 years ago

Hi!

I like the Shouter a lot (and it is way easier to setup than icecast)!
Though when I play Ogg/Vorbis, the Shouter doesn't anymore deliver anything... Does it support on the fly reencoding, i.e. via Transkode?

Report

robbieice

9 years ago

i like the script very much!

But now i bought some streaming-clients, who can play mp3-streams only up to 192kbit/s - if i play files >192kbit/s they decode just noise...

Is it possible, to transcode the files on the fly to a target bitrate?

Report

spieler

9 years ago

Hi,
I installed Shouter 0.21 in Amarok 1.4.7 and KDE 3.5.1. I think it will work. But I don't get a proper Download rate in browser. I only get ca 30 kb/sec. The "max download rate per request" config doesn't change anything. Is there any hint available?
TIA
Dirk

Report

oobogart

10 years ago

I'm trying to get this to work. When I run the script I get:

The script 'Shouter.py' exited with error code: 1

Traceback (most recent call last):
File "/home/oobogart/.kde/share/apps/amarok/scripts/shouter/Shouter.py", line 23, in <module>
from ShouterConfig import *
File "/home/oobogart/.kde/share/apps/amarok/scripts/shouter/ShouterConfig.py", line 25, in <module>
from Amarok import *
File "/home/oobogart/.kde/share/apps/amarok/scripts/shouter/Amarok.py", line 15, in <module>
from Globals import *
File "/home/oobogart/.kde/share/apps/amarok/scripts/shouter/Globals.py", line 6
SyntaxError: Non-ASCII character '\xe9' in file /home/oobogart/.kde/share/apps/amarok/scripts/shouter/Globals.py on line 6, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Report

quartic

10 years ago

add the following line to the beginning of .kde/share/apps/amarok/scripts/shouter/Globals.py :

# coding=Latin-1

This tells newer(current) versions of python to use the old style for escaping unicode characters.

Report

LinDevel

10 years ago

I fixed it using
iconv -c -f utf-8 -t ascii shouter/Globals.py > shouter/Globals.py.tmp && mv shouter/Globals.py.tmp shouter/Globals.py
but your fix is obviously better.

jbell, can you please update the package to 0.2.2?

Besides of that this script is really nice! Small, simple to setup, and works like a charm.

Report

luidyayres

10 years ago

Hello... There... the script is unbeliavable... thanks for all... but im havin some error when im in the winamp ( client ) ... the message is " server is waiting for input "... what can be that ???

Report

clintonthegeek

10 years ago

Hi,

Trying this in Amarok 1.4.5 in Kubuntu Edgy, I can't get the script running. I do have the Python QT bindings installed (python-qt3 package). This is what I get:

The script 'Shouter.py' exited with error code: 1

Traceback (most recent call last):
File "/home/clinton/.kde/share/apps/amarok/scripts/shouter/Shouter.py", line 24, in ?
from StreamController import *
File "/home/clinton/.kde/share/apps/amarok/scripts/shouter/StreamController.py", line 23, in ?
from StreamPublisher import *
File "/home/clinton/.kde/share/apps/amarok/scripts/shouter/StreamPublisher.py", line 23, in ?
from Publisher import *
ImportError: No module named Publisher

Report

lengau

10 years ago

I'm having the same problem here with Amarok 1.4.5 on Kubuntu Feisty with KDE 3.5.6.

Report

Chief677

10 years ago

Hi,

you need to run these to commads, then it should work:
ln -s /usr/share/apps/amarok/scripts/common/Publisher.py /home/<username>/.kde/share/apps/amarok/scripts/shouter/
ln -s /usr/share/apps/amarok/scripts/common/Zeroconf.py /home/<username>/.kde/share/apps/amarok/scripts/shouter/

c,Ya

Report

kraymer

10 years ago

This is so great! Thanks a lot for this incredible script. It should be part of every amaroK distribution as it makes this player even better! (Btw, I think it's not part of kde's hot stuff so that it can be downloaded directly via amaroK?)

One suggestion though: Why not mention how to access the stream with a line in the README? Took me a few minutes figure out I had to add the mount point to the URL.

Report

Liju

10 years ago

I have to congratulate You! I have been looking for exactly something like that! You are the Man! THanks!!!

Report

sunman

10 years ago

I've found this useful for playing music on my networked computers at home even so my wife can listen to the music on my computer. Very cool!

Report

rabauke

10 years ago

I get an error when I try to start the script with amarok 1.4.4.
File "/home/rabauke/.kde/share/apps/amarok/scripts/shouter/Globals.py", line 6
SyntaxError: Non-ASCII character '\xe9' in file /home/rabauke/.kde/share/apps/amarok/scripts/shouter/Globals.py on line 6, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

python -V
Python 2.5

Report

jetpeach

10 years ago

i also get this error. i located Globals.py and made a symbolic link to it in the .kde/share/apps/..../shouter directory containing the script, and the error changes but now there are just a bunch of other files it still can't find or something.
any help anyone? i would love to try this script out, too bad it doesn't work "out of the box", maybe i can look at the code sometime and help...
Kubuntu 6.10 Amarok 1.4.4

Report

knet

10 years ago

It's easy to fix.

Add the following to the top of Globals.py:

# -*- coding: latin-1 -*-

If you want to understand why, read:

http://www.python.org/dev/peps/pep-0263/

Report

scorpaen

11 years ago

if amarok crashes, the listening port is incremented by one. apparently there is a lock file or temp file that is blocking the port... where is this lock file or temp file located?

Thanks!

Report

ccl2

10 years ago

Had the same effect. Looks like it's not a lock by the script. Instead it's a Python process still running and blocking 8000. I used netstat -nap to find the PID of the blocking process. I killed the process and afterwards the script used port 8000 again.

Report

asuryan

11 years ago

Hi, thanks for your script !
i tried this out and everything worked fine, but now if i want to stream some mp3
i cant listen with my amarok/winamp

QDom: saving invalid character , the document will not be well-formed
QDom: saving invalid character , the document will not be well-formed
QDom: saving invalid character , the document will not be well-formed
QDom: saving invalid character , the document will not be well-formed
....

in example: i cant listen to Deep Blue Something - Breakfast at Tifany's
or Duran Duran - Hungry like the Wolf

Someone got a solution for my problem ?

p.s. sry for my poor english :x

Report

semicolon

11 years ago

Hi, I receive the following error when running your Shouter script on a freshly reformatted Kubuntu Edgy (KDE 3.5.4), Amarok 1.4.3:

Traceback (most recent call last):
File "/home/semicolon/.kde/share/apps/amarok/scripts/shouter/Shouter.py", line 24, in ?
from StreamController import *
File "/home/semicolon/.kde/share/apps/amarok/scripts/shouter/StreamController.py", line 23, in ?
from StreamPublisher import *
File "/home/semicolon/.kde/share/apps/amarok/scripts/shouter/StreamPublisher.py", line 23, in ?
from Publisher import *
ImportError: No module named Publisher

Report

semicolon

11 years ago

Solved! After digging back through the comments I found the solution to my problem.

In console:

cd ~/.kde/share/apps/amarok/scripts/shouter/
ln /usr/share/apps/amarok/scripts/common/Zeroconf.py
ln /usr/share/apps/amarok/scripts/common/Publisher.py

Report

thompson4822

11 years ago

I'm having the same problem, but your description of the solution doesn't help me in any way. Did you have to move some files? Download some? Under openSuse 10.1, there is no /usr/share/apps/amarok directory...

Report

talmage

11 years ago

You need to find where Amarok is installed on your system and make the sym links accordingly.

Try this:

find / -name Publisher.py -print

to locate the Publisher.py code.

Report

Magus2501

11 years ago

I love this script. It should be included with amaroK. I've been trying to do something like this with icecast to no success. Thank you!

My one complaint: I can't stream ogg files. That's the only thing I would change about your fine piece of code.

Report

12 years ago

Oct 3, 2006
* fixed unsupported operand error on startup
+ added README.

Aug 30, 2005
- fixed executable bits on non-executable files

Aug 28, 2005
- beta2 Bumped to 0.2.0

0.2.0 beta2, 2005
- Added fix from ShadowFiend
- Tweaked static playlist management. Static playlist clients should now *never* be dropped because of buffer underruns.

0.2.0-beta, 2005
August 12th
Added link to 0.2.0-beta. This is somewhat experimental. It works for me, but as I don't currently have access to a machine with Winamp/WMP I'm posting this as a beta to see if any problems come up. This includes fixes for client side buffer-overruns which result in a repeat of the trailing 10% of each song, and some simple burst-on-connect handling. These changes will be committed to amaroK SVN when I get my DSL at home up and running.

*June 23, 2005 update*
- Re-uploaded 0.1.4. It looks like it never made it there the first time.

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.2.1
updated Oct 03 2006
added Mar 24 2005
downloads today
0
page views today 1