summaryrefslogtreecommitdiff
path: root/tools/push-icecast-ogg
blob: 82c563f83cde9112192172dff7139ae9a28275f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#
#  This script assumes you have the ew-stream-server program in this
#  directory running on the local system, on port 8080/8443 (the
#  defaults, as long as you don't run it as root).
#
#  This script generates a test stream and streams it to the server
#  using Ogg and Icecast.
#
#



user=admin
password=admin

host=localhost:8443

curlopts="$curlopts --insecure"
curlcmd="--data username=$user --data password=$password"

session_url=`curl -s $curlopts -w '%{redirect_url}' $curlcmd https://$host/login\?redirect_url=/admin/status -o /dev/null`


echo session url $session_url


url=$(echo $session_url | sed 's,\?,stream-0?,')
curl -s $curlopts --data enabled=true --data push-method=icecast $url >/dev/null


gst-launch -q \
  videotestsrc is-live=true ! \
  video/x-raw-yuv,format=\(fourcc\)I420,width=320,height=180 ! \
  timeoverlay ! \
  theoraenc keyframe-freq=30 keyframe-force=30 ! \
  queue ! \
  oggmux max-delay=100000000 max-page-delay=100000000 name=mux ! \
  shout2send ip=127.0.0.1 port=8080 mount=stream-0 \
  audiotestsrc volume=0.1 wave=ticks is-live=true ! \
  vorbisenc ! \
  queue ! \
  mux.