Last active
January 29, 2024 01:19
Revisions
-
pulsar256 revised this gist
Jun 8, 2020 . 1 changed file with 2 additions and 2 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 charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ gst-launch-1.0 \ ### Gstreamer Based #### Default / auto audio sink ``` bash RECEIVER_PORT=5100 @@ -38,7 +38,7 @@ gst-launch-1.0 \ ! autoaudiosink ``` #### Jack Audio Sink ``` bash RECEIVER_PORT=5100 -
pulsar256 revised this gist
Jun 8, 2020 . 1 changed file with 3 additions and 3 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 charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,8 @@ gst-launch-1.0 \ ### Gstreamer Based ### Default / auto audio sink ``` bash RECEIVER_PORT=5100 @@ -36,7 +38,7 @@ gst-launch-1.0 \ ! autoaudiosink ``` ### Jack Audio Sink ``` bash RECEIVER_PORT=5100 @@ -52,8 +54,6 @@ gst-launch-1.0 \ ! jackaudiosink ``` ### VLC Based VLC requires a SDP File specifying the RTP payload. -
pulsar256 revised this gist
Jun 8, 2020 . 1 changed file with 4 additions and 0 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 charactersOriginal file line number Diff line number Diff line change @@ -29,6 +29,7 @@ RECEIVER_PORT=5100 gst-launch-1.0 \ udpsrc port=$RECEIVER_PORT \ ! application/x-rtp,media=audio,payload=101,encoding-name=OPUS \ ! rtpjitterbuffer \ ! rtpopusdepay \ ! opusdec \ ! audioconvert \ @@ -43,6 +44,7 @@ RECEIVER_PORT=5100 gst-launch-1.0 \ udpsrc port=$RECEIVER_PORT \ ! application/x-rtp,media=audio,payload=101,encoding-name=OPUS \ ! rtpjitterbuffer \ ! rtpopusdepay \ ! opusdec \ ! audioconvert \ @@ -77,3 +79,5 @@ See https://tools.ietf.org/html/rfc7587 for more details. ## Notes this solution provides a peer to peer path only. If multiple clients shall connect to the same audio source, a RTSP server would be the next logical building block. See https://github.com/GStreamer/gst-rtsp-server for examples how to implement one. `test-sdp` and `test-launch` in the `1.16` branch did not yeld any working servers during my tests. rtpjitterbuffer for the client might be optional if your network is stable and transport is udp (which it is in the examples above). -
pulsar256 revised this gist
Jun 7, 2020 . 1 changed file with 16 additions and 0 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 charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,22 @@ gst-launch-1.0 \ ! autoaudiosink ``` ### Gstreamer Based Jack Target ``` bash RECEIVER_PORT=5100 gst-launch-1.0 \ udpsrc port=$RECEIVER_PORT \ ! application/x-rtp,media=audio,payload=101,encoding-name=OPUS \ ! rtpopusdepay \ ! opusdec \ ! audioconvert \ ! audioresample \ ! jackaudiosink ``` ### VLC Based -
pulsar256 revised this gist
Jun 7, 2020 . 1 changed file with 1 addition and 1 deletion.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 charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ gst-launch-1.0 \ RECEIVER_PORT=5100 gst-launch-1.0 \ udpsrc port=$RECEIVER_PORT \ ! application/x-rtp,media=audio,payload=101,encoding-name=OPUS \ ! rtpopusdepay \ ! opusdec \ -
pulsar256 revised this gist
Jun 7, 2020 . 1 changed file with 2 additions and 2 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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ gst-launch-1.0 \ ! audioconvert \ ! opusenc bitrate-type=vbr bitrate=128000 \ ! rtpopuspay pt=101 \ ! udpsink host=$TARGET_IP port=$TARGET_PORT ``` ## Consumer @@ -27,7 +27,7 @@ gst-launch-1.0 \ RECEIVER_PORT=5100 gst-launch-1.0 \ udpsrc port=$RECEIVER_PORT\ ! application/x-rtp,media=audio,payload=101,encoding-name=OPUS \ ! rtpopusdepay \ ! opusdec \ -
pulsar256 revised this gist
Jun 7, 2020 . 1 changed file with 1 addition and 1 deletion.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 charactersOriginal file line number Diff line number Diff line change @@ -60,4 +60,4 @@ See https://tools.ietf.org/html/rfc7587 for more details. ## Notes this solution provides a peer to peer path only. If multiple clients shall connect to the same audio source, a RTSP server would be the next logical building block. See https://github.com/GStreamer/gst-rtsp-server for examples how to implement one. `test-sdp` and `test-launch` in the `1.16` branch did not yeld any working servers during my tests. -
pulsar256 revised this gist
Jun 7, 2020 . 1 changed file with 3 additions and 1 deletion.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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Opus p2p streaming Low latency streaming of ogg compressed audio data between two peers using RTP and gstreamer-1.0. Expected latency over the network is below 1 second. @@ -58,4 +58,6 @@ Please notice the hardcoded UDP port in the SDP file set to 5100, depending on y See https://tools.ietf.org/html/rfc7587 for more details. ## Notes this solution provides a peer to peer path only. If multiple clients shall connect to the same audio source, a RTSP server would be the next logical building block. See https://github.com/GStreamer/gst-rtsp-server for examples how to implement one. `test-odp` and `test-launch` in the `1.16` branch did not yeld any working servers during my tests. -
pulsar256 revised this gist
Jun 7, 2020 . 1 changed file with 3 additions and 1 deletion.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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ # Abstract Low latency streaming of ogg compressed audio data between two peers using RTP and gstreamer-1.0. Expected latency over the network is below 1 second. ## Producer The producer will provide a Jack sink which needs to be connected to a audio producer. ```bash TARGET_PORT=5100 TARGET_IP=PEER_IP -
pulsar256 created this gist
Jun 7, 2020 .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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ # Abstract Low latency streaming of ogg compressed audio data between two peers using RTP and gstreamer-1.0 ## Producer ```bash TARGET_PORT=5100 TARGET_IP=PEER_IP gst-launch-1.0 \ jackaudiosrc connect=1 \ ! audio/x-raw, channels=2 \ ! audioconvert \ ! opusenc bitrate-type=vbr bitrate=128000 \ ! rtpopuspay pt=101 \ ! udpsink host=$TARGET_IP port=$TARGET_PORT blocksize=4096 ``` ## Consumer ### Gstreamer Based ``` bash RECEIVER_PORT=5100 gst-launch-1.0 \ udpsrc port=$RECEIVER_PORT blocksize=128 \ ! application/x-rtp,media=audio,payload=101,encoding-name=OPUS \ ! rtpopusdepay \ ! opusdec \ ! audioconvert \ ! autoaudiosink ``` ### VLC Based VLC requires a SDP File specifying the RTP payload. `stream.sdp`: ```sdp m=audio 5100 RTP/AVP 101 c=IN IP4 127.0.0.1 a=rtpmap:101 opus/48000/2 ``` run with ``` vlc ./stream.sdp ``` Please notice the hardcoded UDP port in the SDP file set to 5100, depending on your network configuration / forwarding rules this might need to change. See https://tools.ietf.org/html/rfc7587 for more details.