Hi there,

I believe that I've discovered a bug in the SVN version of Liquidsoap  
wherein piped processes in output.icecast.external do not actually get  
executed. This only manifests itself on FreeBSD. I was able to use the  
aacplusenc encoder on my Linux box using the following configuration:

def output.icecast.aacplusenc(
  ~id="output.icecast.aacplusenc",
  ~start=true,
  ~restart=true,
  ~restart_delay=3,
  ~host="localhost",
  ~port=8000,
  ~user="source",
  ~password="hackme",
  ~genre="Misc",
  ~url="http://savonet.sf.net/";,
  ~description="OCaml Radio!",
  ~public=true,
  ~dumpfile="",
  ~mount="Use [name]",
  ~name="Use [mount]",
  ~protocol="http",
  ~aacplusenc="aacplusenc",
  ~bitrate=64,
  ~restart_on_crash=true,
  ~restart_on_new_track=false,
  ~restart_encoder_delay=3600,
  ~headers=[],
  s)
  # Metadata update is set by ICY with icecast
  def aacplusenc_p(m)
    "#{aacplusenc} - - #{bitrate}"
  end
  output.icecast.external(id=id,
    process=aacplusenc_p,
    bitrate=bitrate,
    start=start,
    restart=restart,
    restart_delay=restart_delay,
    host=host,
    port=port,
    user=user,
    password=password,
    genre=genre,
    url=url,
    description=description,
    public=public,
    dumpfile=dumpfile,
    name=name,
    mount=mount,
    protocol=protocol,
    header=true,
    restart_on_crash=restart_on_crash,
    restart_on_new_track=restart_on_new_track,
    headers=headers,
    restart_encoder_delay=restart_encoder_delay,
    format="audio/aacp",
    s)
end

   output.icecast.aacplusenc(
      host = "127.0.0.1", port = 8000,
      password = "password", mount = "/mountpoint.aac",
      bitrate = 48,
      input.oss())

However, when I used the same configuration on FreeBSD it would make a  
connection to the Icecast server but would not send audio. I was able  
to successfully connect to the connected mountpoint using curl, but  
only the stream's headers would come through.

Here is the on screen info:

# liquidsoap -v --debug /tmp/icecast.liq
2009/05/25 11:45:13 >>> LOG START
2009/05/25 11:45:13 [protocols.external:3] Didn't find "ufetch"
2009/05/25 11:45:13 [protocols.external:3] Found "/usr/local/bin/wget"
2009/05/25 11:45:13 [main:3] Liquidsoap 0.9.0+svn (trunk/ 
liquids...@rev6586)
2009/05/25 11:45:13 [video.converter:4] Couldn't find prefered video  
converter: gavl
2009/05/25 11:45:13 [audio.converter:4] Using prefered samplerate  
converter: libsamplerate
2009/05/25 11:45:13 [threads:3] Created thread "generic queue #1".
2009/05/25 11:45:13 [threads:3] Created thread "root" (1 total).
2009/05/25 11:45:13 [root:3] Waking up active nodes...
2009/05/25 11:45:13 [source:4] output(dot)icecast(dot)aacplusenc gets up
2009/05/25 11:45:13 [source:4] src_3529 gets up
2009/05/25 11:45:13 [src_3529:4] Activations changed:  
static 
= 
[output(dot)icecast(dot)aacplusenc:output(dot)icecast(dot)aacplusenc],  
dynamic=[].
2009/05/25 11:45:13 [src_3529:4] Enabling caching mode (active source)
2009/05/25 11:45:13 [output(dot)icecast(dot)aacplusenc:4] Activations  
changed: static=[output(dot)icecast(dot)aacplusenc], dynamic=[].
2009/05/25 11:45:13 [output(dot)icecast(dot)aacplusenc:4] Enabling  
caching mode (active source)
2009/05/25 11:45:13 [src_3529:4] Activations changed:  
static=[src_3529,  
output(dot)icecast(dot)aacplusenc:output(dot)icecast(dot)aacplusenc],  
dynamic=[].
2009/05/25 11:45:13 [output(dot)icecast(dot)aacplusenc:2] Creating  
external encoder..
2009/05/25 11:45:13 [output(dot)icecast(dot)aacplusenc:3] Connecting  
mount /mountpoint.aac for [email protected]...
2009/05/25 11:45:14 [output(dot)icecast(dot)aacplusenc:3] Connection  
setup was successful.
2009/05/25 11:45:14 [root:3] Broadcast starts up!


And connecting using curl:

curl -i "http://127.0.0.1:8000/mountpoint.aac";
HTTP/1.0 200 OK
Content-Type: audio/aac
icy-br:64
ice-audio-info: bitrate=64
icy-br:64
icy-description:OCaml Radio!
icy-genre:Misc
icy-name:/mountpoint.aac
icy-pub:1
icy-url:http://savonet.sf.net/
Server: Icecast 2.3.2
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:01 GMT

^C


It appears that the aacplusenc isn't even being launched. Doing a ps  
on the Linux version I noticed this:
# ps auxww |grep aacplusenc
1004     18291  0.0  0.0   1772   484 pts/5    S+   11:47   0:00 /bin/ 
sh -c aacplusenc - - 48
1004     18292  3.8  0.0   2036   784 pts/5    S+   11:47   2:02  
aacplusenc - - 48

However, the same command on the FreeBSD machine revealed that the  
aacplusenc encoder was not running.

Furthermore, I did a test to see if aacplusenc was even running by  
modifying the config:

  def aacplusenc_p(m)
    "#{aacplusenc} - - #{bitrate}"
  end

replaced with:

  def aacplusenc_p(m)
    "touch /tmp/hello"
  end

As it turns out, the "touch /tmp/hello" never even executed, so it  
appears that there is a problem with the way that the pipes are being  
setup on FreeBSD?

Does anyone have any thoughts?

Any help would be greatly appreciated!

Andrew





------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to