aboutsummaryrefslogtreecommitdiff
path: root/example-scripts/ffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'example-scripts/ffmpeg')
-rwxr-xr-xexample-scripts/ffmpeg/play-mixed-ffplay.sh9
-rwxr-xr-xexample-scripts/ffmpeg/playout-grabber-to-framebuffer.sh9
-rwxr-xr-xexample-scripts/ffmpeg/playout-mix-to-framebuffer.sh9
-rwxr-xr-xexample-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh8
-rwxr-xr-xexample-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh9
-rwxr-xr-xexample-scripts/ffmpeg/record-mixed-ffmpeg.sh9
-rwxr-xr-xexample-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-background-loop.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-decklink-cam1.sh9
-rwxr-xr-xexample-scripts/ffmpeg/source-decklink-cam2.sh9
-rwxr-xr-xexample-scripts/ffmpeg/source-mjpg-framegrabber.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-nostream-music.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-nostream-pause-loop.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-testvideo-as-cam1.sh3
-rwxr-xr-xexample-scripts/ffmpeg/source-testvideo-as-cam2.sh3
-rwxr-xr-xexample-scripts/ffmpeg/stream-combined.sh10
-rwxr-xr-xexample-scripts/ffmpeg/stream-hd.sh9
-rwxr-xr-xexample-scripts/ffmpeg/stream-sd.sh9
19 files changed, 103 insertions, 20 deletions
diff --git a/example-scripts/ffmpeg/play-mixed-ffplay.sh b/example-scripts/ffmpeg/play-mixed-ffplay.sh
index 733c279..40e3bcf 100755
--- a/example-scripts/ffmpeg/play-mixed-ffplay.sh
+++ b/example-scripts/ffmpeg/play-mixed-ffplay.sh
@@ -1,2 +1,9 @@
#!/bin/sh
-ffplay tcp://localhost:11000
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
+ffplay tcp://$MIXHOST:11000
diff --git a/example-scripts/ffmpeg/playout-grabber-to-framebuffer.sh b/example-scripts/ffmpeg/playout-grabber-to-framebuffer.sh
index 9369821..849f5ba 100755
--- a/example-scripts/ffmpeg/playout-grabber-to-framebuffer.sh
+++ b/example-scripts/ffmpeg/playout-grabber-to-framebuffer.sh
@@ -1,9 +1,16 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
fbset -g 1920 1080 1920 1080 32
echo 0 >/sys/class/graphics/fbcon/cursor_blink
ffmpeg \
- -i tcp://localhost:13002 \
+ -i tcp://$MIXHOST:13002 \
-map 0:v \
-c:v rawvideo \
-pix_fmt bgra \
diff --git a/example-scripts/ffmpeg/playout-mix-to-framebuffer.sh b/example-scripts/ffmpeg/playout-mix-to-framebuffer.sh
index 1adcd58..5c1077e 100755
--- a/example-scripts/ffmpeg/playout-mix-to-framebuffer.sh
+++ b/example-scripts/ffmpeg/playout-mix-to-framebuffer.sh
@@ -1,9 +1,16 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
fbset -g 1920 1080 1920 1080 32
echo 0 >/sys/class/graphics/fbcon/cursor_blink
ffmpeg \
- -i tcp://localhost:11000 \
+ -i tcp://$MIXHOST:11000 \
-map 0:v \
-c:v rawvideo \
-pix_fmt bgra \
diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh
index 48d8d1f..f8b1a7b 100755
--- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh
+++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh
@@ -1,12 +1,18 @@
#!/bin/sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
# WARNING: Using '%t' in the output filename requires a patched FFmpeg!
# If this command fails with the message 'Invalid segment filename template',
# you do not have such a FFmpeg version.
ffmpeg \
-y -nostdin \
- -i tcp://localhost:11000 \
+ -i tcp://$MIXHOST:11000 \
-ac 2 -channel_layout 2 -aspect 16:9 \
-map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \
-map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \
diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh
index 341aa27..4167e92 100755
--- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh
+++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh
@@ -1,7 +1,14 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg \
-y -nostdin \
- -i tcp://localhost:11000 \
+ -i tcp://$MIXHOST:11000 \
-ac 2 -channel_layout 2 -aspect 16:9 \
-map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \
-map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \
diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh
index c9b583e..81df928 100755
--- a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh
+++ b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh
@@ -1,7 +1,14 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg \
-y -nostdin \
- -i tcp://localhost:11000 \
+ -i tcp://$MIXHOST:11000 \
-ac 2 -channel_layout 2 -aspect 16:9 \
-map 0:v -c:v:0 mpeg2video -pix_fmt:v:0 yuv422p -qscale:v:0 2 -qmin:v:0 2 -qmax:v:0 7 -keyint_min 0 -bf:0 0 -g:0 0 -intra:0 -maxrate:0 90M \
-map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 2 -ar:a:0 48000 \
diff --git a/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
index b248ee8..5619445 100755
--- a/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
+++ b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -16,4 +17,4 @@ ffmpeg -y -nostdin \
-c:a pcm_s16le \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:10000
+ tcp://$MIXHOST:10000
diff --git a/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh b/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh
index 55a504c..2f16407 100755
--- a/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh
+++ b/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -17,4 +18,4 @@ wget -nc -O /tmp/avsync.ts http://c3voc.mazdermind.de/testfiles/avsync.ts
-c:a pcm_s16le \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:10000
+ tcp://$MIXHOST:10000
diff --git a/example-scripts/ffmpeg/source-background-loop.sh b/example-scripts/ffmpeg/source-background-loop.sh
index a88c39d..e352ecb 100755
--- a/example-scripts/ffmpeg/source-background-loop.sh
+++ b/example-scripts/ffmpeg/source-background-loop.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -15,4 +16,4 @@ while true; do cat /tmp/bg.ts || exit 1; done |\
-c:v rawvideo \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:16000
+ tcp://$MIXHOST:16000
diff --git a/example-scripts/ffmpeg/source-decklink-cam1.sh b/example-scripts/ffmpeg/source-decklink-cam1.sh
index 42b96af..fab2080 100755
--- a/example-scripts/ffmpeg/source-decklink-cam1.sh
+++ b/example-scripts/ffmpeg/source-decklink-cam1.sh
@@ -1,8 +1,15 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg -y -nostdin \
-f decklink \
-i 'DeckLink Mini Recorder (1)@10' \
-c:v rawvideo -c:a pcm_s16le \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:10000
+ tcp://$MIXHOST:10000
diff --git a/example-scripts/ffmpeg/source-decklink-cam2.sh b/example-scripts/ffmpeg/source-decklink-cam2.sh
index baee933..2336a76 100755
--- a/example-scripts/ffmpeg/source-decklink-cam2.sh
+++ b/example-scripts/ffmpeg/source-decklink-cam2.sh
@@ -1,8 +1,15 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg -y -nostdin \
-f decklink \
-i 'DeckLink Mini Recorder (2)@10' \
-c:v rawvideo -c:a pcm_s16le \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:10001
+ tcp://$MIXHOST:10001
diff --git a/example-scripts/ffmpeg/source-mjpg-framegrabber.sh b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
index e5797ad..a44f068 100755
--- a/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
+++ b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -16,4 +17,4 @@ ffmpeg -y -nostdin -xerror \
-c:v rawvideo \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:10002
+ tcp://$MIXHOST:10002
diff --git a/example-scripts/ffmpeg/source-nostream-music.sh b/example-scripts/ffmpeg/source-nostream-music.sh
index 27df45a..d185c62 100755
--- a/example-scripts/ffmpeg/source-nostream-music.sh
+++ b/example-scripts/ffmpeg/source-nostream-music.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -13,7 +14,7 @@ while true; do
-af aresample=$AUDIORATE \
-c:a pcm_s16le \
-f matroska \
- tcp://localhost:18000
+ tcp://$MIXHOST:18000
sleep 1;
done
diff --git a/example-scripts/ffmpeg/source-nostream-pause-loop.sh b/example-scripts/ffmpeg/source-nostream-pause-loop.sh
index f5c0b53..e6d92ce 100755
--- a/example-scripts/ffmpeg/source-nostream-pause-loop.sh
+++ b/example-scripts/ffmpeg/source-nostream-pause-loop.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -15,4 +16,4 @@ while true; do cat /tmp/pause.ts || exit 1; done |\
-c:v rawvideo \
-pix_fmt yuv420p \
-f matroska \
- tcp://localhost:17000
+ tcp://$MIXHOST:17000
diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
index 33dd7f8..d81c205 100755
--- a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
+++ b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -17,4 +18,4 @@ ffmpeg -y -nostdin \
-c:v rawvideo \
-c:a pcm_s16le \
-f matroska \
- tcp://localhost:10000
+ tcp://$MIXHOST:10000
diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
index dec6a9f..3460adf 100755
--- a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
+++ b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
@@ -17,4 +18,4 @@ ffmpeg -y -nostdin \
-c:v rawvideo \
-c:a pcm_s16le \
-f matroska \
- tcp://localhost:10001
+ tcp://$MIXHOST:10001
diff --git a/example-scripts/ffmpeg/stream-combined.sh b/example-scripts/ffmpeg/stream-combined.sh
index 9ee74f3..26aec64 100755
--- a/example-scripts/ffmpeg/stream-combined.sh
+++ b/example-scripts/ffmpeg/stream-combined.sh
@@ -1,5 +1,11 @@
#!/bin/sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
#
# a variation of this script was used to generate all combinations of
# [native|translated|stereo]_[hd|sd|slides] streams for 33c3
@@ -7,9 +13,9 @@
ffmpeg -y -nostdin \
-thread_queue_size 512 \
- -i tcp://localhost:15000 \
+ -i tcp://$MIXHOST:15000 \
-thread_queue_size 512 \
- -i tcp://localhost:13000 \
+ -i tcp://$MIXHOST:13000 \
-threads:0 0 \
-aspect 16:9 \
-filter_complex '
diff --git a/example-scripts/ffmpeg/stream-hd.sh b/example-scripts/ffmpeg/stream-hd.sh
index b0c0e07..1210ecf 100755
--- a/example-scripts/ffmpeg/stream-hd.sh
+++ b/example-scripts/ffmpeg/stream-hd.sh
@@ -1,7 +1,14 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
wget -nc -O /tmp/overlay_hd.png http://c3voc.mazdermind.de/testfiles/overlay_hd.png
ffmpeg -y -nostdin \
- -i tcp://localhost:15000 \
+ -i tcp://$MIXHOST:15000 \
-threads:0 0 \
-aspect 16:9 \
-c:v libx264 \
diff --git a/example-scripts/ffmpeg/stream-sd.sh b/example-scripts/ffmpeg/stream-sd.sh
index 26a7cfb..83db56a 100755
--- a/example-scripts/ffmpeg/stream-sd.sh
+++ b/example-scripts/ffmpeg/stream-sd.sh
@@ -1,7 +1,14 @@
#!/bin/sh
+
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
wget -nc -O /tmp/overlay_hd.png http://c3voc.mazdermind.de/testfiles/overlay_hd.png
ffmpeg -y -nostdin \
- -i tcp://localhost:11000 \
+ -i tcp://$MIXHOST:11000 \
-threads:0 0 \
-aspect 16:9 \
-c:v libx264 \