Comment 3 for bug 1504547

Revision history for this message
LaƩrcio de Sousa (lbssousa) wrote :

Synthesizing all options above in a server-side script, I've got the following:

#!/bin/sh

ADDRESS=239.255.100.100
PORT=5004

MULTICAST_BASE="rtp{dst=${ADDRESS},port=${PORT},mux=ts}"
MULTICAST_LOCAL_PLAYBACK="duplicate{dst=${MULTICAST_BASE},dst=display}"

ENABLE_LIVE_TRANSCODING=false
ENABLE_LOCAL_PLAYBACK=false

if ${ENABLE_LOCAL_PLAYBACK}
then
  MULTICAST="${MULTICAST_LOCAL_PLAYBACK}"
else
  MULTICAST="${MULTICAST_BASE}"
fi

if ${ENABLE_LIVE_TRANSCODING}
then
  LIVE_TRANSCODING="transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:"
else
  LIVE_TRANSCODING=
fi

vlc ${1} ":file-caching=300" ":sout=#${LIVE_TRANSCODING}${MUSTICAST}" ":sout-keep"