View previous topic :: View next topic |
Author |
Message |
arri
Joined: 23 May 2008 Posts: 1
|
Posted: Fri May 23, 2008 11:22 am Post subject: TIP: ices0.4, python, playlists and how the hell... |
|
|
i'm posting this after a long struggle, hoping i can save others a similair battle. but then again, maybe no-one else is as stupid as me...
anyway, installing icecast2 and compiling ices on my server went like a breeze. no problem.. i had a number of streams running in no-time, both using ices and using a live-encoder from home.
but then i wanted to gain more control over ices, and that's where it started.
i just couldn't figure-out how to get an über-simple python-script to feed ices with a 'dynamic' playlist.
i thought that was because i had never done anything with python before, but python turned-out to be super-easy to learn so i got stumped. i really didn't get it anymore. hours of googling and browsing this forum didn't helpt either. appearantly i was doing something fundamentally wrong...
it indeed was something very fundamental. i guess most of you would rather say i was just being stupid. i agree.
PROBLEM:
ices bails-out when initializing the python playlist-module on startup.
Code: |
1 DEBUG: Initializing playlist handler...
2 DEBUG: Importing /home/arri/ICESSTUFF/ices.py.py module...
3 Error: Could not import module /home/arri/ICESSTUFF/ices.py
4 Initialization of playlist handler failed. []
5 DEBUG: Crossfader shutting downIces Exiting...
|
CAUSE:
i was setting an absolute path with file-extension to the python-script in the module settings in the config-file. (line 7)
wrong:
Code: |
1 <?xml version="1.0"?>
2 <ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices">
3 <Playlist>
4 <File>/home/arri/ICESSTUFF/arrimp3.pls</File>
5 <Randomize>0</Randomize>
6 <Type>python</Type>
7 <Module>/home/arri/ICESSTUFF/ices_pll.py</Module>
8 <Crossfade>5</Crossfade>
9 </Playlist>
10 ...
|
FIX
in the config-file, you should just put the name of the module, without an extension (just as stated in /usr/local/etc/ices.conf.dist) and leave the python-script inside the modules directory under /usr/local/etc/ (on debian)
so for example,
in the config, set module to ices
name your python-script ices.py
put the script in /usr/local/etc/modules/
that's all...(how stupid can you be)
hope it can help someone..
i can now finally continue with the python/php/mysql part.
i found this post very usefull.
thanks
Code: |
1 <?xml version="1.0"?>
2 <ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices">
3 <Playlist>
4 <File>/home/arri/ICESSTUFF/arrimp3.pls</File>
5 <Randomize>0</Randomize>
6 <Type>python</Type>
7 <Module>ices</Module>
8 <Crossfade>5</Crossfade>
9 </Playlist>
10 <Execution>
11 <Background>1</Background>
12 <Verbose>1</Verbose>
13 <BaseDirectory>/home/arri/ICESSTUFF/arri</BaseDirectory>
14 </Execution>
15 <Stream>
16 <Server>
17 <Hostname>localhost</Hostname>
18 <Port>8000</Port>
19 <Password>___</Password>
20 <Protocol>http</Protocol>
21 </Server>
22 <Mountpoint>/arriauto</Mountpoint>
23 <!-- <Dumpfile>ices.dump</Dumpfile> -->
24 <Name>arri_everyhing</Name>
25 <Genre>all</Genre>
26 <Description>everyting</Description>
27 <URL>http://www.pulsecode.org/</URL>
28 <Public>1</Public>
29 <Bitrate>160</Bitrate>
30 <Reencode>1</Reencode>
31 <Channels>2</Channels>
32 <Samplerate>44100</Samplerate>
33 </Stream>
34 </ices:Configuration>
|
|
|
Back to top |
|
|
onyxmueller
Joined: 06 Mar 2010 Posts: 2
|
Posted: Fri Aug 20, 2010 2:50 pm Post subject: |
|
|
Hey man, I just wanted to quickly post that you're definitely not stupid and your post was very helpful to me. Thank you for taking the time to put it up here.
Onyx Mueller |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group subRebel style by ktauber
|