From 7a3a28bb6195f8309f87a588320ae109b1b0412c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 8 Mar 2017 01:08:49 +0100 Subject: Use RAW by default. --- bin/recv-gst-rtp-v-a | 14 +++++++------- bin/send-gst-rtp-v-a | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/recv-gst-rtp-v-a b/bin/recv-gst-rtp-v-a index 3b48d17..d105afe 100755 --- a/bin/recv-gst-rtp-v-a +++ b/bin/recv-gst-rtp-v-a @@ -6,8 +6,8 @@ set -e CAMIP=${CAMIP:-$1} # origin host - default: use multicast group VCOUNT=${VCOUNT:-$2} # number of video stream(s) to display - default: 1 ACOUNT=${ACOUNT:-$3} # number of audio stream(s) to play - default: 0 -VFORMAT=${VFORMAT:-$4} # H264 VP8 RAW - default: H264 -AFORMAT=${AFORMAT:-$5} # AMR OPUS RAW - default: AMR +VFORMAT=${VFORMAT:-$4} # H264 VP8 RAW - default: RAW +AFORMAT=${AFORMAT:-$5} # AMR OPUS RAW - default: RAW set -u # set multicast groups (also for recorder host) if camera host is wildcard @@ -17,7 +17,7 @@ RECHOST="${RECMIP:+address=$RECMIP auto-multicast=true}" CAMHOST="${CAMIP:+host=$CAMIP}${CAMMIP:+host=$CAMMIP auto-multicast=true}" case "$VFORMAT" in - H264|'') + H264) VCAPS=application/x-rtp,media=video,clock-rate=90000,payload=96,encoding-name=H264 VDEC="rtph264depay ! avdec_h264" ;; @@ -25,14 +25,14 @@ case "$VFORMAT" in VCAPS=application/x-rtp,media=video,clock-rate=90000,payload=96,encoding-name=VP8 VDEC="rtpvp8depay ! vp8dec" ;; - RAW) - VCAPS=application/x-rtp,media=video,clock-rate=90000,encoding-name=RAW,sampling=YCbCr-4:2:0,depth="(string)8",width="(string)432",height="(string)240",payload=96 + RAW|'') + VCAPS=application/x-rtp,media=video,clock-rate=90000,encoding-name=RAW,sampling=YCbCr-4:2:0,depth="(string)8",width="(string)432",height="(string)240",payload=96,a-framerate=30 VDEC="rtpvrawdepay ! videoconvert ! queue" ;; esac case "$AFORMAT" in - AMR|'') + AMR) ACAPS=application/x-rtp,media=audio,clock-rate=8000,encoding-name=AMR,encoding-params="(string)1",octet-align="(string)1",payload=96 ADEC="rtpamrdepay ! amrnbdec" ;; @@ -40,7 +40,7 @@ case "$AFORMAT" in ACAPS=audio/x-raw,rate=48000,channels=1,format=S16LE,layout=interleaved ADEC="rtpopusdepay ! opusdec" ;; - RAW) + RAW|'') ACAPS=application/x-rtp,media=audio,clock-rate=44100,encoding-name=L16,encoding-params=1,channels=1,payload=96 ADEC="rtpL16depay" ;; diff --git a/bin/send-gst-rtp-v-a b/bin/send-gst-rtp-v-a index 0589963..88b02e0 100755 --- a/bin/send-gst-rtp-v-a +++ b/bin/send-gst-rtp-v-a @@ -7,8 +7,8 @@ RECIP=${RECIP:-$1} # destination host - default: use multicast group VDEVICES=${1:-$(find /dev -maxdepth 1 -type c -name 'video*' | sort)} #ADEVICES=${2:-$(arecord -L | grep -Po '^hw:\S+')} #ADEVICES=${2:-$(arecord -L | grep -Pom1 '^hw:\S+')} -VFORMAT=${VFORMAT:-$3} # H264 VP8 RAW - default: H264 -AFORMAT=${AFORMAT:-$4} # AMR OPUS RAW - default: AMR +VFORMAT=${VFORMAT:-$3} # H264 VP8 RAW - default: RAW +AFORMAT=${AFORMAT:-$4} # AMR OPUS RAW - default: RAW set -u # set multicast groups (also for recorder host) if camera host is wildcard @@ -25,26 +25,26 @@ VCAPS=video/x-raw,height="$HEIGHT" ACAPS=audio/x-raw,rate="$AUDIORATE",channels=2,depth=16 case "$VFORMAT" in - H264|'') + H264) # * let x264 use low-latency sliced-threads (i.e. don't disable treads) VENC="x264enc speed-preset=ultrafast tune=zerolatency bitrate=800 byte-stream=true key-int-max=15 intra-refresh=true option-string=\"slice-max-size=8192:vbv-maxrate=80:vbv-bufsize=10\" ! video/x-h264,profile=baseline ! rtph264pay" ;; VP8) VENC="vp8enc min_quantizer=10 max_quantizer=10 cpu-used=10 deadline=1000000 ! video/x-vp8 ! rtpvp8pay" ;; - RAW) + RAW|'') VENC="rtpvrawpay" ;; esac case "$AFORMAT" in - AMR|'') + AMR) AENC="amrnbenc ! rtpamrpay" ;; OPUS) AENC="opusenc ! rtpopuspay" ;; - RAW) + RAW|'') AENC="rtpL16pay" ;; esac -- cgit v1.2.3