#!/bin/bash
APP=$1
NAME=$2
#RTP=$( cat "/home/amalie/analiestar.com/rtc/instreamer/instream_""$NAME""_""$APP"".txt" )
#echo "RTP"
#echo "$RTP"
#chmod +x "/home/amalie/analiestar.com/rtc/instreamer/instream_""$NAME""_""$APP"".sh"
# final version of latest GENSH prepared execute
/home/amalie/analiestar.com/rtc/instreamer/instream_""$NAME""_""$APP"".sh
#ffmpeg -re -i rtmp://localhost/$APP/$NAME -map 0:v:0 -pix_fmt yuv420p -c:v libx264 -preset veryfast -b:v 5000k -g 60 -bufsize 10000k -maxrate 6000k -map 0:a:0 -c:a libopus -b:a 128k -ac 2 -ar 48000 -f tee "$RTP"
#ffmpeg -re -i rtmp://localhost/$APP/$NAME -map 0:v:0 -pix_fmt yuv420p -c:v libvpx -b:v 5000k -g 60 -bufsize 10000k -maxrate 6000k -map 0:a:0 -c:a libopus -b:a 128k -ac 2 -ar 48000 -f tee "$RTP"
#ffmpeg -i rtmp://localhost/$APP/$NAME -map 0:v:0 -pix_fmt yuv420p -c:v libx264 -profile:v high -level:v 4.0 -preset veryfast -b:v 5000k -g 60 -bufsize 10000k -maxrate 6000k -map 0:a:0 -c:a libopus -b:a 128k -ac 2 -ar 48000 -deadline realtime -f tee "$RTP"
# -re -fflags +igndts
#ffmpeg \
# -re \
# -i rtmp://localhost/$APP/$NAME \
# -map 0:a:0 \
# -c:a copy \
# -map 0:v:0 \
# -c:v copy \
# -f tee "$RTP"
#-analyzeduration 100M -probesize 100M \
#ffmpeg \
# -fflags +igndts \
# -i rtmp://localhost/$APP/$NAME \
# -map 0:a:0 \
# -c:a libopus -ab 196k -ac 2 -ar 48000 \
# -map 0:v:0 \
# -c:v libx264 -b:v 5000k -bufsize 10000k -maxrate 6000k \
# -r 24 -g 60 -tune zerolatency -preset veryfast -threads 0 \
# -profile:v baseline \
# -f tee "$RTP"
#v4l2src ! videoconvert ! ffenc_h263 ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
#gst-launch-1.0 rtpbin name=rtpbin \
# rtmpsrc location=rtmp://analiestar.com/p_12345678/amalie ! h264parse \
# rtpbin.send_rtp_src_0 ! udpsink port=5000 \
# rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
# udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
# audiotestsrc ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \
# rtpbin.send_rtp_src_1 ! udpsink port=5002 \
# rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
# udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
#caps="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS"
#! videorate ! video/x-raw,framerate=24/1 \
#gst-launch-1.0 -v -e --gst-debug-level=2 \
#-----
#gst-launch-1.0 -v \
# rtpbin name=rtpbin rtp-profile=avp \
# $RTP
#rtmpsrc location=rtmp://analiestar.com/p_12345678/amalie ! tee name=t \
#t. ! queue \
#! decodebin \
#! opusenc bandwidth=superwideband bitrate-type=vbr \
#! rtpopuspay ssrc=11111111 pt=100 \
#! rtprtxqueue \
#! rtpbin.send_rtp_sink_0 \
#t. ! queue \
#! decodebin \
#! x264enc tune=zerolatency speed-preset=1 dct8x8=true quantizer=23 pass=qual \
#! rtph264pay ssrc=22222222 pt=103 \
#! rtprtxqueue max-size-time=2000 max-size-packets=0 \
#! rtpbin.send_rtp_sink_1 \
#rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=43702 sync=true async=false \
#rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=48013 sync=false async=false \
#rtpbin.send_rtp_src_1 ! udpsink host=127.0.0.1 port=43657 sync=true async=false \
#rtpbin.send_rtcp_src_1 ! udpsink host=127.0.0.1 port=44467 sync=false async=false
#-----
#! queue \
#-copytb 1 \
#-use_wallclock_as_timestamps 1 \
#-c:v libx264 -pix_fmt yuv420p -tune zerolatency -r 24 \
#-pix_fmt yuv420p -c:v libx264 -b:v 5000k -profile:v baseline -tune zerolatency \
Top