Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nicolargo
committed
May 28, 2011
1 parent
e6270e9
commit a88374b
Showing
13 changed files
with
253 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
CAPS="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)AMR, encoding-params=(string)1, octet-align=(string)1, payload=(int)96" | ||
SOURCE="port=6969 caps=\"$CAPS\"" | ||
|
||
DECODER="gstrtpjitterbuffer latency=200 drop-on-latency=true ! rtpamrdepay ! amrnbdec" | ||
|
||
gst-launch -tv \ | ||
udpsrc $SOURCE ! $DECODER ! audioconvert ! audioresample ! alsasink | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
CAPS="application/x-rtp, media=(string)audio, clock-rate=(int)32000, encoding-name=(string)CELT, encoding-params=(string)1, frame-size=(string)480, payload=(int)96" | ||
SOURCE="port=6969 caps=\"$CAPS\"" | ||
|
||
DECODER="gstrtpjitterbuffer latency=200 drop-on-latency=true ! rtpceltdepay ! celtdec" | ||
|
||
gst-launch -tv \ | ||
udpsrc $SOURCE ! $DECODER ! audioconvert ! audioresample ! alsasink | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
CAPS="application/x-rtp, media=(string)audio, clock-rate=(int)24000, encoding-name=(string)SPEEX, encoding-params=(string)1, payload=(int)110" | ||
SOURCE="port=6969 caps=\"$CAPS\"" | ||
|
||
DECODER="gstrtpjitterbuffer latency=200 drop-on-latency=true ! rtpspeexdepay ! speexdec" | ||
|
||
gst-launch -tv \ | ||
udpsrc $SOURCE ! $DECODER ! audioconvert ! audioresample ! alsasink | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
SOURCE="filesrc location=\"samples/wb_male.wav\" ! decodebin ! audioconvert ! legacyresample ! audio/x-raw-int,rate=8000" | ||
ENCODER="amrnbenc" | ||
PAYLOADER="rtpamrpay" | ||
DESTINATION_IP=${1-"127.0.0.1"} | ||
# Vers relay | ||
#DESTINATION="port=6868 host=$DESTINATION_IP" | ||
# Vers rcv | ||
DESTINATION="port=6969 host=$DESTINATION_IP" | ||
|
||
# SON OK mais attention à voir si le CAPS ne change pas dynamiquement d'une machine à l'autre | ||
gst-launch -tv \ | ||
gstrtpbin name=rtpbin latency=100 buffer-mode=0 \ | ||
$SOURCE \ | ||
! queue ! $ENCODER ! $PAYLOADER \ | ||
! rtpbin.send_rtp_sink_1 \ | ||
rtpbin.send_rtp_src_1 ! udpsink $DESTINATION qos-dscp=46 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
SOURCE="filesrc location=\"samples/wb_male.wav\" ! decodebin ! audioconvert ! legacyresample ! audio/x-raw-int,rate=32000" | ||
ENCODER="celtenc bitrate=32" | ||
PAYLOADER="rtpceltpay" | ||
DESTINATION_IP=${1-"127.0.0.1"} | ||
# Vers relay | ||
#DESTINATION="port=6868 host=$DESTINATION_IP" | ||
# Vers rcv | ||
DESTINATION="port=6969 host=$DESTINATION_IP" | ||
|
||
# SON OK mais attention à voir si le CAPS ne change pas dynamiquement d'une machine à l'autre | ||
gst-launch -tv \ | ||
gstrtpbin name=rtpbin latency=100 buffer-mode=0 \ | ||
$SOURCE \ | ||
! queue ! $ENCODER ! $PAYLOADER \ | ||
! rtpbin.send_rtp_sink_1 \ | ||
rtpbin.send_rtp_src_1 ! udpsink $DESTINATION qos-dscp=46 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
SOURCE="filesrc location=\"samples/wb_male.wav\" ! decodebin ! audioconvert ! legacyresample ! audio/x-raw-int,rate=24000" | ||
ENCODER="speexenc bitrate=32000 vad=true dtx=true" | ||
PAYLOADER="rtpspeexpay" | ||
DESTINATION_IP=${1-"127.0.0.1"} | ||
# Vers relay | ||
#DESTINATION="port=6868 host=$DESTINATION_IP" | ||
# Vers rcv | ||
DESTINATION="port=6969 host=$DESTINATION_IP" | ||
|
||
# SON OK mais attention à voir si le CAPS ne change pas dynamiquement d'une machine à l'autre | ||
gst-launch -tv \ | ||
gstrtpbin name=rtpbin latency=100 buffer-mode=0 \ | ||
$SOURCE \ | ||
! queue ! $ENCODER ! $PAYLOADER \ | ||
! rtpbin.send_rtp_sink_1 \ | ||
rtpbin.send_rtp_src_1 ! udpsink $DESTINATION qos-dscp=46 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# RTP | ||
# Not Work: needs string "configuration" in caps... | ||
|
||
gst-launch -v --gst-debug-level=2 \ | ||
udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)THEORA, sampling=(string)YCbCr-4:2:0, width=(string)352, height=(string)288, delivery-method=(string)inline, payload=(int)96, ssrc=(guint)384708083, clock-base=(guint)355459878, seqnum-base=(guint)6971" port=5000 \ | ||
! queue ! gstrtpjitterbuffer latency=3000 \ | ||
! queue ! rtptheoradepay \ | ||
! queue ! theoradec ! autovideosink | ||
VIDEOCAPS="application/x-rtp,media=\(string\)video,clock-rate=\(int\)90000,encoding-name=\(string\)THEORA,sampling=\(string\)YCbCr-4:2:0,width=\(string\)320,height=\(string\)240,delivery-method=\(string\)inline,ssrc=\(guint\)1157217335,payload=\(int\)96,clock-base=\(guint\)1092900643,seqnum-base=\(guint\)22781" | ||
VIDEOPORT=5000 | ||
|
||
gst-launch -tvm \ | ||
gstrtpbin name=rtpbin latency=0 buffer-mode=0 \ | ||
udpsrc caps=$VIDEOCAPS port=$VIDEOPORT do-timestamp=true \ | ||
! rtpbin.recv_rtp_sink_0 \ | ||
rtpbin. ! rtptheoradepay ! theoradec ! autovideosink | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,51 @@ | ||
# RTP | ||
|
||
IPCLIENT=$1 | ||
PORTCLIENT=5000 | ||
|
||
WIDTH=704 | ||
HEIGHT=576 | ||
FPS=20 | ||
BITRATE=200000 | ||
BITRATE_TOLERANCE=20000 | ||
|
||
IPCLIENT=${1-"127.0.0.1"} | ||
PORTCLIENT=${2-"5000"} | ||
LATENCY=${3-"0"} | ||
|
||
ENCODER="ffenc_mpeg4" | ||
PAYLOADER="rtpmp4vpay send-config=true" | ||
|
||
# LE TOP POUR LA VISIO | ||
VIDEOSRC="autovideosrc" | ||
VIDEOCAPS="video/x-raw-yuv,width=352,height=288,framerate=10/1" | ||
BITRATE=128000 | ||
ENCODER_OPT="bitrate=$BITRATE bitrate-tolerance=$BITRATE pass=0 trellis=1 idct-algo=11 quant-type=0 rc-qmod-amp=99 rc-buffer-aggressivity=99" | ||
|
||
# LE TOP POUR LIVE SCREENCASTING | ||
#VIDEOSRC="ximagesrc" | ||
#VIDEOCAPS="video/x-raw-yuv,width=352,height=288,framerate=10/1" | ||
#BITRATE=160000 | ||
#ENCODER_OPT="bitrate=$BITRATE bitrate-tolerance=$BITRATE pass=0 trellis=0 idct-algo=11 quant-type=0 rc-qmod-amp=50 rc-buffer-aggressivity=50" | ||
|
||
gst-launch -tv \ | ||
gstrtpbin name=rtpbin latency=$LATENCY buffer-mode=0 \ | ||
$VIDEOSRC \ | ||
! queue ! videoscale method=1 ! videorate ! $VIDEOCAPS \ | ||
! tee name="display" \ | ||
! queue ! cairotextoverlay text="$ENCODER $BITRATE" shaded-background=true \ | ||
! queue ! $ENCODER $ENCODER_OPT \ | ||
! $PAYLOADER \ | ||
! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \ | ||
! udpsink port=$PORTCLIENT host=$IPCLIENT sync=false async=false \ | ||
display. \ | ||
! queue ! cairotextoverlay text="Source" shaded-background=true \ | ||
! autovideosink | ||
|
||
|
||
################## | ||
# OTHERS PIPELINES | ||
################## | ||
|
||
exit | ||
|
||
# Sans gstrtpbin | ||
gst-launch -v --gst-debug-level=2 \ | ||
autovideosrc ! ffmpegcolorspace \ | ||
! queue ! decodebin \ | ||
$VIDEOSRC ! ffmpegcolorspace \ | ||
! queue ! videoscale method=1 ! video/x-raw-yuv,width=$WIDTH,height=$HEIGHT \ | ||
! queue ! videorate ! video/x-raw-yuv,framerate=$FPS/1 \ | ||
! queue max-size-bytes=20971520 ! ffenc_mpeg4 bitrate=$BITRATE bitrate-tolerance=$BITRATE_TOLERANCE \ | ||
! rtpmp4vpay \ | ||
! queue max-size-bytes=20971520 ! ffenc_mpeg4 $MPEG4_OPT \ | ||
! rtpmp4vpay send-config=true \ | ||
! queue ! udpsink port=$PORTCLIENT host=$IPCLIENT sync=false async=false | ||
|
||
# WIDTH=352 | ||
# HEIGTH=288 | ||
# FPS=20 | ||
# BITRATE=200000 | ||
# BITRATE_TOLERANCE=20000 | ||
# | ||
# -> OK bonne qualité | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
# RTP | ||
# Not Work | ||
|
||
IPCLIENT=127.0.0.1 | ||
PORTCLIENT=5000 | ||
CLIENTIP=127.0.0.1 | ||
VIDEOCAPS="video/x-raw-yuv,width=(int)320,height=(int)240,framerate=(fraction)15/1" | ||
VIDEOPORT=5000 | ||
|
||
gst-launch -v --gst-debug-level=2 \ | ||
autovideosrc ! ffmpegcolorspace \ | ||
! queue ! decodebin \ | ||
! queue ! videoscale method=1 ! video/x-raw-yuv,width=352,height=288 \ | ||
! queue ! videorate ! video/x-raw-yuv,framerate=10/1 \ | ||
! queue max-size-bytes=20971520 ! theoraenc bitrate=200 \ | ||
! queue ! rtptheorapay \ | ||
! queue ! udpsink port=$PORTCLIENT host=$IPCLIENT sync=false async=false | ||
gst-launch -tv \ | ||
gstrtpbin name=rtpbin latency=0 buffer-mode=0 \ | ||
! autovideosrc ! videoscale ! videorate ! $VIDEOCAPS \ | ||
! queue ! ffmpegcolorspace ! theoraenc bitrate=200 \ | ||
! rtptheorapay \ | ||
! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \ | ||
! udpsink host=$CLIENTIP port=$VIDEOPORT | ||
|
||
#gst-launch -v --gst-debug-level=2 \ | ||
# autovideosrc ! ffmpegcolorspace \ | ||
# ! queue ! decodebin \ | ||
# ! queue ! videoscale method=1 ! video/x-raw-yuv,width=352,height=288 \ | ||
# ! queue ! videorate ! video/x-raw-yuv,framerate=10/1 \ | ||
# ! queue max-size-bytes=20971520 ! theoraenc bitrate=200 \ | ||
# ! queue ! rtptheorapay \ | ||
# ! queue ! udpsink port=$PORTCLIENT host=$IPCLIENT sync=false async=false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters