Hey Jonathan,

On Fri, Jul 3, 2015 at 3:46 AM, Jonathan Thorpe <[email protected]> wrote:

> Hi Drew,
>
> Try sending the streamed source to a dummy output at all times no matter
> where else you send it. Let me know the results.
>
>
> Many thanks for your suggestion.
>
> I've just tried this with an output.dummy as below and it doesn't appear
> to have any effect.
>

OK, here is something that works for me. Try running it unchanged and see
if it works for you as is. If it does, try adding requests as late in the
script as possible. Try and only add requests after the dummystream is
defined so that there will be no requests affecting the dummystream.

#!/usr/bin/liquidsoap
# here is what I have cobbled together that works in the absence
# of requests.
# Try adding requests near the end of you game.



# define transitions to and from stream
default_dj_fade = ref 0.

def to_break(a,b) =
  log("transition TO_BREAK called...")
  source.skip(b)
  add(normalize=false,
     [ sequence([ blank(duration=0.01),
                   fade.initial(duration=!default_dj_fade, b) ]),
        a ])
end


def to_stream(a,b) =
  log("transition TO_STREAM called...")
  add(normalize=false,
     [ sequence([ blank(duration=0.01),
                   b ]),
        fade.final(duration=!default_dj_fade, a) ])
end


# set up for metadata switching
breakz = ref ["COOLZ"]

#specify the icecast stream as an input
stream = input.http("http://192.184.9.158:8240/stream";)



#specify the fail over file (could change this to be a template or
directory of files)
failover = mksafe(single("/var/audio/emergency/BahamianMix1.mp3"))


def f(x) =
    (snd(x))
end

def on_meta (meta)
    breakz := list.map(f,meta)
    print (!breakz)
end


stream = on_metadata(on_meta, stream)

radiostream = stream

#Specify what to switch to when silence is detected
radiostream = fallback(track_sensitive=false, [radiostream, failover])

dummystream = fallback(track_sensitive=false, [stream, failover])

# Output to ALSA (the pi's audio)
#output.alsa(device="hw:1,0", radiostream)
output.alsa(radiostream)

# try this to keep stream checking metadata
output.dummy(dummystream)



>
> ----
> set("server.telnet",true)
> set("server.telnet.bind_addr","127.0.0.1")
> set("server.telnet.port",1234)
> set("server.telnet.reverse_dns",false)
>
> requests = request.queue(id="queue")
>
> melb_barix = mksafe(input.gstreamer.audio(pipeline='udpsrc port=5004
> caps="application/x-rtp" ! rtpmpadepay'))
>
> output.dummy(fallible=true, melb_barix)
>
> melb_source = mksafe(fallback(track_sensitive=false,[requests,
> melb_barix]))
>
>
> output.icecast(%mp3(stereo=false, bitrate=96,samplerate=32000),
>    host = "127.0.0.1", port = 8000,
>    url="http://www.2me.com.au";,
>    public=false,
>    password = "<removed>", mount = "2me-melbads",
>    description = "Radio 2ME",
>    mean(melb_source))
>
> ----
>
>
> I've tried an input.http source as well and that seems to yield the same
> result.
>
> Log output is as follows:
>
> ---
> 2015/07/03 17:42:05 [decoder.ogg:5] Reached last page of logical stream
> 5069a2ff
> 2015/07/03 17:42:07 [decoder.ogg:5] All data from stream 5069a2ff has been
> decoded
> 2015/07/03 17:42:07 [decoder:4] Decoding "/tmp/test.ogg" ended:
> Ogg.End_of_stream.
> 2015/07/03 17:42:07 [clock.wallclock_main:2] Source 2me-melbads failed
> while streaming: Ogg.End_of_stream!
> 2015/07/03 17:42:07 [2me-melbads:4] Activations changed: static=[],
> dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source 2me-melbads gets down.
> 2015/07/03 17:42:07 [2me-melbads:3] Closing connection...
> 2015/07/03 17:42:07 [mean_6055:4] Activations changed: static=[],
> dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source mean_6055 gets down.
> 2015/07/03 17:42:07 [mksafe:4] Activations changed: static=[], dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source mksafe gets down.
> 2015/07/03 17:42:07 [fallback_6051:4] Activations changed:
> static=[mksafe:mean_6055:2me-melbads:2me-melbads], dynamic=[].
> 2015/07/03 17:42:07 [safe_blank:4] Activations changed: static=[],
> dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source safe_blank gets down.
> 2015/07/03 17:42:07 [fallback_6051:4] Activations changed: static=[],
> dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source fallback_6051 gets down.
> 2015/07/03 17:42:07 [queue:4] Activations changed:
> static=[fallback_6051:mksafe:mean_6055:2me-melbads:2me-melbads], dynamic=[].
> 2015/07/03 17:42:07 [mksafe:4] Activations changed: static=[dummy:dummy],
> dynamic=[].
> 2015/07/03 17:42:07 [mksafe:4] Disabling caching mode.
> 2015/07/03 17:42:07 [queue:4] Activations changed: static=[], dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source queue gets down.
> 2015/07/03 17:42:07 [queue:4] Waiting for feeding task to stop...
> 2015/07/03 17:42:07 [queue:3] Finished with "/tmp/test.ogg".
> 2015/07/03 17:42:07 [queue:4] Cleaning up request queue...
> 2015/07/03 17:42:07 [main:3] Shutdown started!
> 2015/07/03 17:42:07 [main:3] Waiting for threads to terminate...
> 2015/07/03 17:42:07 [dummy:4] Activations changed: static=[], dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source dummy gets down.
> 2015/07/03 17:42:07 [mksafe:4] Activations changed: static=[], dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source mksafe gets down.
> 2015/07/03 17:42:07 [input(dot)gstreamer(dot)audio_video_6046:4]
> Activations changed: static=[mksafe:dummy:dummy], dynamic=[].
> 2015/07/03 17:42:07 [safe_blank:4] Activations changed: static=[],
> dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source safe_blank gets down.
> 2015/07/03 17:42:07 [input(dot)gstreamer(dot)audio_video_6046:4]
> Activations changed: static=[], dynamic=[].
> 2015/07/03 17:42:07 [source:4] Source
> input(dot)gstreamer(dot)audio_video_6046 gets down.
> 2015/07/03 17:42:07 [clock.wallclock_main:3] Streaming loop stopped.
> 2015/07/03 17:42:07 [threads:3] Thread "wallclock_main" terminated (0
> remaining).
> 2015/07/03 17:42:07 [main:3] Cleaning downloaded files...
> 2015/07/03 17:42:07 [main:3] Freeing memory...
> 2015/07/03 17:42:07 >>> LOG END
> ---
>
> Any ideas?
>
> Kind Regards,
> Jonathan
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>


-- 
http://nakedghosts.blogspot.com/
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to