View previous topic :: View next topic |
Author |
Message |
humanclay
Joined: 02 Jun 2009 Posts: 16
|
Posted: Tue Jun 02, 2009 3:25 am Post subject: icecast-ads |
|
|
I'm currently experimenting with the new icecast-2.3.2-kh-ads server and I wanted to report a bug and ask a question.
When trying to compile on FreeBSD it errors out here:
Making all in timing
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -ffast-math -fsigned-char -I/usr/local/include -I/usr/local/include/libxml2 -D_THREAD_SAFE -pthread -g -O2 -MT auth.o -MD -MP -MF .deps/auth.Tpo -c -o auth.o auth.c
In file included from client.h:26,
from auth.h:28,
from auth.c:26:
cfgfile.h:61: error: expected specifier-qualifier-list before 'int64_t'
cfgfile.h:221: error: expected specifier-qualifier-list before 'int64_t'
auth.c: In function 'auth_client_setup':
auth.c:103: error: 'ice_config_t' has no member named 'hostname'
auth.c:104: error: 'ice_config_t' has no member named 'port'
auth.c: In function 'queue_auth_client':
auth.c:117: error: 'mount_proxy' has no member named 'auth'
auth.c: In function 'auth_add_listener':
auth.c:516: error: 'mount_proxy' has no member named 'no_mount'
auth.c:522: error: 'mount_proxy' has no member named 'auth'
auth.c:522: error: 'mount_proxy' has no member named 'auth'
auth.c:526: error: 'mount_proxy' has no member named 'auth'
auth.c: In function 'auth_release_listener':
auth.c:558: error: 'mount_proxy' has no member named 'auth'
auth.c:558: error: 'mount_proxy' has no member named 'auth'
auth.c: In function 'auth_stream_authenticate':
auth.c:718: error: 'mount_proxy' has no member named 'auth'
auth.c:718: error: 'mount_proxy' has no member named 'auth'
auth.c: In function 'auth_stream_start':
auth.c:737: error: 'mount_proxy' has no member named 'auth'
auth.c:737: error: 'mount_proxy' has no member named 'auth'
auth.c: In function 'auth_stream_end':
auth.c:753: error: 'mount_proxy' has no member named 'auth'
auth.c:753: error: 'mount_proxy' has no member named 'auth'
auth.c: In function 'auth_check_source':
auth.c:769: error: 'ice_config_t' has no member named 'source_password'
*** Error code 1
I was able to get it to compile on Linux but can't seem to figure out how to get the jingle function to work. I'm hitting a url like this:
http://127.0.0.1:8000/admin/jingle?mount=/mount.ogg&file=/file.ogg
and get this:
<iceresponse>
<message>Jingle file set</message>
</iceresponse>
However the file.ogg (which is located in /web) never plays. All I get is this in the error log when in log-level 4:
[2009-06-02 03:18:53] INFO client/worker 0x8085280 now has 4 clients
[2009-06-02 03:18:53] INFO client/worker 0x8085280 now has 3 clients
[2009-06-02 03:20:19] INFO client/worker 0x8085280 now has 4 clients
[2009-06-02 03:20:20] INFO client/worker 0x8085280 now has 3 clients
I had a look through cfgfile.c, and it looks like the optional <jingle-groups> is the only necessary config option?
Am I missing something? My source client is ices using oss input. |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jun 02, 2009 4:14 am Post subject: |
|
|
FreeBSD is not a platform I build on so it's useful to report errors like these. I've uploaded an update to icecast-2.3.2-kh-ads.tar.gz on my site which should resolve the in64_t lines. Those other errors don't make sense unless the in64_t errors are also causing them.
To use the jingles, you need a couple of things in place, which you may have already done. The <jingle-groups> setting in <mount>. The url to set the group to file mapping and then a trigger. In your case
http://127.0.0.1:8000/admin/jingle?mount=/mount.ogg&file=/file.ogg
sets group 0 to map to that file. Then it's just a matter of triggering the groups to play, which you can do in ices by adding Jingle: into the metadata file and then send signal USR1 to ices, rewrite the metadata file without Jingle: USR1 again to stop. The header acts as a trigger for getting listeners to receive the various mapped files. The metadata update without the Jingle: header will tell icecast where listeners can resume from.
At the moment the code to sort which listener goes to which group is determined by the auth url listener_add, with a default of group 0. If you wish, you can use a varying number by enabling the bit of code in source.c to do that, search for HACK and you'll see a #if 0 which you can change to #if 1
The only xml required is the <jingle-groups> but you can use the <jinglelog> block to log listener numbers.
karl. |
|
Back to top |
|
|
humanclay
Joined: 02 Jun 2009 Posts: 16
|
Posted: Tue Jun 02, 2009 6:05 am Post subject: |
|
|
Thanks, the updates tarball compiled on FreeBSD 7.1. I'll let you know if I discover any other weird things in BSD.
The ices tip also did the trick for my Vorbis stream.
Is there a mechanism built into icecast-ads to work with other source clients/formats? I'm interested in experimenting with MP3 and AAC+ using liquidsoap as a source client. |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jun 02, 2009 10:52 am Post subject: |
|
|
Glag to hear the update fixed the FBSD build.
Obviously non-ogg formats are handled differently, because they are not supported per-se. The configuration and the id to file mapping works to same way but to trigger the playing of jingles you need to use a url. As suggested in
http://lists.xiph.org/pipermail/icecast/2009-May/011464.html
use &play=on and play=off for the same sort of trigger. For the source client, what I would do is that when your source client gets to the point of when a jingle needs to be inserted then plug into the next file or update the metadata routine. At that point you would issue the url to start the jingle start and then stop after so many seconds.
karl. |
|
Back to top |
|
|
humanclay
Joined: 02 Jun 2009 Posts: 16
|
Posted: Thu Jun 04, 2009 8:13 pm Post subject: |
|
|
I'm curious, why wouldn't a metadata insert work for non-Vorbis streams? Wouldn't it make sense to hit a url like this:
http://server:8000/admin/metadata?mode=updinfo&mount=/mount.aac&song=songname&artist=artistname&jingle=jinglename
The /admin/jingle?mount=/stream&play=on is awkward because I have a relay setup and would like to insert jingles on the slave but not the master. This creates some timing issues because the url gets hit on the slave before it has received the audio from the master and thus the replacement does not match up well.
Any thoughts? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jun 04, 2009 9:51 pm Post subject: |
|
|
Firstly, none of the external api is set in stone, so if there are better ways to do things then it's not a problem to change it.
In theory I could use the metadata block to act as a trigger just like I do with the vorbis header. There are some problems though, firstly, metadata blocks have to be requested by the slave but assuming you enforce that as a requirement for slaves then there is the awkward issue of frequency. Metadata blocks occur every N bytes (set by the server), if that is to be 8kbytes then for a 32k stream it would be about every 2 seconds which is useless for trying to time a jingle. You could lessen it for servers but I'm not sure how good the timing would ever be in such fixed byte boundaries.
Whether something specific to icecast master/slave can be done is another matter that could be considered.
karl. |
|
Back to top |
|
|
humanclay
Joined: 02 Jun 2009 Posts: 16
|
Posted: Mon Jun 08, 2009 7:47 pm Post subject: |
|
|
Thanks, that gives me a better understanding of how the process works.
I noticed that if the file that is supposed to be swapped in does not exist the player sits there buffering until the off switch occurs. Would it be possible to have a check to verify that the file exists before switching? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Jun 08, 2009 9:49 pm Post subject: |
|
|
I suppose the entry could be checked at the time of the admin request to set the mapping with some sort of suitable reply.
karl. |
|
Back to top |
|
|
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Tue Jun 09, 2009 11:31 am Post subject: |
|
|
Is there any info somewhere, what is this separate ads version suitable for? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jun 09, 2009 1:02 pm Post subject: |
|
|
Have a look at
http://lists.xiph.org/pipermail/icecast/2009-May/011464.html
It's basically the kh10pre code with some changes to allow for listeners to switch to files midstream, where the file depends on a group setting for the listener. You can think of it as an implementation to allow for per-listener jingle inserts
karl. |
|
Back to top |
|
|
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Fri Jun 12, 2009 6:16 am Post subject: |
|
|
Why is it that necessary for? Play a jingle in the middle of the programme? Just by punching in over the original stream? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jun 12, 2009 12:41 pm Post subject: |
|
|
If you want the listeners of a stream to get different jingles (say based on geographic location) then the selection has to be done at the point of icecast. This build is just a way of seeing how this implementation would work.
karl. |
|
Back to top |
|
|
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Fri Jun 12, 2009 1:55 pm Post subject: |
|
|
When do these jingles play? Like the intro, at the begining, before the live stream, or somewhere in the middle? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jun 12, 2009 3:22 pm Post subject: |
|
|
at some point mid-stream. this can be triggered in vorbis by an update which has a Jingle: header, with non-ogg streams you have to rely on an /admin/jingle trigger. with a play= argument.
karl. |
|
Back to top |
|
|
robertut
Joined: 31 Aug 2007 Posts: 156
|
Posted: Mon Jun 15, 2009 6:51 am Post subject: |
|
|
I see. Well if it just bangs in, mid-stream, it's a problem form the content point of view... it sounds very ugly. A fade-in - fade-out, or a crossfade-in, crossfade-out would make it nicer. But I don't think IceCast server's pupose would be to do that... |
|
Back to top |
|
|
|