Created
February 12, 2024 16:44
-
-
Save T-X/432d29d3af1faa661fedc0826ea3aac8 to your computer and use it in GitHub Desktop.
Gstreamer Opus/RaptorQ/RTP/UDP/localhost
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
# Working: | |
## Transmitter | |
``` | |
$ gst-launch-1.0 -v \ | |
rtpbin name=rtp fec-encoders='fec,0="raptorqenc\ mtu=400\ repair-packets=15\ repair-window=500\ symbol-size=192";' \ | |
uridecodebin uri=file:///tmp/foo.flac \ | |
! audioconvert ! audioresample \ | |
! opusenc ! queue ! rtpopuspay \ | |
! rtp.send_rtp_sink_0 rtp.send_rtp_src_0 \ | |
! udpsink host=127.0.0.1 port=5000 rtp.send_fec_src_0_0 \ | |
! udpsink host=127.0.0.1 port=5002 async=false | |
``` | |
## Receiver | |
``` | |
$ gst-launch-1.0 \ | |
rtpbin latency=3000 fec-decoders='fec,0="raptorqdec";' name=rtp \ | |
udpsrc address=127.0.0.1 port=5002 \ | |
caps="application/x-rtp, payload=96, raptor-scheme-id=(string)6, repair-window=(string)500, t=(string)192" \ | |
! rtp.recv_fec_sink_0_0 \ | |
udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp, media=audio, clock-rate=48000, encoding-name=OPUS, payload=96" \ | |
! queue ! netsim drop-probability=0.25 \ | |
! rtp.recv_rtp_sink_0 rtp. \ | |
! decodebin ! audioconvert ! queue ! autoaudiosink | |
``` | |
# Not working: | |
Trying to change to "opusenc frame-size=60 bitrate=32000": | |
## Transmitter | |
``` | |
$ gst-launch-1.0 -v \ | |
rtpbin name=rtp fec-encoders='fec,0="raptorqenc\ mtu=1000\ repair-packets=15\ repair-window=1500\ symbol-size=576";' \ | |
uridecodebin uri=file:///tmp/foo.flac \ | |
! audioconvert ! audioresample \ | |
! opusenc frame-size=60 bitrate=32000 ! queue ! rtpopuspay \ | |
! rtp.send_rtp_sink_0 rtp.send_rtp_src_0 \ | |
! udpsink host=127.0.0.1 port=5000 rtp.send_fec_src_0_0 \ | |
! udpsink host=127.0.0.1 port=5002 async=false | |
``` | |
## Receiver | |
``` | |
$ gst-launch-1.0 \ | |
rtpbin latency=10000 fec-decoders='fec,0="raptorqdec";' name=rtp \ | |
udpsrc address=127.0.0.1 port=5002 \ | |
caps="application/x-rtp, payload=96, raptor-scheme-id=(string)6, repair-window=(string)1500, t=(string)192" \ | |
! rtp.recv_fec_sink_0_0 \ | |
udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp, media=audio, clock-rate=48000, encoding-name=OPUS, payload=96" \ | |
! queue ! netsim drop-probability=0.25 \ | |
! rtp.recv_rtp_sink_0 rtp. \ | |
! decodebin ! audioconvert ! queue ! autoaudiosink | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment