Skip to content

Instantly share code, notes, and snippets.

@dragonauta
Last active August 29, 2015 14:19
Show Gist options
  • Save dragonauta/a02ced3a5b3817bedc49 to your computer and use it in GitHub Desktop.
Save dragonauta/a02ced3a5b3817bedc49 to your computer and use it in GitHub Desktop.
Using CVLC for re-transmiting online streamings.
#!/bin/bash
# author: Diego 'dragonauta' Rucci
# version 0.2
# CVLC is part of VLC package. It's a CLI tool.
# Some (flash-based) streamings can't be mounted on icecast2.
# solution is to play them with VLC (or cvlc) and redirect output to an icecast2 mountpoint
# ChangeLog
# Added variables to easily reuse script
STREAMING=<put-your-online-streaming-url-here>
USER=<put-your-icecast-user-here>
IP=<put-your-icecast-ip-here_or_localhost_or_127.0.0.1>
PORT=<put-your-icecast-port-here>
MPOINT=<put-your-mount-point-here>
DISPLAY=:0 cvlc $STREAMING --sout "#transcode{vcodec=none,acodec=vorb,ab=128,channels=2,samplerate=44100}:gather:std{access=shout,mux=ogg,dst=source:$USER@$IP:$PORT/$MPOINT}" --sout-keep &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment