From 02a2ed296bbf25563f2649a8de1ecadc31106247 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 1 Mar 2017 21:26:49 +0100 Subject: Add variable AUDIOCHANNELS. --- example-scripts/default-config.sh | 1 + example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh | 4 ++-- example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh | 4 ++-- example-scripts/ffmpeg/record-mixed-ffmpeg.sh | 4 ++-- example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh | 2 +- example-scripts/gstreamer/source-videotestsrc-as-cam1.sh | 2 +- example-scripts/gstreamer/source-videotestsrc-as-cam2.sh | 2 +- example-scripts/gstreamer/source-videotestsrc-as-cam3.sh | 2 +- example-scripts/gstreamer/source-videotestsrc-as-cam4.sh | 2 +- example-scripts/gstreamer/source-videotestsrc-as-grabber.sh | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) (limited to 'example-scripts') diff --git a/example-scripts/default-config.sh b/example-scripts/default-config.sh index 5dc652d..6e88d1c 100644 --- a/example-scripts/default-config.sh +++ b/example-scripts/default-config.sh @@ -2,5 +2,6 @@ WIDTH=320 HEIGHT=176 FRAMERATE=25 +AUDIOCHANNELS=1 AUDIORATE=48000 MIXHOST=voctobox.local diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh index f8b1a7b..63bec43 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented-timestamps.sh @@ -13,8 +13,8 @@ fi ffmpeg \ -y -nostdin \ -i tcp://$MIXHOST:11000 \ - -ac 2 -channel_layout 2 -aspect 16:9 \ + -ac $AUDIOCHANNELS -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 \ + -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 $AUDIOCHANNELS -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ -f segment -segment_time 180 -segment_format mpegts segment-%t-%05d.ts diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh index 4167e92..eaa2f2c 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg-segmented.sh @@ -9,8 +9,8 @@ fi ffmpeg \ -y -nostdin \ -i tcp://$MIXHOST:11000 \ - -ac 2 -channel_layout 2 -aspect 16:9 \ + -ac $AUDIOCHANNELS -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 \ + -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 $AUDIOCHANNELS -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ -f segment -segment_time 180 -segment_format mpegts segment-%d.ts diff --git a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh index 81df928..dc60c55 100755 --- a/example-scripts/ffmpeg/record-mixed-ffmpeg.sh +++ b/example-scripts/ffmpeg/record-mixed-ffmpeg.sh @@ -9,8 +9,8 @@ fi ffmpeg \ -y -nostdin \ -i tcp://$MIXHOST:11000 \ - -ac 2 -channel_layout 2 -aspect 16:9 \ + -ac $AUDIOCHANNELS -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 \ + -map 0:a -c:a:0 mp2 -b:a:0 192k -ac:a:0 $AUDIOCHANNELS -ar:a:0 48000 \ -flags +global_header -flags +ilme+ildct \ -f mpegts output.ts 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 bc2172b..3ec9596 100755 --- a/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh +++ b/example-scripts/gstreamer/source-avsync-test-clip-as-cam1.sh @@ -23,7 +23,7 @@ gst-launch-1.0 \ audioconvert !\ audioresample !\ audiorate !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !\ + audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE !\ mux. \ \ matroskamux name=mux !\ diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh b/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh index e79ee91..4353285 100755 --- a/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh +++ b/example-scripts/gstreamer/source-videotestsrc-as-cam1.sh @@ -12,7 +12,7 @@ gst-launch-1.0 \ mux. \ \ audiotestsrc freq=440 !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !\ + audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE !\ mux. \ \ matroskamux name=mux !\ diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh b/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh index 8380680..3ce006a 100755 --- a/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh +++ b/example-scripts/gstreamer/source-videotestsrc-as-cam2.sh @@ -12,7 +12,7 @@ gst-launch-1.0 \ mux. \ \ audiotestsrc freq=550 !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !\ + audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE !\ mux. \ \ matroskamux name=mux !\ diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam3.sh b/example-scripts/gstreamer/source-videotestsrc-as-cam3.sh index 85787b2..b07d28e 100755 --- a/example-scripts/gstreamer/source-videotestsrc-as-cam3.sh +++ b/example-scripts/gstreamer/source-videotestsrc-as-cam3.sh @@ -12,7 +12,7 @@ gst-launch-1.0 \ mux. \ \ audiotestsrc freq=660 !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !\ + audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE !\ mux. \ \ matroskamux name=mux !\ diff --git a/example-scripts/gstreamer/source-videotestsrc-as-cam4.sh b/example-scripts/gstreamer/source-videotestsrc-as-cam4.sh index 6bee2f3..8846a5b 100755 --- a/example-scripts/gstreamer/source-videotestsrc-as-cam4.sh +++ b/example-scripts/gstreamer/source-videotestsrc-as-cam4.sh @@ -12,7 +12,7 @@ gst-launch-1.0 \ mux. \ \ audiotestsrc freq=770 !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !\ + audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE !\ mux. \ \ matroskamux name=mux !\ diff --git a/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh b/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh index e921a89..09f33e8 100755 --- a/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh +++ b/example-scripts/gstreamer/source-videotestsrc-as-grabber.sh @@ -12,7 +12,7 @@ gst-launch-1.0 \ mux. \ \ audiotestsrc !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !\ + audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE !\ mux. \ \ matroskamux name=mux !\ -- cgit v1.2.3