Amarok Shouter

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5.0
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:

14 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.

lerxt

15 years ago

I did this as well. Hasn't helped. I do get the following error the first time I try to run the script after installing it:

/home/klkester/.kde/share/apps/amarok/scripts/shouter/Amarok.py:15: DeprecationWarning: Non-ASCII character '\xe9' in file /home/klkester/.kde/share/apps/amarok/scripts/shouter/Globals.py on line 6, but no encoding declared;

Beyond that I also get the error about Publisher - even though I have created the symlink.

Report

lordmaxxon

15 years ago

sorry, the problem's already been solved. i forgot to post that. thanks for your help, though.

Report

frispete

15 years ago

Hi,

thanks for this nice script. It's basically working, as long as ordinary not too big playlists being used here, since the memory hunger of shouter.py is heavy with big ones! This seem to interfere with overlapping dcop calls, which amarok don't like at all, too..

I would tackle these problem based on the current state, and tried to locate the scripts in the amarok svn repo but failed so far. Does that mean, there's no new version - or is it phased out for some reason?

A couple of ideas:
Does basing shouter on the twisted framework provide any advantages?
xml processing should be done with python-elementtree.

Pete

Report

smileaf

15 years ago

Is there any way we could have an option to stream *to* an existing shoutcast/oddcast server?
I need something that can play all file types (ogg, flac and mp3 at the very least.) can connect to at least shoutcast, oddcast might be nice tho.
I'd like it to be controlable via amarok. but at this time I'll settle for anything that will at least work.
ices/ices2 either doesn't support all 3 file types or can't be controlled via amarok or at the very least on demand playlist.
xmms crashes every time I go to try and use it's oddcast plug-in.

Also for those that can't get this running with an error of Publisher not being found.
Here it is:
http://www.saddi.com/software/flup/dist/

Report

griffjon

12 years ago

Has this ever been resolved? I'd love to stream from amarok to a remove icecast (or shoutcast or airtunes ... anything!) server. Please don't make me stick with XP+Winamp for my music streaming needs :(

Report

sirpupu

15 years ago

ok i downloaded that...what im suppose to do with it ?

Report

kokiperex

15 years ago

The script is working. But my listeners said that they listen with "cuts". I have a poor bandwith, but with shoutcast i dont have this problem, i try to down the "max bitrate per request" to 10. but still. Well i have a 20 Kbps connection, so, its not so bad bandwith for a 1-client stream. Maybe i didnt understand the parameter. I'm trying to down the bitrate of the stream, so the clients can hear without "cuts".

Koki

Sorry about my poor english.

Report

C

jbell

15 years ago

Shouter isn't really meant for low-bandwidth streaming. Streaming an mp3 encoded at 128 will require at least 16 kB per client-second. As far as the 'Max download rate per request' option goes ... well, it should have been removed a couple of months ago. It currently does nothing.

Report

nicolaslara

15 years ago

Hi, thanks for the modification, thats better, but i still cant get it to work :s... can you post a "how-to" on installing it or some guide to having it work... i really like the idea of this script, and i would like having it!... :D

thnx

Report

nicolaslara

15 years ago

Ive installed it the usual way, but i only get A LOT of "scrits" (they arent actually scripts, they are parts of the shouter script i.e.: shouter.debug, client.py, binfuncs.py... etc)...
how do i install it?, have anyone done it?

Report

opqdan

15 years ago

It seems as if the worng set of files were zipped up since there are a couple make's and other files that don't seem to belong.

Report

C

jbell

15 years ago

Sorry, this should be fixed now.

Report

dangerous666

15 years ago

I don't know how to get this script running in amarok.. I would like a tip or a how-to from the author...
Thx

Report

alanorman

15 years ago

Run Amarok, then select TOOLS -> SCRIPTS -> INSTALL SCRIPT. Select the .bz2 packages and add it to Amarok. Then configure it.

Report

anonymous-hive

15 years ago

When I do this in the scripts dialog, lots of *.py appear and I don't know which to run... Which of them should I run?

Report

Shadowfiend

15 years ago

First of all, let me say this is a wonderful script :-)

