2
0

srt-ffplay 797 B

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