|
|
@@ -1,7 +1,7 @@
|
|
|
#!/bin/bash
|
|
|
|
|
|
vbitrate=800
|
|
|
-abitrate=48000
|
|
|
+abitrate=64000
|
|
|
|
|
|
feed_id=1
|
|
|
audio_feed_id=1
|
|
|
@@ -37,25 +37,18 @@ VIDEOCONVERT="videoconvert"
|
|
|
afid="format=(string)S16LE, "
|
|
|
|
|
|
ENCAUDIOFORMAT='aacparse ! audio/mpeg,mpegversion=4,stream-format=raw'
|
|
|
-videoencoder="x264enc bitrate=$vbitrate key-int-max=$keyint bframes=$h264_bframes byte-stream=false aud=true" #speed-preset=1"
|
|
|
-videoencoder="x264enc bitrate=$vbitrate key-int-max=$keyint bframes=$h264_bframes byte-stream=false aud=true speed-preset=4"
|
|
|
-videoencoder="x264enc bitrate=$vbitrate key-int-max=$keyint bframes=$h264_bframes byte-stream=false aud=true speed-preset=4"
|
|
|
+videoencoder="x264enc bitrate=$vbitrate key-int-max=$keyint bframes=$h264_bframes byte-stream=false aud=true speed-preset=5"
|
|
|
#default=6=medium, 5=fast, 4=faster...0=none
|
|
|
|
|
|
-audioencoder="voaacenc bitrate=$abitrate" #FIXME I changed faac to voaacenc as faac is not on my machine
|
|
|
audioencoder="faac bitrate=$abitrate"
|
|
|
|
|
|
-serverurl='rtmp://curso.especificosba.com.ar/src/movie'
|
|
|
-serverurl='rtmp://localhost/rpi/movie'
|
|
|
serverurl='rtmp://localhost/rpi2/movie'
|
|
|
|
|
|
location=$serverurl
|
|
|
framerate="$framerate/1" #Fraction
|
|
|
|
|
|
-ENCVIDEOFORMAT='h264parse ! video/x-h264,level=(string)'$h264_level',profile='$h264_profile
|
|
|
ENCVIDEOFORMAT="h264parse ! video/x-h264,level=(string)$h264_level,profile=$h264_profile"
|
|
|
|
|
|
-
|
|
|
VIDEO='video/x-raw, format=(string)BGRA, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive'
|
|
|
VIDEOFORMAT=$VIDEO', framerate='$framerate', width='$width', height='$height
|
|
|
|
|
|
@@ -68,6 +61,25 @@ ctrsocket=/tmp/mixer1
|
|
|
audiosink=1
|
|
|
VIDEOSRC='shmsrc socket-path='$ctrsocket' do-timestamp=true is-live=true'
|
|
|
AUDIOSRC="fdsrc fd=0 do-timestamp=true"
|
|
|
+#AUDIOSRC="audiotestsrc is-live=true"
|
|
|
+
|
|
|
+echo gst-launch-1.0 -e \
|
|
|
+ $VIDEOSRC !\
|
|
|
+ $VIDEOFORMAT !\
|
|
|
+ queue !\
|
|
|
+ $VIDEOCONVERT !\
|
|
|
+ $videoencoder !\
|
|
|
+ $ENCVIDEOFORMAT !\
|
|
|
+ queue !\
|
|
|
+ mux. $AUDIOSRC !\
|
|
|
+ $AUDIOFORMAT !\
|
|
|
+ queue !\
|
|
|
+ $audioencoder !\
|
|
|
+ $ENCAUDIOFORMAT !\
|
|
|
+ queue !\
|
|
|
+ flvmux streamable=true name=mux !\
|
|
|
+ queue !\
|
|
|
+ rtmpsink location="$location"
|
|
|
|
|
|
|
|
|
( echo "audio sink ctr isaudio $audiosink" ) | \
|
|
|
@@ -91,4 +103,3 @@ AUDIOSRC="fdsrc fd=0 do-timestamp=true"
|
|
|
queue !\
|
|
|
rtmpsink location="$location"
|
|
|
)
|
|
|
-exit
|