An issue I noticed is that the stream dies very quicly (a second or two) if the current track does not have an artist (or, for that matter, an album). This is an error that occurs in the Playlist.py file, the function get_meta, where the following occurs:
return self.artist + ' - ' + self.title

I'm running amaroK 1.2.4, is that the problem?

Also, any reason for which OGG streams are impossible?

Again, thanks for this impressive script :-)

Report

C

jbell

15 years ago

Thanks. Fixed in beta2. Mixed-format streams (mp3 + ogg + whatever) aren't possible as there is no way to inform clients that they need to start decoding differently. A pure ogg stream may be doable, though as ogg files only comprise less than a quarter of my collection it's not something that I'm putting much work into. On-the-fly transcoding ogg into mp3 is also doable and is something I'm working on when I have time.

Report

jetpeach

14 years ago

please let us know if there is any progress on on-the-fly ogg to mp3 encoding for streaming. it's definitely something i would love as well.

great script, thanks for all the hard work!!!

Report

Shadowfiend

15 years ago

Fantastic! Thanks!

Report

jwoo

15 years ago

I changed the port because I was unable to access it, now it won't start and it says to see debug output but it is empty. I can't run the configure script to change the port from amarok unless Shouter is running. I tried reinstalling it, reinstalling amarok, completely removing anything in the amarok directories and reinstalling... It still will not run again.

What am I to do now? Is there a file I can edit to change the port it is using?

Report

C

jbell

15 years ago

When a python server exits less than gracefully, it tends to not immediately release the port it was using. You can look at a list of your running processes and kill some of the python ones, or edit (I think) ~/.kde/share/apps/amarok/scripts-data/shouterrc to change the port.

Report

pvoce

15 years ago

Its WONDERFUL, but I've run itno the following issue:

I have setup a streamer at a raduio station that I work at. Every couple of days, Amarok will crash (MUCH more than likely not your fault), but when I restart the apps and the script, the script always streams to the next port. For example, If I designate 8000, and amarok crashes, it streams to 8001 upon restart.

Even after restarting the computer, I cannot get the script to stream to the original port. I have even uninstalled the script AND recreated the streams, to no avail Ideas?

Report

raphink

15 years ago

I've tried lots of times, but it won't work ... Xmms starts and plays nothing for example. Today I've tried with Kaffeine, and I get this output (sorry it's very long but I thought it might be useful ...) :

xine: couldn't find demux for >http://raphink.myftp.org:8001/amarok<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://raphink.myftp.org:8001/amarok<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://raphink.myftp.org:8000/amarok<
xine: found input plugin : http input plugin
200 frames delivered, 2 frames skipped, 10 frames discarded
video_out: throwing away image with pts 241819782 because it's too old (diff : 14244).
video_out: throwing away image with pts 241810782 because it's too old (diff : 23244).
video_out: throwing away image with pts 241801782 because it's too old (diff : 32244).
video_out: throwing away image with pts 241792782 because it's too old (diff : 41244).
video_out: throwing away image with pts 241783782 because it's too old (diff : 50244).
video_out: throwing away image with pts 241774782 because it's too old (diff : 59244).
video_out: throwing away image with pts 241765782 because it's too old (diff : 68244).
video_out: throwing away image with pts 241756782 because it's too old (diff : 77244).
video_out: throwing away image with pts 241747782 because it's too old (diff : 86244).
video_out: throwing away image with pts 241738782 because it's too old (diff : 95244).
xine: found demuxer plugin: RealMedia file demux plugin
xine: found input plugin : rtsp streaming input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://raphink.myftp.org:8000/amarok<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://raphink.myftp.org:8000/amarok<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://82.239.88.236:8000/amarok<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://raphink.myftp.org:8001/amarok<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
xine: couldn't find demux for >http://raphink.myftp.org/amarok<
input_http: content length = 19039 bytes
input_http: 3xx redirection: >301 Moved Permanently<
xine: found input plugin : http input plugin
xine: cannot find input plugin for MRL []
200 frames delivered, 0 frames skipped, 1 frames discarded
video_out: throwing away image with pts 31880219 because it's too old (diff : 10530).
200 frames delivered, 0 frames skipped, 1 frames discarded
video_out: throwing away image with pts 15346788 because it's too old (diff : 18042).
200 frames delivered, 0 frames skipped, 1 frames discarded
video_out: throwing away image with pts 11296386 because it's too old (diff : 9273).
200 frames delivered, 4 frames skipped, 10 frames discarded
video_out: throwing away image with pts 514994 because it's too old (diff : 15461).
video_out: throwing away image with pts 505994 because it's too old (diff : 24461).
video_out: throwing away image with pts 496994 because it's too old (diff : 33461).
video_out: throwing away image with pts 487994 because it's too old (diff : 42461).
video_out: throwing away image with pts 478994 because it's too old (diff : 51461).
video_out: throwing away image with pts 469994 because it's too old (diff : 60461).
video_out: throwing away image with pts 460994 because it's too old (diff : 69461).
video_out: throwing away image with pts 451994 because it's too old (diff : 78461).
video_out: throwing away image with pts 442994 because it's too old (diff : 87461).
video_out: throwing away image with pts 433994 because it's too old (diff : 96461).
xine: found demuxer plugin: RealMedia file demux plugin
xine: found input plugin : rtsp streaming input plugin

