From f34bb3c0aa9ed17859be6b03c23d0b3428f9621c Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 27 Nov 2022 22:11:04 -0500 Subject: usage: ffmpeg.sh --- ffmpeg.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'ffmpeg.sh') diff --git a/ffmpeg.sh b/ffmpeg.sh index 019ba81..e6e251a 100755 --- a/ffmpeg.sh +++ b/ffmpeg.sh @@ -1,8 +1,15 @@ #!/bin/sh set -e -tempdir=$(mktemp -d) -playlist=$tempdir/playlist -dashdir=$tempdir/dash +if [ $# = 0 ] +then + tempdir=$(mktemp -d) + dashdir=$tempdir/dash +elif [ $# = 1 ] +then + dashdir=$1 +else + exit 1 +fi mkdir -p "$dashdir" echo "$dashdir"/live.mpd @@ -19,7 +26,7 @@ ffmpeg \ x=(w-text_w)/2:y=128:\ box=1:boxcolor=black:\ fontsize=72, - drawtext=\ + drawtext=\ fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:\ text='REBROADCAST':\ fontcolor=white:\ -- cgit v1.2.3