Question about bridging H.264 from RTSP to webRTC

evaluat0r volatileconst at gmail.com
Fri Feb 12 07:34:24 UTC 2021


Ottavio Campana-2 wrote
> Hello,
> 
> I am trying to bridge H.264 over RSTP from a camera to webRTC for seeing
> the video in the browser.
> 
> I started by setting up the example
> https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/webrtc/sendrecv/gst/webrtc-sendrecv.c
> and it works.
> 
> My successive step was moving from VP8 to H.264, thus in the function
> start_pipeline I changed
> 
> "videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc
> deadline=1 ! rtpvp8pay ! "
> "queue ! " RTP_CAPS_VP8 "96 ! sendrecv. "
> 
> to
> 
> videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! x264enc !
> rtph264pay config-interval=-1 ! "
> "queue ! " RTP_CAPS_H264 "96 ! sendrecv. "
> 
> and this also works. At this point I tried to change the pipeline, by
> fetching the nal units from a RTSP source and by sending them to the
> webrtcbin
> 
> "rtspsrc location=rtsp://192.168.69.159/live2.sdp latency=0 ! queue !
> rtph264depay ! h264parse ! rtph264pay config-interval=-1 ! "
> "queue ! " RTP_CAPS_H264 "96 ! sendrecv. "
> 
> With firefox 85.0.1 the example hangs with "Sending SDP answer". Neither
> video nor audio flaw between webrtc-sednrecv and firefox. On the other
> hand, if I try it with chrome 88.0.4323.150 it works as expected.
> 
> I suspect that there must be something wrong in my pipe, but I cannot
> understand what. Can you please give me a hint?

While that may work with chrome, it isn't guaranteed to work. If you receive
certain messages from chrome that require to generate an I frame on request,
then you can't do that if you are dealing with compressed video.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list