Report

kokiperex

15 years ago

Hi, I was trying to mount a server, but when I try to play in xmms ($ xmms http://localhost:8000/myradio) I have the error 503, server is full. But I'm the only one that is trying to connect.

Sorry about my English, is not my first language

Report

ATAHUALPA

15 years ago

Jbell, i read in all the files *.py that this script should works with python 2.2, so i have py 2.3, i dont know if this is my problem, the only thing that I know is that it does not work.
I have tried to execute Shouter.py from shell end i have obtained this output:
////////////////////////////////////////////////////////////////////////////////
$ python Shouter.py
localhost.localdomain - - [18/Jul/2005 17:13:37] "GET /amarok HTTP/1.1" 404 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 46053)
Traceback (most recent call last):
File "/usr/lib/python2.3/SocketServer.py", line 463, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.3/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.3/SocketServer.py", line 521, in __init__
self.handle()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 324, in handle
self.handle_one_request()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 318, in handle_one_request
method()
File "/home/felipe/.kde/share/apps/amarok/scripts/shouter/StreamController.py", line 63, in do_GET
raise unmapped_mount_error
unmapped_mount_error
----------------------------------------
localhost.localdomain - - [18/Jul/2005 17:14:02] "GET /amarok HTTP/1.1" 404 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 47037)
Traceback (most recent call last):
File "/usr/lib/python2.3/SocketServer.py", line 463, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.3/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.3/SocketServer.py", line 521, in __init__
self.handle()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 324, in handle
self.handle_one_request()
File "/usr/lib/python2.3/BaseHTTPServer.py", line 318, in handle_one_request
method()
File "/home/felipe/.kde/share/apps/amarok/scripts/shouter/StreamController.py", line 63, in do_GET
raise unmapped_mount_error
unmapped_mount_error
----------------------------------------
Traceback (most recent call last):
File "Shouter.py", line 136, in ?
while 1: sleep(120)
KeyboardInterrupt

Killed
////////////////////////////////////////////////////////////////////////////

Jbell, please, help me, this script is too much useful!


PS.the previous ones release worked wonderfully:)

Tia!

Report

14 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.

12345678910
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.2.1
updated Oct 03 2006
added Mar 24 2005
downloads 24h
0
mediaviews 24h 0
pageviews 24h 1
System Tags addon

Appimages

To install any downloaded Appimage via GUI, use this tool AppImagelauncher.

To install Appimages from Appimagehub via CLI use appimage-cli-tool.
This allows you to e.g. search appimages with "app search xyz" and install any appimage via command "app install #id".

If you are a developer who is interested to easily build appimages from your code repo, read the guide here.