| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# |
| 4 |
# SRT - Secure, Reliable, Transport |
| 5 |
# Copyright (c) 2018 Haivision Systems Inc. |
| 6 |
# |
| 7 |
# This Source Code Form is subject to the terms of the Mozilla Public |
| 8 |
# License, v. 2.0. If a copy of the MPL was not distributed with this |
| 9 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 10 |
# |
| 11 |
|
| 12 |
FFPLAY=`type -p ffplay || echo none` |
| 13 |
if [[ $FFPLAY == "none" ]]; then |
| 14 |
echo >&2 "ERROR: ffplay not available to call. Please install ffplay first." |
| 15 |
exit 1 |
| 16 |
fi |
| 17 |
|
| 18 |
DIRNAME=`dirname $0` |
| 19 |
if [[ ! -x $DIRNAME/srt-live-transmit ]]; then |
| 20 |
echo >&2 "ERROR: you need 'srt-live-transmit' tool from SRT package in the same directory as this script." |
| 21 |
exit 1 |
| 22 |
fi |
| 23 |
|
| 24 |
SRCLOC=$1 |
| 25 |
if [[ -z $SRCLOC ]]; then |
| 26 |
echo >&2 "Usage: `basename $0` <source URL>" |
| 27 |
exit 1 |
| 28 |
fi |
| 29 |
|
| 30 |
$DIRNAME/srt-live-transmit "$1" file://con/ | ffplay - |
| 31 |
|