File: http_input.txt

package info (click to toggle)
liquidsoap 1.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,504 kB
  • sloc: ml: 37,149; python: 956; makefile: 624; sh: 458; perl: 322; lisp: 124; ansic: 53; ruby: 8
file content (19 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
title: HTTP input

h3. HTTP input

Liquidsoap can create a source that pulls its data from an HTTP location. This location can 
be a distant file or playlist, or an icecast or shoutcast stream.

To use it in your script, simply create a source that way:
%%(http_source.liq)
# url is a HTTP location, like
# http://radiopi.org:8080/reggae
source = input.http(url)
%%

This operator will pull regulary the given location for its data, so it should be used for 
locations that are assumed to be available most of the time. If not, it might generate unnecessary 
traffic and polute the logs. In this case, it is perhaps better to inverse the paradigm and 
use the "input.harbor":harbor.html operator.