aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2016-08-05 16:32:49 +0200
committerMaZderMind <git@mazdermind.de>2016-08-05 16:32:49 +0200
commit463ab55b178935d72442b71748786c22f1f0e027 (patch)
treeb5bb905495e6131bd64f2b4aa625f438169eeaa7
parent59f0abcf365e7c80bb51912d95ccc6d262d759c8 (diff)
allows overriding the default-config of the example-scripts
-rw-r--r--example-scripts/.gitignore2
-rw-r--r--example-scripts/default-config.sh (renamed from example-scripts/config.sh)0
-rwxr-xr-xexample-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-background-loop.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-mjpg-framegrabber.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-nostream-music.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-nostream-pause-loop.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-testvideo-as-cam1.sh7
-rwxr-xr-xexample-scripts/ffmpeg/source-testvideo-as-cam2.sh7
-rwxr-xr-xexample-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh7
-rwxr-xr-xexample-scripts/gstreamer/source-videotestsrc-as-background-loop.sh7
-rwxr-xr-xexample-scripts/gstreamer/source-videotestsrc-as-cam1.sh7
-rwxr-xr-xexample-scripts/gstreamer/source-videotestsrc-as-cam2.sh7
-rwxr-xr-xexample-scripts/gstreamer/source-videotestsrc-as-grabber.sh7
15 files changed, 80 insertions, 13 deletions
diff --git a/example-scripts/.gitignore b/example-scripts/.gitignore
new file mode 100644
index 0000000..003b199
--- /dev/null
+++ b/example-scripts/.gitignore
@@ -0,0 +1,2 @@
+/config.sh
+
diff --git a/example-scripts/config.sh b/example-scripts/default-config.sh
index f6fb91b..f6fb91b 100644
--- a/example-scripts/config.sh
+++ b/example-scripts/default-config.sh
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 10f8486..b248ee8 100755
--- a/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
+++ b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg -y -nostdin \
-i http://c3voc.mazdermind.de/testfiles/avsync.ts \
-filter_complex "
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 e9ea13e..55a504c 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,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
wget -nc -O /tmp/avsync.ts http://c3voc.mazdermind.de/testfiles/avsync.ts
(while true; do cat /tmp/avsync.ts || exit; done) | ffmpeg -y -nostdin \
-i - \
diff --git a/example-scripts/ffmpeg/source-background-loop.sh b/example-scripts/ffmpeg/source-background-loop.sh
index d88164d..a88c39d 100755
--- a/example-scripts/ffmpeg/source-background-loop.sh
+++ b/example-scripts/ffmpeg/source-background-loop.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
wget -nc -O /tmp/bg.ts http://c3voc.mazdermind.de/testfiles/bg.ts
while true; do cat /tmp/bg.ts || exit 1; done |\
ffmpeg -y -nostdin -re -i - \
diff --git a/example-scripts/ffmpeg/source-mjpg-framegrabber.sh b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
index 1eeaea0..e5797ad 100755
--- a/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
+++ b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg -y -nostdin -xerror \
-use_wallclock_as_timestamps 1 -timeout 3000000 -f mjpeg -i "http://10.73.5.2:1881/stream.mjpg" \
-filter_complex "
diff --git a/example-scripts/ffmpeg/source-nostream-music.sh b/example-scripts/ffmpeg/source-nostream-music.sh
index 23db81d..27df45a 100755
--- a/example-scripts/ffmpeg/source-nostream-music.sh
+++ b/example-scripts/ffmpeg/source-nostream-music.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
wget -nc -O /tmp/machine_lullaby_1.ogg http://c3voc.mazdermind.de/testfiles/machine_lullaby_1.ogg
while true; do
ffmpeg -y -nostdin \
diff --git a/example-scripts/ffmpeg/source-nostream-pause-loop.sh b/example-scripts/ffmpeg/source-nostream-pause-loop.sh
index d65ffb7..f5c0b53 100755
--- a/example-scripts/ffmpeg/source-nostream-pause-loop.sh
+++ b/example-scripts/ffmpeg/source-nostream-pause-loop.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
wget -nc -O /tmp/pause.ts http://c3voc.mazdermind.de/testfiles/pause.ts
while true; do cat /tmp/pause.ts || exit 1; done |\
ffmpeg -y -nostdin -re -i - \
diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
index 452e0f3..33dd7f8 100755
--- a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
+++ b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg -y -nostdin \
-i "http://ftp.uni-erlangen.de/cdn.media.ccc.de/broadcast/sendezentrum/h264-hd/31c3-sendezentrum-1013-de-Methodisch_inkorrekt_Die_falsche_42_hd.mp4" \
-ac 2 \
diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
index 674f6c7..dec6a9f 100755
--- a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
+++ b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
ffmpeg -y -nostdin \
-i "http://ftp.uni-erlangen.de/cdn.media.ccc.de/broadcast/sendezentrum/h264-hd/31c3-sendezentrum-1003-de-Freak_Show_FS147_That_Escalatored_Quickly_hd.mp4" \
-ac 2 \
diff --git a/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh b/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh
index f100cb0..5c77882 100755
--- a/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh
+++ b/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
gst-launch-1.0 \
uridecodebin \
uri=http://c3voc.mazdermind.de/testfiles/avsync.mp4 \
diff --git a/example-scripts/gstreamer/source-videotestsrc-as-background-loop.sh b/example-scripts/gstreamer/source-videotestsrc-as-background-loop.sh
index ea550ef..b889517 100755
--- a/example-scripts/gstreamer/source-videotestsrc-as-background-loop.sh
+++ b/example-scripts/gstreamer/source-videotestsrc-as-background-loop.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
gst-launch-1.0 \
videotestsrc pattern=smpte !\
video/x-raw,format=I420,width=$WIDTH,height=$HEIGHT,framerate=$FRAMERATE/1,pixel-aspect-ratio=1/1 ! \
diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh b/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh
index d43709e..5d05a25 100755
--- a/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh
+++ b/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
gst-launch-1.0 \
videotestsrc pattern=ball foreground-color=0x00ff0000 background-color=0x00440000 !\
video/x-raw,format=I420,width=$WIDTH,height=$HEIGHT,framerate=$FRAMERATE/1,pixel-aspect-ratio=1/1 ! \
diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh b/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh
index 2d39d9f..a89de52 100755
--- a/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh
+++ b/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
gst-launch-1.0 \
videotestsrc pattern=ball foreground-color=0x0000ff00 background-color=0x00004400 !\
video/x-raw,format=I420,width=$WIDTH,height=$HEIGHT,framerate=$FRAMERATE/1,pixel-aspect-ratio=1/1 ! \
diff --git a/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh b/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh
index b5cd84c..005b027 100755
--- a/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh
+++ b/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh
@@ -1,5 +1,10 @@
#!/bin/sh
-. `dirname "$0"`/../config.sh
+confdir="`dirname "$0"`/../"
+. $confdir/default-config.sh
+if [ -f $confdir/config.sh ]; then
+ . $confdir/config.sh
+fi
+
gst-launch-1.0 \
videotestsrc pattern=snow !\
video/x-raw,format=I420,width=$WIDTH,height=$HEIGHT,framerate=$FRAMERATE/1,pixel-aspect-ratio=1/1 ! \