Webrtc multiple streams, how to identify

Trey Hutcheson trey.hutcheson at gmail.com
Mon May 3 18:21:52 UTC 2021


You can always rewrite the sdp after it's been generated and include
mslabel attributes (sibling to a=ssrc). That's what we do.

On Mon, May 3, 2021 at 12:20 PM Acs Christoph via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Hi
>
> I have multiple streams with one webrtcbin, playing works fine but I need a
> way to identify these streams.
> Currently on js side when new RTCRtpTransceiver is added
> (RTCPeerConnection.ontrack),
> I see this information, each video streams has id's like video0, video1,
> video2
>
> Is there a way to change these id's (video0, video1, video2) to a different
> name so that i can set an identifier for each side on gstreamer side and
> get
> then these identifiers on js side ?
>
> *JS RTCPeerConnection Track Info:*
> track: MediaStreamTrack
> id: "webrtctransceiver3"
> kind: "video"
> label: "webrtctransceiver3"
>
> *JS RTCPeerConnection Transceiver Info*
> transceiver: RTCRtpTransceiver
> currentDirection: "recvonly"
> direction: "recvonly"
> mid: "video0"
>
> my gstreamer pipeline looks this.
> webrtcbin name=sendrecv bundle-policy=max-bundle rtspsrc
> location=rtsp://213.208.158.226:554/stream_0 user-id=G4S user-pw=1211
> name=rtspsrc latency=0
>  ! rtph264depay name=depay ! h264parse ! rtph264pay config-interval=-1 !
> application/x-rtp, media=video, encoding-name=H264, payload=96 ! sendrecv.
> rtspsrc location=rtsp://213.208.158.226:554/stream_0 user-id=G4S
> user-pw=1211 name=rtspsrc2 latency=0
>  ! rtph264depay name=depay2 ! h264parse ! rtph264pay config-interval=-1 !
> application/x-rtp, media=video, encoding-name=H264, payload=96 ! sendrecv.
> rtspsrc location=rtsp://213.208.158.226:554/stream_0 user-id=G4S
> user-pw=1211 name=rtspsrc3 latency=0
>  ! rtph264depay name=depay3 ! h264parse ! rtph264pay config-interval=-1 !
> application/x-rtp, media=video, encoding-name=H264, payload=96 ! sendrecv.
>
> big thanks
> br christoph
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210503/203d1463/attachment.htm>


More information about the gstreamer-devel mailing list