forked from BELABOX/srt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrt-ffplay
More file actions
executable file
·31 lines (25 loc) · 797 Bytes
/
Copy pathsrt-ffplay
File metadata and controls
executable file
·31 lines (25 loc) · 797 Bytes
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
#!/bin/bash
#
# SRT - Secure, Reliable, Transport
# Copyright (c) 2018 Haivision Systems Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
FFPLAY=`type -p ffplay || echo none`
if [[ $FFPLAY == "none" ]]; then
echo >&2 "ERROR: ffplay not available to call. Please install ffplay first."
exit 1
fi
DIRNAME=`dirname $0`
if [[ ! -x $DIRNAME/srt-live-transmit ]]; then
echo >&2 "ERROR: you need 'srt-live-transmit' tool from SRT package in the same directory as this script."
exit 1
fi
SRCLOC=$1
if [[ -z $SRCLOC ]]; then
echo >&2 "Usage: `basename $0` <source URL>"
exit 1
fi
$DIRNAME/srt-live-transmit "$1" file://con/ | ffplay -