File: srt-ffplay

package info (click to toggle)
srt 1.4.2-1.3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,648 kB
  • sloc: cpp: 42,817; ansic: 4,060; tcl: 916; sh: 146; python: 87; makefile: 49
file content (31 lines) | stat: -rwxr-xr-x 797 bytes parent folder | download
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
#!/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 -