Commit 18daec80 authored by Stefano Rivera's avatar Stefano Rivera

Pull out icecast, we don't use it any more

parent 71e54d48
......@@ -12,9 +12,6 @@
gw
encodercube1
[icecast2]
encodercube1
[offsite]
fra1.video.debconf.org
tor1.video.debconf.org
......@@ -27,7 +24,6 @@ noc0stream0
dhcp-server
encoder
ge-master
icecast2
nfs-server
opsis
voctomix
......
---
icecast_source_password: change-me
icecast_relay_password: change-me
icecast_admin_password: change-me
icecast_hostname: debconf.org
icecast_port: 8000
icecast_mounts:
- mount1:
mount-name: /room1.ogv
fallback-mount: /replay-int.ogv
fallback-overrides: 1
hidden: 0
- mount2:
mount-name: /room2.ogv
fallback-mount: /replay-int.ogv
fallback-overrides: 1
hidden: 1
# Defaults for icecast2 initscript
# sourced by /etc/init.d/icecast2
# installed at /etc/default/icecast2 by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Full path to the server configuration file
CONFIGFILE="/etc/icecast2/icecast.xml"
# Name or ID of the user and group the daemon should run under
USERID=icecast2
GROUPID=icecast
# Edit /etc/icecast2/icecast.xml and change at least the passwords.
# Change this to true when done to enable the init.d script
ENABLE=true
---
- name: install icecast
apt:
name: icecast2
- name: push icecast default file
copy:
src: files/icecast2
dest: /etc/default/icecast2
- name: push icecast configuration file
template:
src: templates/icecast.xml.j2
dest: /etc/icecast2/icecast.xml
<!-- {{ ansible_managed }} -->
<icecast>
<limits>
<clients>300</clients>
<sources>10</sources>
<threadpool>10</threadpool>
<queue-size>2097152</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-size>131072</burst-size>
</limits>
<authentication>
<!-- Sources log in with username 'source' -->
<source-password>{{ icecast_source_password }}</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>{{ icecast_relay_password }}</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>{{ icecast_admin_password }}</admin-password>
</authentication>
<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>{{ icecast_hostname }}</hostname>
<listen-socket>
<port>{{ icecast_port }}</port>
</listen-socket>
<fileserve>0</fileserve>
{% for item in icecast_mounts %}
{% for mount in item.iteritems() %}
<mount>
{% for key, value in mount.1.iteritems() %}
<{{ key }}>{{ value }}</{{ key }}>
{% endfor %}
</mount>
{% endfor %}
{% endfor %}
<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/share/icecast2</basedir>
<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/var/log/icecast2</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>100000</logsize> <!-- Max size of a logfile -->
<logarchive>1</logarchive>
</logging>
<security>
<chroot>0</chroot>
</security>
</icecast>
......@@ -16,31 +16,14 @@ voctomix:
# loop_url: http://example.net/loop.tar.xz
streaming:
method: icecast
method: none
hq_config:
video_bitrate: 2000 # kbps
audio_bitrate: 128000 # bps
keyframe_period: 60 # seconds
icecast_quality_hq: 18
icecast_quality_lq: 20
icecast_scale_hq: 720:-1
icecast_scale_lq: 480:-1
icecast_abr_hq: 96K
icecast_abr_lq: 64k
icecast_vbr_hq: 1.5M
icecast_vbr_lq: 200k
icecast_source: source:password@change.me:8000
# streaming:
# method: rtmp
# rtmp:
# threads: auto / vaapi
# location: rtmp://a.rtmp.youtube.com/live2/x/SUPER_SECRET_KEY app=live2
# rtmp:
# threads: auto / vaapi
# location: rtmp://a.rtmp.youtube.com/live2/x/SUPER_SECRET_KEY app=live2
blackmagic_sources: []
# Syntax:
......
---
- name: push the streaming scripts
template:
src: "templates/{{ item.src }}"
dest: "/usr/local/bin/{{ item.dest }}"
mode: 0755
with_items:
- { src: 'stream-voctomix-hq.j2', dest: 'stream-voctomix-hq' }
- { src: 'stream-voctomix-lq.j2', dest: 'stream-voctomix-lq' }
- name: install streaming systemd units
copy:
src: "{{ item }}"
dest: /etc/systemd/user/
with_items:
- files/systemd/videoteam-stream-hq.service
- files/systemd/videoteam-stream-lq.service
......@@ -4,7 +4,5 @@
- include: voctomix.yml
- include: blackmagic.yml
- include: scripts.yml
- include: icecast.yml
when: streaming.method == 'icecast'
- include: rtmp.yml
when: streaming.method == 'rtmp'
#!/bin/sh -x
# {{ ansible_managed }}
exec ffmpeg \
-i tcp://localhost:15000 \
-vf scale={{ icecast_scale_hq }} \
-f webm \
-cluster_size_limit 10M \
-cluster_time_limit 5100 \
-content_type video/webm \
-c:a libvorbis -b:a {{ icecast_abr_hq }} \
-c:v libvpx -b:v {{ icecast_vbr_hq }} -crf {{ icecast_quality_hq }} -g 10 \
-deadline good -threads 4 \
icecast://{{ icecast_source }}/{{ room_name }}-high.webm
#!/bin/sh -x
# {{ ansible_managed }}
exec ffmpeg \
-i tcp://localhost:15000 \
-vf scale={{ icecast_scale_lq }} \
-f webm \
-cluster_size_limit 10M \
-cluster_time_limit 5100 \
-content_type video/webm \
-c:a libvorbis -b:a {{ icecast_abr_lq }} \
-c:v libvpx -b:v {{ icecast_vbr_lq }} -crf {{ icecast_quality_lq }} -g 10 \
-deadline good -threads 4 \
icecast://{{ icecast_source }}/{{ room_name }}-low.webm
......@@ -15,10 +15,6 @@
roles:
- nfs-server
- hosts: icecast2
roles:
- icecast2
- hosts: onsite
roles:
- bash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment