TuneQueue seems to give me a possible solution for my Internet Radio setup, so I've started looking a little bit into it. However, I have some problems... ;-)
I've completed:
* setting up MySQL, created tables
* installed tunequeue-scripts (using default paths)
* added some songs (from 2 artists)
* setting up Apache2
I'm able to have ices2 play the default song, and while playing this song I'm able to request songs through the web-interface and have this song played as the next song. My problem, however, is that it seems like "poptune.pl" is unable to give me a random song to be played. So after playing the default song ices2 stop.
Any hints and tips for what to look for?
Presently I have content in these tables in MySQL (database "tunequeue"):
* channels
* channeltunes
* status
* tunelogging
* tunes
These tables are empty: chat, listeners, news, playlists, schedule, shows and tuneratings.
All songs in "channeltunes" have randomplay=1.
- Lon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Think I've managed to solve some of this myself now. Had to populate shows (i think it was) to get things running.
I also got some:
DBD::mysql::st execute failed: You have an error in your SQL syntax;
when running cs.pl, but solved it by changing the way $qry was executed.
Two other questions:
* how to easily have an MP3-stream in addition to the default OGG-stream? (Preferably I would have just an MP3-stream, but everything seems a little to hung up in OGG...)
* have you tried to have songs tagged with UTF-8 information (title, artist, etc.)? It seems a little broken, but I might get this running myself if I spend some time on it...
- Lon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It sounds like you're very close to having it work, but maybe scheduletunes is failing?
You can run scheduletunes.pl at the cli and give it the argument of your channel #, probably 1. It should output a then a sample of the SQL query it's using to pick songs for scheduling and an HTML formatted list of the songs it's considering (this comes from whichever algorithm you're using to queue songs). If you're using the random scheduler, it will not put 2 songs from the same artist in the queue at the same time... this might be part of the trouble. Also, you need to "prime" the queue by putting at least one real song in the schedule table to start out.
I haven't experimented with a small song database very much. The algorithm is designed to pick songs randomly from a subset of the database. that subset starts with the X% oldest (longest time since they were played) and the excludes any songs from artists already in the queue. X is defined in setup.pl, its called $config{'SCHED_A1_DIV'}.
You might want to set it to 1 until your library is larger.
Good luck, I'll help you until it works
-Aaron
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok sounds like the scheduler problem is fixed. Yes, you can use mp3 rather than ogg, you would use ices0 instead of ices2 and the import process would need to be changed a little. But it should work with a couple tweaks. If you want to have both you can use streamTranscoder to listen to the ogg feed and rebroadcast an mp3 feed, this is what I do and it works pretty well.
I'm sorry I haven't tested UTF-8 specifically.. there may be some issues with certain characters. All the tags in my songs seem to work so I haven't gotten much farther than that :)
I have written a little daemon that updates the metadata every 60 seconds, it cycles through the current aritist -song, a message about the website, current song info again, and then a "coming up" list of the next 3 songs. I like it, and it prevents people from using stream rippers that depend on metadata to tell when songs start and end. If you'd like I can put it somewhere you can grab it, might make figuring out the meta data stuff easier.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As you mention, Aaron, I think my first problems were partly related to my limited number of songs. It seems to work a lot better when I have some more artists. I'm getting closer and closer now, and I think I understand more at this stage after reading some of the perl code. ;-)
When it comes to characterset I've implemented a quick fix for my test-setup. My varchar datatypes in the MySQL-table are ISO-8859-1, so when I have OGGs with UTF-8 characters I convert it to ISO-8859-1 in admin.pl. (Using Text::Iconv.)
I'm going on a small trip this weekend (leaving tomorrow), so I won't be able to play with this until next week or so, but I'll have to think about what to do when it comes to OGG vs. MP3. I've had a quick look at ices0, and I might look at using this client instead of ices2. I could perhaps use poptune.pl inside a "perl-handler" to ices0. But I'll have to change the TuneQueue-scripts to handle MP3s instead of OGG if I go for this solution.
Or perhaps have a look at streamTranscoder, but I have only MP3s at this stage and convering to OGG seems to give not so good quality. Thanks for your reply!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Glad its getting better for you! If you think any of your changes will help others, please send them to me or just a patch if you want, I'll be happy to include them in the next version which is coming "real soon now" and cleans up alot of messy business still in there.
You might also want to try ezstream, they recently added the ability to be controlled by an external script just like ices2 has. I'm not sure if its still a patch you have to apply or if the capability is merged into the main distro. I have tested ezstream and it can be used as a drop in replacement for ices2. it supports several formats including mp3 and ogg. The changes to tunequeue needed for mp3 mode shouldn't be too extensive.
as for ogg sound quality, i find it to be excellent (but my ears aren't as good as they used to be!). I use the mp32ogg util to convery mp3s and preserve as much bitrate as possible, and then I use fairly high quality settings in the icecast config for the channel. The end result sounds better than 128k mp3 in my opinion and uses a little less the 128k bandwidth. Most of my source mp3s are 192k+ vbr. Do the files sound poor after you convert, or when streamed?
Well, have a great trip and hope to get things working the way you'd like them one way or another soon.
-Aaron
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've got a running MP3-only sort-of-solution now. :)
Didn't take long when I first started looking into it, so I didn't have to wait until next week.
I'll try to sumarize when I get some more time. It's time for bed here in Norway now...
Low quality of the OGG files was just something I thought when having a quick listen to the stream earlier today. Not a very definitive conclusion, just something I thought...
I'll give some more update next week.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to have a look at tunequeue again. To much other stuff I had to spend my time on this Spring... :)
Back to the problem of having poptune.pl pop a new song: I've now wiped my old "tunequeue" db from MySQL and tried to start from scratch. I've:
1) created db tunequeue
2) used the tunequeue.sql to create tables
3) added a channel (ad_freq=20, defaultplaylist=1, defaultalg=1, maxschedule=5)
4) added a show (start 00:00:00, end 23:59:59, showalg 1, channelid 1, showdate 0000-00-00)
5) added 11 songs by 8 artists
6) added to status (insert into status values (1,1,-1,0,1,300,'2006-08-27 16:03:00',0,-1);)
After starting my streaming poptune.pl won't give me anything other than my "desperation song"... Any tips?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hmm i will take a good look at the csql/sql issue.
as for work being done, actually there is a bit lately and I plan to release another version by the end of the year. besides various bugfixes and tweaks, new features include a much improve web interface for import and managemnt of tunes (and much easier to arrange your library any way you prefer), song ranking (1-x based on user voting), the ability to play a top 10 type countdown based on that ranking, the ability to tag songs with arbitrary metrics such as how "fast" a song is or how "guitary" it is... any measurments you'd like to make... and then a new algorithm that attempts to blend songs from one to the next based on shared metrics if that makes any sense, it actually works pretty well, and last but certainly not least.. A PROPER INSTALL GUIDE. So good things are coming in the next few months.
As always I am very interested in bugs you find (And especially ones you fix! :) or suggestions. this is a good time to put a word in
-Aaron
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
TuneQueue seems to give me a possible solution for my Internet Radio setup, so I've started looking a little bit into it. However, I have some problems... ;-)
I've completed:
* setting up MySQL, created tables
* installed tunequeue-scripts (using default paths)
* added some songs (from 2 artists)
* setting up Apache2
I'm able to have ices2 play the default song, and while playing this song I'm able to request songs through the web-interface and have this song played as the next song. My problem, however, is that it seems like "poptune.pl" is unable to give me a random song to be played. So after playing the default song ices2 stop.
Any hints and tips for what to look for?
Presently I have content in these tables in MySQL (database "tunequeue"):
* channels
* channeltunes
* status
* tunelogging
* tunes
These tables are empty: chat, listeners, news, playlists, schedule, shows and tuneratings.
All songs in "channeltunes" have randomplay=1.
- Lon
Think I've managed to solve some of this myself now. Had to populate shows (i think it was) to get things running.
I also got some:
DBD::mysql::st execute failed: You have an error in your SQL syntax;
when running cs.pl, but solved it by changing the way $qry was executed.
Two other questions:
* how to easily have an MP3-stream in addition to the default OGG-stream? (Preferably I would have just an MP3-stream, but everything seems a little to hung up in OGG...)
* have you tried to have songs tagged with UTF-8 information (title, artist, etc.)? It seems a little broken, but I might get this running myself if I spend some time on it...
- Lon
It sounds like you're very close to having it work, but maybe scheduletunes is failing?
You can run scheduletunes.pl at the cli and give it the argument of your channel #, probably 1. It should output a then a sample of the SQL query it's using to pick songs for scheduling and an HTML formatted list of the songs it's considering (this comes from whichever algorithm you're using to queue songs). If you're using the random scheduler, it will not put 2 songs from the same artist in the queue at the same time... this might be part of the trouble. Also, you need to "prime" the queue by putting at least one real song in the schedule table to start out.
I haven't experimented with a small song database very much. The algorithm is designed to pick songs randomly from a subset of the database. that subset starts with the X% oldest (longest time since they were played) and the excludes any songs from artists already in the queue. X is defined in setup.pl, its called $config{'SCHED_A1_DIV'}.
You might want to set it to 1 until your library is larger.
Good luck, I'll help you until it works
-Aaron
Ok sounds like the scheduler problem is fixed. Yes, you can use mp3 rather than ogg, you would use ices0 instead of ices2 and the import process would need to be changed a little. But it should work with a couple tweaks. If you want to have both you can use streamTranscoder to listen to the ogg feed and rebroadcast an mp3 feed, this is what I do and it works pretty well.
I'm sorry I haven't tested UTF-8 specifically.. there may be some issues with certain characters. All the tags in my songs seem to work so I haven't gotten much farther than that :)
I have written a little daemon that updates the metadata every 60 seconds, it cycles through the current aritist -song, a message about the website, current song info again, and then a "coming up" list of the next 3 songs. I like it, and it prevents people from using stream rippers that depend on metadata to tell when songs start and end. If you'd like I can put it somewhere you can grab it, might make figuring out the meta data stuff easier.
As you mention, Aaron, I think my first problems were partly related to my limited number of songs. It seems to work a lot better when I have some more artists. I'm getting closer and closer now, and I think I understand more at this stage after reading some of the perl code. ;-)
When it comes to characterset I've implemented a quick fix for my test-setup. My varchar datatypes in the MySQL-table are ISO-8859-1, so when I have OGGs with UTF-8 characters I convert it to ISO-8859-1 in admin.pl. (Using Text::Iconv.)
I'm going on a small trip this weekend (leaving tomorrow), so I won't be able to play with this until next week or so, but I'll have to think about what to do when it comes to OGG vs. MP3. I've had a quick look at ices0, and I might look at using this client instead of ices2. I could perhaps use poptune.pl inside a "perl-handler" to ices0. But I'll have to change the TuneQueue-scripts to handle MP3s instead of OGG if I go for this solution.
Or perhaps have a look at streamTranscoder, but I have only MP3s at this stage and convering to OGG seems to give not so good quality. Thanks for your reply!
Glad its getting better for you! If you think any of your changes will help others, please send them to me or just a patch if you want, I'll be happy to include them in the next version which is coming "real soon now" and cleans up alot of messy business still in there.
You might also want to try ezstream, they recently added the ability to be controlled by an external script just like ices2 has. I'm not sure if its still a patch you have to apply or if the capability is merged into the main distro. I have tested ezstream and it can be used as a drop in replacement for ices2. it supports several formats including mp3 and ogg. The changes to tunequeue needed for mp3 mode shouldn't be too extensive.
as for ogg sound quality, i find it to be excellent (but my ears aren't as good as they used to be!). I use the mp32ogg util to convery mp3s and preserve as much bitrate as possible, and then I use fairly high quality settings in the icecast config for the channel. The end result sounds better than 128k mp3 in my opinion and uses a little less the 128k bandwidth. Most of my source mp3s are 192k+ vbr. Do the files sound poor after you convert, or when streamed?
Well, have a great trip and hope to get things working the way you'd like them one way or another soon.
-Aaron
I've got a running MP3-only sort-of-solution now. :)
Didn't take long when I first started looking into it, so I didn't have to wait until next week.
I'll try to sumarize when I get some more time. It's time for bed here in Norway now...
Low quality of the OGG files was just something I thought when having a quick listen to the stream earlier today. Not a very definitive conclusion, just something I thought...
I'll give some more update next week.
I'm trying to have a look at tunequeue again. To much other stuff I had to spend my time on this Spring... :)
Back to the problem of having poptune.pl pop a new song: I've now wiped my old "tunequeue" db from MySQL and tried to start from scratch. I've:
1) created db tunequeue
2) used the tunequeue.sql to create tables
3) added a channel (ad_freq=20, defaultplaylist=1, defaultalg=1, maxschedule=5)
4) added a show (start 00:00:00, end 23:59:59, showalg 1, channelid 1, showdate 0000-00-00)
5) added 11 songs by 8 artists
6) added to status (insert into status values (1,1,-1,0,1,300,'2006-08-27 16:03:00',0,-1);)
After starting my streaming poptune.pl won't give me anything other than my "desperation song"... Any tips?
Hmmm... seems like I made some progress by changeing line 215 in scheduletunes.pl from using $sql to $csql.
Any work beeing done on tunequeue these days, or should I stick to 0.3?
hmm i will take a good look at the csql/sql issue.
as for work being done, actually there is a bit lately and I plan to release another version by the end of the year. besides various bugfixes and tweaks, new features include a much improve web interface for import and managemnt of tunes (and much easier to arrange your library any way you prefer), song ranking (1-x based on user voting), the ability to play a top 10 type countdown based on that ranking, the ability to tag songs with arbitrary metrics such as how "fast" a song is or how "guitary" it is... any measurments you'd like to make... and then a new algorithm that attempts to blend songs from one to the next based on shared metrics if that makes any sense, it actually works pretty well, and last but certainly not least.. A PROPER INSTALL GUIDE. So good things are coming in the next few months.
As always I am very interested in bugs you find (And especially ones you fix! :) or suggestions. this is a good time to put a word in
-Aaron