aboutsummaryrefslogtreecommitdiff
path: root/example-scripts
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-12-06 20:28:02 +0100
committerMaZderMind <git@mazdermind.de>2015-12-06 20:28:57 +0100
commit39c8cb3a0e3813ef77c61c601d0028281c04ad2d (patch)
tree8e4798e9b70732f1c28f180457e962c63f1a20ec /example-scripts
parentb2b0e458a59ef8ede58b369a5d5194939021165d (diff)
[example-scripts] overhaul and test all example scripts, fixes #5
Diffstat (limited to 'example-scripts')
-rw-r--r--example-scripts/README.md5
-rwxr-xr-xexample-scripts/audio-play-cam1-mirror.sh5
-rwxr-xr-xexample-scripts/audio-play-cam2-mirror.sh5
-rwxr-xr-xexample-scripts/av-record-cam1-mirror.sh20
-rwxr-xr-xexample-scripts/av-source-avsync-ffmpeg.sh9
-rwxr-xr-xexample-scripts/av-source-background-loop.sh7
-rwxr-xr-xexample-scripts/av-source-cam1.sh10
-rwxr-xr-xexample-scripts/av-source-cam2.sh10
-rwxr-xr-xexample-scripts/av-source-eevblog-ffmpeg.sh9
-rwxr-xr-xexample-scripts/av-source-eevblog.sh22
-rwxr-xr-xexample-scripts/av-stream-hd.sh12
-rwxr-xr-xexample-scripts/av-stream-sd.sh10
-rwxr-xr-xexample-scripts/benchmark.sh13
-rwxr-xr-xexample-scripts/control-server/demo-cycle-modes.sh (renamed from example-scripts/demo-cycle-modes.sh)0
-rwxr-xr-xexample-scripts/control-server/set-audio-cam1.sh (renamed from example-scripts/set-audio-cam1.sh)0
-rwxr-xr-xexample-scripts/control-server/set-audio-cam2.sh (renamed from example-scripts/set-audio-cam2.sh)0
-rwxr-xr-xexample-scripts/control-server/set-composite-fullscreen.sh (renamed from example-scripts/set-composite-fullscreen.sh)0
-rwxr-xr-xexample-scripts/control-server/set-composite-picture-in-picture.sh (renamed from example-scripts/set-composite-picture-in-picture.sh)0
-rwxr-xr-xexample-scripts/control-server/set-composite-side-by-side-equal.sh (renamed from example-scripts/set-composite-side-by-side-equal.sh)0
-rwxr-xr-xexample-scripts/control-server/set-composite-side-by-side-preview.sh (renamed from example-scripts/set-composite-side-by-side-preview.sh)0
-rwxr-xr-xexample-scripts/control-server/set-stream-blank-nostream.sh (renamed from example-scripts/set-stream-blank-nostream.sh)0
-rwxr-xr-xexample-scripts/control-server/set-stream-blank-pause.sh (renamed from example-scripts/set-stream-blank-pause.sh)0
-rwxr-xr-xexample-scripts/control-server/set-stream-live.sh (renamed from example-scripts/set-stream-live.sh)0
-rwxr-xr-xexample-scripts/control-server/set-video-cam1.sh (renamed from example-scripts/set-video-cam1.sh)0
-rwxr-xr-xexample-scripts/control-server/set-video-cam2.sh (renamed from example-scripts/set-video-cam2.sh)0
-rwxr-xr-xexample-scripts/control-server/set-video-grabber.sh (renamed from example-scripts/set-video-grabber.sh)0
-rwxr-xr-xexample-scripts/demo-cube-files.sh15
-rwxr-xr-xexample-scripts/demo-cube.sh15
-rwxr-xr-xexample-scripts/demo-local.sh15
-rwxr-xr-xexample-scripts/ffmpeg/play-mixed-ffplay.sh (renamed from example-scripts/av-play-output-ffplay.sh)0
-rwxr-xr-xexample-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh (renamed from example-scripts/av-record-output-ffmpeg-timestamps.sh)0
-rwxr-xr-xexample-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh (renamed from example-scripts/av-record-output-ffmpeg.sh)0
-rwxr-xr-xexample-scripts/ffmpeg/record-mixed-ffmpeg.sh8
-rwxr-xr-xexample-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh (renamed from example-scripts/av-source-avsync-ffmpeg-noloop.sh)2
-rwxr-xr-xexample-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh10
-rwxr-xr-xexample-scripts/ffmpeg/source-background-loop.sh9
-rwxr-xr-xexample-scripts/ffmpeg/source-decklink-cam1.sh (renamed from example-scripts/av-source-bmd-cam1.sh)1
-rwxr-xr-xexample-scripts/ffmpeg/source-decklink-cam2.sh (renamed from example-scripts/av-source-bmd-cam2.sh)1
-rwxr-xr-xexample-scripts/ffmpeg/source-mjpg-framegrabber.sh (renamed from example-scripts/av-source-grabber.sh)5
-rwxr-xr-xexample-scripts/ffmpeg/source-testvideo-as-cam1.sh10
-rwxr-xr-xexample-scripts/ffmpeg/source-testvideo-as-cam2.sh10
-rwxr-xr-xexample-scripts/ffmpeg/stream-hd.sh22
-rwxr-xr-xexample-scripts/ffmpeg/stream-sd.sh22
-rwxr-xr-xexample-scripts/gstreamer/play-cam1-av.sh (renamed from example-scripts/av-play-cam1-mirror.sh)9
-rwxr-xr-xexample-scripts/gstreamer/play-mixed-audio.sh (renamed from example-scripts/video-play-mixer-output.sh)2
-rwxr-xr-xexample-scripts/gstreamer/play-mixed-av.sh13
-rwxr-xr-xexample-scripts/gstreamer/play-mixed-video.sh6
-rw-r--r--example-scripts/gstreamer/play-mixer-video.sh6
-rwxr-xr-xexample-scripts/gstreamer/record-mixed-av.sh (renamed from example-scripts/av-record-output.sh)1
-rwxr-xr-xexample-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh (renamed from example-scripts/av-source-avsync.sh)6
-rwxr-xr-xexample-scripts/gstreamer/source-background-loop.py (renamed from example-scripts/av-source-background-loop.py)7
-rwxr-xr-xexample-scripts/gstreamer/source-test-background.sh (renamed from example-scripts/av-source-background.sh)0
-rwxr-xr-xexample-scripts/gstreamer/visualize-mixed-audio.sh (renamed from example-scripts/audio-visualize-cam1-mirror.sh)4
-rwxr-xr-xexample-scripts/misc/benchmark.sh13
-rwxr-xr-xexample-scripts/misc/demo-local.sh15
-rwxr-xr-xexample-scripts/misc/perf.sh12
-rwxr-xr-xexample-scripts/perf.sh12
-rwxr-xr-xexample-scripts/video-play-cam1-mirror.sh5
-rwxr-xr-xexample-scripts/video-play-cam2-mirror.sh5
59 files changed, 183 insertions, 215 deletions
diff --git a/example-scripts/README.md b/example-scripts/README.md
new file mode 100644
index 0000000..d844fca
--- /dev/null
+++ b/example-scripts/README.md
@@ -0,0 +1,5 @@
+# Voctomix Example-Scripts
+
+This folder is a collection of Scripts that show how different A/V Sources and sinks can interoperate with the voctocore. Some of them can be used in production as-is while some can serve as a template for whatever you need in your situation.
+
+They are grouped into main categories, depending on their purpose an the external tool they are using. The c3voc only uses the ffmpeg tools so they are the *preferred method* of getting data in and out of voctomix, because they are tested and used in production.
diff --git a/example-scripts/audio-play-cam1-mirror.sh b/example-scripts/audio-play-cam1-mirror.sh
deleted file mode 100755
index 6b60a9b..0000000
--- a/example-scripts/audio-play-cam1-mirror.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-gst-launch-1.0 \
- tcpclientsrc host=localhost port=13000 !\
- matroskademux !\
- alsasink
diff --git a/example-scripts/audio-play-cam2-mirror.sh b/example-scripts/audio-play-cam2-mirror.sh
deleted file mode 100755
index e9f2fb1..0000000
--- a/example-scripts/audio-play-cam2-mirror.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-gst-launch-1.0 \
- tcpclientsrc host=localhost port=13001 !\
- matroskademux !\
- alsasink
diff --git a/example-scripts/av-record-cam1-mirror.sh b/example-scripts/av-record-cam1-mirror.sh
deleted file mode 100755
index 5726535..0000000
--- a/example-scripts/av-record-cam1-mirror.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-gst-launch-1.0 \
- tcpclientsrc host=localhost port=13000 !\
- matroskademux name=demux \
- \
- demux. !\
- queue !\
- avenc_mpeg2video bitrate=5000000 max-key-interval=0 !\
- queue !\
- mux. \
- \
- demux. !\
- queue !\
- audioconvert !\
- avenc_mp2 bitrate=192000 !\
- queue !\
- mux. \
- \
- mpegtsmux name=mux !\
- filesink location=foo.ts
diff --git a/example-scripts/av-source-avsync-ffmpeg.sh b/example-scripts/av-source-avsync-ffmpeg.sh
deleted file mode 100755
index 3f9a06e..0000000
--- a/example-scripts/av-source-avsync-ffmpeg.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-(while true; do cat $HOME/avsync.ts || exit; done) | ffmpeg -y \
- -i - \
- -vf scale=1920x1080 \
- -c:v rawvideo \
- -c:a pcm_s16le \
- -pix_fmt uyvy422 \
- -f matroska \
- tcp://localhost:10000
diff --git a/example-scripts/av-source-background-loop.sh b/example-scripts/av-source-background-loop.sh
deleted file mode 100755
index 6a269f4..0000000
--- a/example-scripts/av-source-background-loop.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-while true; do cat ~/bg.ts || exit 1; done |\
- ffmpeg -re -i - \
- -map 0:v \
- -c:v rawvideo \
- -pix_fmt uyvy422 \
- -f matroska \
- tcp://localhost:16000
diff --git a/example-scripts/av-source-cam1.sh b/example-scripts/av-source-cam1.sh
deleted file mode 100755
index e61f336..0000000
--- a/example-scripts/av-source-cam1.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-ffmpeg -y \
- -i "$HOME/31c3-sendezentrum-1013-de-Methodisch_inkorrekt_Die_falsche_42_hd.mp4" \
- -ac 2 \
- -af aresample=48000 \
- -pix_fmt uyvy422 \
- -c:v rawvideo \
- -c:a pcm_s16le \
- -f matroska \
- tcp://localhost:10000
diff --git a/example-scripts/av-source-cam2.sh b/example-scripts/av-source-cam2.sh
deleted file mode 100755
index d7da5a8..0000000
--- a/example-scripts/av-source-cam2.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-ffmpeg -y \
- -i "$HOME/31c3-sendezentrum-1003-de-Freak_Show_FS147_That_Escalatored_Quickly_hd.mp4" \
- -ac 2 \
- -af aresample=48000 \
- -pix_fmt uyvy422 \
- -c:v rawvideo \
- -c:a pcm_s16le \
- -f matroska \
- tcp://localhost:10001
diff --git a/example-scripts/av-source-eevblog-ffmpeg.sh b/example-scripts/av-source-eevblog-ffmpeg.sh
deleted file mode 100755
index 20cbe1c..0000000
--- a/example-scripts/av-source-eevblog-ffmpeg.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-ffmpeg -y \
- -i $HOME/eevblog.mp4 \
- -c:v rawvideo \
- -c:a pcm_s16le \
- -pix_fmt uyvy422 \
- -af aresample=48000 \
- -f matroska \
- tcp://localhost:10000
diff --git a/example-scripts/av-source-eevblog.sh b/example-scripts/av-source-eevblog.sh
deleted file mode 100755
index 8a7a10f..0000000
--- a/example-scripts/av-source-eevblog.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-gst-launch-1.0 \
- filesrc location=$HOME/eevblog.mp4 !\
- decodebin name=src \
- \
- src. !\
- queue !\
- videoconvert !\
- videoscale !\
- video/x-raw,format=UYVY,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \
- mux. \
- \
- src. !\
- queue !\
- audioconvert !\
- audioresample !\
- audiorate !\
- audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\
- mux. \
- \
- matroskamux name=mux !\
- tcpclientsink host=localhost port=10000
diff --git a/example-scripts/av-stream-hd.sh b/example-scripts/av-stream-hd.sh
deleted file mode 100755
index e273a02..0000000
--- a/example-scripts/av-stream-hd.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-ffmpeg -i tcp://localhost:11000 -aspect 16:9 -threads:0 0 \
--c:v libx264 \
--filter_complex "
- yadif=mode=2, hqdn3d [deinter];
- movie=$HOME/overlay_hd.png [logo];
- [deinter] [logo] overlay=0:0 [out]
-" -map '[out]' -maxrate:v:0 3000k -bufsize:v:0 8192k -crf:0 21 -pix_fmt:0 yuv420p -profile:v:0 main -g:v:0 25 -preset:v:0 veryfast \
--ac 1 -c:a libfdk_aac -b:a 96k -ar 44100 \
--map 0:a -filter:a:0 pan=mono:c0=FL \
--ac:a:2 2 \
--y -f flv rtmp://127.0.0.1:1935/stream/voctomix
diff --git a/example-scripts/av-stream-sd.sh b/example-scripts/av-stream-sd.sh
deleted file mode 100755
index 608c643..0000000
--- a/example-scripts/av-stream-sd.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-ffmpeg -i tcp://localhost:11000 -aspect 16:9 -threads:0 0 \
--c:v libx264 \
--filter_complex "
- yadif=mode=2, hqdn3d, scale=720:576 [out]
-" -map '[out]' -maxrate:v:0 800k -bufsize:v:0 8192k -crf:0 18 -pix_fmt:0 yuv420p -profile:v:0 main -g:v:0 25 -preset:v:0 veryfast \
--ac 1 -c:a libfdk_aac -b:a 96k -ar 44100 \
--map 0:a -filter:a:0 pan=mono:c0=FL \
--ac:a:2 2 \
--y -f flv rtmp://127.0.0.1:1935/stream/s5_native_sd
diff --git a/example-scripts/benchmark.sh b/example-scripts/benchmark.sh
deleted file mode 100755
index 7b3a72b..0000000
--- a/example-scripts/benchmark.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-../voctocore.py &
-PID=$!
-echo "PID=$PID"
-sleep 1
-./set-composite-side-by-side-equal.sh >/dev/null 2>/dev/null
-./av-source-eevblog.sh >/dev/null 2>/dev/null &
-./av-source-avsync.sh >/dev/null 2>/dev/null &
-pidstat -p $PID 1 &
-sleep 10
-kill $PID
-wait
diff --git a/example-scripts/demo-cycle-modes.sh b/example-scripts/control-server/demo-cycle-modes.sh
index b626b28..b626b28 100755
--- a/example-scripts/demo-cycle-modes.sh
+++ b/example-scripts/control-server/demo-cycle-modes.sh
diff --git a/example-scripts/set-audio-cam1.sh b/example-scripts/control-server/set-audio-cam1.sh
index 19d3b8e..19d3b8e 100755
--- a/example-scripts/set-audio-cam1.sh
+++ b/example-scripts/control-server/set-audio-cam1.sh
diff --git a/example-scripts/set-audio-cam2.sh b/example-scripts/control-server/set-audio-cam2.sh
index 9177772..9177772 100755
--- a/example-scripts/set-audio-cam2.sh
+++ b/example-scripts/control-server/set-audio-cam2.sh
diff --git a/example-scripts/set-composite-fullscreen.sh b/example-scripts/control-server/set-composite-fullscreen.sh
index 850e591..850e591 100755
--- a/example-scripts/set-composite-fullscreen.sh
+++ b/example-scripts/control-server/set-composite-fullscreen.sh
diff --git a/example-scripts/set-composite-picture-in-picture.sh b/example-scripts/control-server/set-composite-picture-in-picture.sh
index eae3bea..eae3bea 100755
--- a/example-scripts/set-composite-picture-in-picture.sh
+++ b/example-scripts/control-server/set-composite-picture-in-picture.sh
diff --git a/example-scripts/set-composite-side-by-side-equal.sh b/example-scripts/control-server/set-composite-side-by-side-equal.sh
index 37e3357..37e3357 100755
--- a/example-scripts/set-composite-side-by-side-equal.sh
+++ b/example-scripts/control-server/set-composite-side-by-side-equal.sh
diff --git a/example-scripts/set-composite-side-by-side-preview.sh b/example-scripts/control-server/set-composite-side-by-side-preview.sh
index dd8a04b..dd8a04b 100755
--- a/example-scripts/set-composite-side-by-side-preview.sh
+++ b/example-scripts/control-server/set-composite-side-by-side-preview.sh
diff --git a/example-scripts/set-stream-blank-nostream.sh b/example-scripts/control-server/set-stream-blank-nostream.sh
index abdab4b..abdab4b 100755
--- a/example-scripts/set-stream-blank-nostream.sh
+++ b/example-scripts/control-server/set-stream-blank-nostream.sh
diff --git a/example-scripts/set-stream-blank-pause.sh b/example-scripts/control-server/set-stream-blank-pause.sh
index abf3580..abf3580 100755
--- a/example-scripts/set-stream-blank-pause.sh
+++ b/example-scripts/control-server/set-stream-blank-pause.sh
diff --git a/example-scripts/set-stream-live.sh b/example-scripts/control-server/set-stream-live.sh
index e2584c8..e2584c8 100755
--- a/example-scripts/set-stream-live.sh
+++ b/example-scripts/control-server/set-stream-live.sh
diff --git a/example-scripts/set-video-cam1.sh b/example-scripts/control-server/set-video-cam1.sh
index d02b385..d02b385 100755
--- a/example-scripts/set-video-cam1.sh
+++ b/example-scripts/control-server/set-video-cam1.sh
diff --git a/example-scripts/set-video-cam2.sh b/example-scripts/control-server/set-video-cam2.sh
index c953ade..c953ade 100755
--- a/example-scripts/set-video-cam2.sh
+++ b/example-scripts/control-server/set-video-cam2.sh
diff --git a/example-scripts/set-video-grabber.sh b/example-scripts/control-server/set-video-grabber.sh
index ee39c3b..ee39c3b 100755
--- a/example-scripts/set-video-grabber.sh
+++ b/example-scripts/control-server/set-video-grabber.sh
diff --git a/example-scripts/demo-cube-files.sh b/example-scripts/demo-cube-files.sh
deleted file mode 100755
index 978c91e..0000000
--- a/example-scripts/demo-cube-files.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-../voctocore.py -vv &
-PID=$!
-echo "PID=$PID"
-sleep 1
-./av-source-cam1.sh &
-./av-source-cam2.sh &
-./av-source-background-loop.py &
-./av-record-output-ffmpeg-timestamps.sh &
-./av-stream-hd.sh &
-./demo-cycle-modes.sh &
-while true; do sleep 1; done
-kill $PID
-wait
diff --git a/example-scripts/demo-cube.sh b/example-scripts/demo-cube.sh
deleted file mode 100755
index 587f533..0000000
--- a/example-scripts/demo-cube.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-../voctocore.py -vv &
-PID=$!
-echo "PID=$PID"
-sleep 1
-./av-source-bmd-cam1.sh &
-./av-source-bmd-cam2.sh &
-./av-source-background-loop.py &
-./av-record-output-ffmpeg-timestamps.sh &
-./av-stream-hd.sh &
-./demo-cycle-modes.sh &
-while true; do sleep 1; done
-kill $PID
-wait
diff --git a/example-scripts/demo-local.sh b/example-scripts/demo-local.sh
deleted file mode 100755
index 440c979..0000000
--- a/example-scripts/demo-local.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-../voctocore/voctocore.py -vv &
-PID=$!
-echo "PID=$PID"
-sleep 1
-./av-source-cam1.sh &
-./av-source-cam2.sh &
-./av-source-background-loop.sh &
-./av-record-output-ffmpeg.sh &
-#./av-stream-hd.sh &
-./demo-cycle-modes.sh &
-ffplay tcp://localhost:11000
-kill $PID
-wait
diff --git a/example-scripts/av-play-output-ffplay.sh b/example-scripts/ffmpeg/play-mixed-ffplay.sh
index 733c279..733c279 100755
--- a/example-scripts/av-play-output-ffplay.sh
+++ b/example-scripts/ffmpeg/play-mixed-ffplay.sh
diff --git a/example-scripts/av-record-output-ffmpeg-timestamps.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh
index 86bd1d1..86bd1d1 100755
--- a/example-scripts/av-record-output-ffmpeg-timestamps.sh
+++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh
diff --git a/example-scripts/av-record-output-ffmpeg.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh
index 0ea3d25..0ea3d25 100755
--- a/example-scripts/av-record-output-ffmpeg.sh
+++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh
diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh
new file mode 100755
index 0000000..fb3a03a
--- /dev/null
+++ b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+ffmpeg \
+ -i tcp://localhost: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 \
+ -flags +global_header -flags +ilme+ildct \
+ -f mpegts output.ts
diff --git a/example-scripts/av-source-avsync-ffmpeg-noloop.sh b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
index 61aed59..6fceff1 100755
--- a/example-scripts/av-source-avsync-ffmpeg-noloop.sh
+++ b/example-scripts/ffmpeg/source-avsync-test-clip-as-cam1.sh
@@ -1,6 +1,6 @@
#!/bin/sh
ffmpeg -y \
- -i $HOME/avsync.ts \
+ -i http://c3voc.mazdermind.de/testfiles/avsync.ts \
-vf scale=1920x1080 \
-c:v rawvideo \
-c:a pcm_s16le \
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
new file mode 100755
index 0000000..327b398
--- /dev/null
+++ b/example-scripts/ffmpeg/source-avsync-test-clip-looped-as-cam1.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+wget -nc -O /tmp/avsync.ts http://c3voc.mazdermind.de/testfiles/avsync.ts
+(while true; do cat /tmp/avsync.ts || exit; done) | ffmpeg -y \
+ -i - \
+ -vf scale=1920x1080 \
+ -c:v rawvideo \
+ -c:a pcm_s16le \
+ -pix_fmt uyvy422 \
+ -f matroska \
+ tcp://localhost:10000
diff --git a/example-scripts/ffmpeg/source-background-loop.sh b/example-scripts/ffmpeg/source-background-loop.sh
new file mode 100755
index 0000000..e18617f
--- /dev/null
+++ b/example-scripts/ffmpeg/source-background-loop.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+wget -nc -O /tmp/bg.ts http://c3voc.mazdermind.de/testfiles/bg.ts
+while true; do cat /tmp/bg.ts || exit 1; done |\
+ ffmpeg -re -i - \
+ -map 0:v \
+ -c:v rawvideo \
+ -pix_fmt uyvy422 \
+ -f matroska \
+ tcp://localhost:16000
diff --git a/example-scripts/av-source-bmd-cam1.sh b/example-scripts/ffmpeg/source-decklink-cam1.sh
index 542b2f7..f6e5f8e 100755
--- a/example-scripts/av-source-bmd-cam1.sh
+++ b/example-scripts/ffmpeg/source-decklink-cam1.sh
@@ -3,6 +3,5 @@ ffmpeg -y \
-f decklink \
-i 'DeckLink Mini Recorder (1)@10' \
-c:v rawvideo -c:a pcm_s16le \
- -pix_fmt uyvy422 \
-f matroska \
tcp://localhost:10000
diff --git a/example-scripts/av-source-bmd-cam2.sh b/example-scripts/ffmpeg/source-decklink-cam2.sh
index ee5e0e4..86137b8 100755
--- a/example-scripts/av-source-bmd-cam2.sh
+++ b/example-scripts/ffmpeg/source-decklink-cam2.sh
@@ -3,6 +3,5 @@ ffmpeg -y \
-f decklink \
-i 'DeckLink Mini Recorder (2)@10' \
-c:v rawvideo -c:a pcm_s16le \
- -pix_fmt uyvy422 \
-f matroska \
tcp://localhost:10001
diff --git a/example-scripts/av-source-grabber.sh b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
index 038a870..502644c 100755
--- a/example-scripts/av-source-grabber.sh
+++ b/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
@@ -1,7 +1,10 @@
#!/bin/sh
ffmpeg -y \
-i "http://10.73.5.2:1881/stream.mjpg" \
- -filter_complex " [0:v] scale=1920:1080,fps=25 [v] ; anullsrc=r=48000:cl=stereo [a] " \
+ -filter_complex "
+ [0:v] scale=1920:1080,fps=25 [v] ;
+ anullsrc=r=48000:cl=stereo [a]
+ " \
-map "[v]" \
-map "[a]" \
-c:a pcm_s16le \
diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam1.sh b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
new file mode 100755
index 0000000..7f88bb7
--- /dev/null
+++ b/example-scripts/ffmpeg/source-testvideo-as-cam1.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+ffmpeg -y \
+ -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 \
+ -af aresample=48000 \
+ -pix_fmt uyvy422 \
+ -c:v rawvideo \
+ -c:a pcm_s16le \
+ -f matroska \
+ tcp://localhost:10000
diff --git a/example-scripts/ffmpeg/source-testvideo-as-cam2.sh b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
new file mode 100755
index 0000000..b9adc82
--- /dev/null
+++ b/example-scripts/ffmpeg/source-testvideo-as-cam2.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+ffmpeg -y \
+ -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 \
+ -af aresample=48000 \
+ -pix_fmt uyvy422 \
+ -c:v rawvideo \
+ -c:a pcm_s16le \
+ -f matroska \
+ tcp://localhost:10001
diff --git a/example-scripts/ffmpeg/stream-hd.sh b/example-scripts/ffmpeg/stream-hd.sh
new file mode 100755
index 0000000..6e449f0
--- /dev/null
+++ b/example-scripts/ffmpeg/stream-hd.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+wget -nc -O /tmp/overlay_hd.png http://c3voc.mazdermind.de/testfiles/overlay_hd.png
+ffmpeg -y \
+ -i tcp://localhost:11000 \
+ -threads:0 0 \
+ -aspect 16:9 \
+ -c:v libx264 \
+ -filter_complex '
+ [0:v] yadif=mode=2, hqdn3d [deinter];
+ movie=/tmp/overlay_hd.png [logo];
+ [deinter] [logo] overlay=0:0 [out]
+ ' \
+ -map '[out]' \
+ -maxrate:v:0 3000k -bufsize:v:0 8192k -crf:0 21 \
+ -pix_fmt:0 yuv420p -profile:v:0 main -g:v:0 25 \
+ -preset:v:0 veryfast \
+ \
+ -ac 1 -c:a libfdk_aac -b:a 96k -ar 44100 \
+ -map 0:a -filter:a:0 pan=mono:c0=FL \
+ -ac:a:2 2 \
+ \
+ -y -f flv rtmp://127.0.0.1:1935/stream/voctomix_hd
diff --git a/example-scripts/ffmpeg/stream-sd.sh b/example-scripts/ffmpeg/stream-sd.sh
new file mode 100755
index 0000000..e5a0106
--- /dev/null
+++ b/example-scripts/ffmpeg/stream-sd.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+wget -nc -O /tmp/overlay_hd.png http://c3voc.mazdermind.de/testfiles/overlay_hd.png
+ffmpeg -y \
+ -i tcp://localhost:11000 \
+ -threads:0 0 \
+ -aspect 16:9 \
+ -c:v libx264 \
+ -filter_complex '
+ [0:v] yadif=mode=2, hqdn3d, scale=720:576 [deinter];
+ movie=/tmp/overlay_hd.png [logo];
+ [deinter] [logo] overlay=0:0 [out]
+ ' \
+ -map '[out]' \
+ -maxrate:v:0 800k -bufsize:v:0 8192k -crf:0 18 \
+ -pix_fmt:0 yuv420p -profile:v:0 main -g:v:0 25 \
+ -preset:v:0 veryfast \
+ \
+ -ac 1 -c:a libfdk_aac -b:a 96k -ar 44100 \
+ -map 0:a -filter:a:0 pan=mono:c0=FL \
+ -ac:a:2 2 \
+ \
+ -y -f flv rtmp://127.0.0.1:1935/stream/voctomix_hd
diff --git a/example-scripts/av-play-cam1-mirror.sh b/example-scripts/gstreamer/play-cam1-av.sh
index 0ec1f2b..ab237ec 100755
--- a/example-scripts/av-play-cam1-mirror.sh
+++ b/example-scripts/gstreamer/play-cam1-av.sh
@@ -4,9 +4,10 @@ gst-launch-1.0 \
matroskademux name=demux \
\
demux. !\
- queue !\
- xvimagesink ts-offset=300000000 \
+ queue !\
+ glupload !\
+ glimagesink ts-offset=500000000 \
\
demux. !\
- queue !\
- alsasink provide-clock=false ts-offset=300000000
+ queue !\
+ alsasink provide-clock=false ts-offset=500000000
diff --git a/example-scripts/video-play-mixer-output.sh b/example-scripts/gstreamer/play-mixed-audio.sh
index abb3174..a1dfa1f 100755
--- a/example-scripts/video-play-mixer-output.sh
+++ b/example-scripts/gstreamer/play-mixed-audio.sh
@@ -2,4 +2,4 @@
gst-launch-1.0 \
tcpclientsrc host=localhost port=11000 !\
matroskademux !\
- xvimagesink
+ alsasink ts-offset=500000000
diff --git a/example-scripts/gstreamer/play-mixed-av.sh b/example-scripts/gstreamer/play-mixed-av.sh
new file mode 100755
index 0000000..7437f43
--- /dev/null
+++ b/example-scripts/gstreamer/play-mixed-av.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+gst-launch-1.0 \
+ tcpclientsrc host=localhost port=11000 !\
+ matroskademux name=demux \
+ \
+ demux. !\
+ queue !\
+ glupload !\
+ glimagesink ts-offset=500000000 \
+ \
+ demux. !\
+ queue !\
+ alsasink provide-clock=false ts-offset=500000000
diff --git a/example-scripts/gstreamer/play-mixed-video.sh b/example-scripts/gstreamer/play-mixed-video.sh
new file mode 100755
index 0000000..49cc6f7
--- /dev/null
+++ b/example-scripts/gstreamer/play-mixed-video.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+gst-launch-1.0 \
+ tcpclientsrc host=localhost port=11000 !\
+ matroskademux !\
+ glupload !\
+ glimagesink ts-offset=500000000
diff --git a/example-scripts/gstreamer/play-mixer-video.sh b/example-scripts/gstreamer/play-mixer-video.sh
new file mode 100644
index 0000000..49cc6f7
--- /dev/null
+++ b/example-scripts/gstreamer/play-mixer-video.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+gst-launch-1.0 \
+ tcpclientsrc host=localhost port=11000 !\
+ matroskademux !\
+ glupload !\
+ glimagesink ts-offset=500000000
diff --git a/example-scripts/av-record-output.sh b/example-scripts/gstreamer/record-mixed-av.sh
index ef306ed..b8818c6 100755
--- a/example-scripts/av-record-output.sh
+++ b/example-scripts/gstreamer/record-mixed-av.sh
@@ -5,6 +5,7 @@ gst-launch-1.0 \
\
demux. !\
queue !\
+ videoconvert !\
avenc_mpeg2video bitrate=5000000 max-key-interval=0 !\
queue !\
mux. \
diff --git a/example-scripts/av-source-avsync.sh b/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh
index 1e8d1eb..ca7fc27 100755
--- a/example-scripts/av-source-avsync.sh
+++ b/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh
@@ -1,14 +1,14 @@
#!/bin/sh
gst-launch-1.0 \
uridecodebin \
- uri=http://c3voc.mazdermind.de/avsync.mp4 \
+ uri=http://c3voc.mazdermind.de/testfiles/avsync.mp4 \
name=src \
\
src. !\
queue !\
videoconvert !\
videoscale !\
- video/x-raw,format=UYVY,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \
+ video/x-raw,format=UYVY,width=1920,height=1080,framerate=25/1,pixel-aspect-ratio=1/1 ! \
mux. \
\
src. !\
@@ -20,4 +20,4 @@ gst-launch-1.0 \
mux. \
\
matroskamux name=mux !\
- tcpclientsink host=localhost port=10001
+ tcpclientsink host=localhost port=10000
diff --git a/example-scripts/av-source-background-loop.py b/example-scripts/gstreamer/source-background-loop.py
index 9f4dc6d..be59d18 100755
--- a/example-scripts/av-source-background-loop.py
+++ b/example-scripts/gstreamer/source-background-loop.py
@@ -10,9 +10,12 @@ Gst.init([])
class LoopSource(object):
def __init__(self):
+ # it works much better with a local file
pipeline = """
- uridecodebin name=src uri=http://c3voc.mazdermind.de/bg.ts !
- video/x-raw,format=I420,width=1920,height=1080,framerate=25/1,pixel-aspect-ratio=1/1 !
+ uridecodebin name=src uri=http://c3voc.mazdermind.de/testfiles/bg.ts !
+ videoscale !
+ videoconvert !
+ video/x-raw,format=UYVY,width=1920,height=1080,framerate=25/1,pixel-aspect-ratio=1/1 !
matroskamux !
tcpclientsink host=localhost port=16000
"""
diff --git a/example-scripts/av-source-background.sh b/example-scripts/gstreamer/source-test-background.sh
index 94dc978..94dc978 100755
--- a/example-scripts/av-source-background.sh
+++ b/example-scripts/gstreamer/source-test-background.sh
diff --git a/example-scripts/audio-visualize-cam1-mirror.sh b/example-scripts/gstreamer/visualize-mixed-audio.sh
index 70772c4..ce9bc0a 100755
--- a/example-scripts/audio-visualize-cam1-mirror.sh
+++ b/example-scripts/gstreamer/visualize-mixed-audio.sh
@@ -5,5 +5,5 @@ gst-launch-1.0 \
audioconvert !\
wavescope shader=none style=lines !\
video/x-raw,width=800,height=300 !\
- videoconvert !\
- xvimagesink
+ glupload !\
+ glimagesink
diff --git a/example-scripts/misc/benchmark.sh b/example-scripts/misc/benchmark.sh
new file mode 100755
index 0000000..70b8cfa
--- /dev/null
+++ b/example-scripts/misc/benchmark.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+../../voctocore/voctocore.py &
+PID=$!
+echo "PID=$PID"
+sleep 1
+../control-server/set-composite-side-by-side-equal.sh >/dev/null 2>/dev/null
+../ffmpeg/source-testvideo-as-cam1.sh >/dev/null 2>/dev/null &
+../ffmpeg/source-testvideo-as-cam2.sh >/dev/null 2>/dev/null &
+pidstat -p $PID 1 &
+sleep 10
+kill $PID
+wait
diff --git a/example-scripts/misc/demo-local.sh b/example-scripts/misc/demo-local.sh
new file mode 100755
index 0000000..bb57e45
--- /dev/null
+++ b/example-scripts/misc/demo-local.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+../../voctocore/voctocore.py &
+PID=$!
+echo "PID=$PID"
+sleep 1
+../ffmpeg/source-testvideo-as-cam1.sh >/dev/null 2>/dev/null &
+../ffmpeg/source-testvideo-as-cam2.sh >/dev/null 2>/dev/null &
+../ffmpeg/source-background-loop.sh &
+../ffmpeg/av-record-output-ffmpeg.sh &
+#../ffmpeg/stream-hd.sh &
+../control-server/demo-cycle-modes.sh &
+ffplay tcp://localhost:11000
+kill $PID
+wait
diff --git a/example-scripts/misc/perf.sh b/example-scripts/misc/perf.sh
new file mode 100755
index 0000000..e347151
--- /dev/null
+++ b/example-scripts/misc/perf.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+../../voctocore/voctocore.py &
+PID=$!
+echo "PID=$PID"
+sleep 1
+../control-server/set-composite-side-by-side-equal.sh >/dev/null 2>/dev/null
+../ffmpeg/source-testvideo-as-cam1.sh >/dev/null 2>/dev/null &
+../ffmpeg/source-testvideo-as-cam2.sh >/dev/null 2>/dev/null &
+sudo perf top -g -p $PID
+kill $PID
+wait
diff --git a/example-scripts/perf.sh b/example-scripts/perf.sh
deleted file mode 100755
index 035ec05..0000000
--- a/example-scripts/perf.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-../voctocore.py &
-PID=$!
-echo "PID=$PID"
-sleep 1
-./set-composite-side-by-side-equal.sh >/dev/null 2>/dev/null
-./av-source-eevblog.sh >/dev/null 2>/dev/null &
-./av-source-avsync.sh >/dev/null 2>/dev/null &
-sudo perf top -g -p $PID
-kill $PID
-wait
diff --git a/example-scripts/video-play-cam1-mirror.sh b/example-scripts/video-play-cam1-mirror.sh
deleted file mode 100755
index ec3605b..0000000
--- a/example-scripts/video-play-cam1-mirror.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-gst-launch-1.0 \
- tcpclientsrc host=localhost port=13000 !\
- matroskademux !\
- xvimagesink
diff --git a/example-scripts/video-play-cam2-mirror.sh b/example-scripts/video-play-cam2-mirror.sh
deleted file mode 100755
index e42ca6a..0000000
--- a/example-scripts/video-play-cam2-mirror.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-gst-launch-1.0 \
- tcpclientsrc host=localhost port=13001 !\
- matroskademux !\
- xvimagesink