I’ve tried the following pipelines with gstreamer 1.24 built from source with a few different variations with queues and capfilters
src ! bayer2rgb ! nvh264enc ! h264parse ! webrtcsink video-caps="video/x-h264"
src ! bayer2rgb ! videorate ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! nvh264enc ! h264parse ! webrtcsink video-caps="video/x-h264"
I get the following error fairly immediately, it looks like the pipeline is adding a few extra caps into the stream at some point (newlines added for clarity):
webrtcsink net/webrtc/src/webrtcsink/imp.rs:3476:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::sink_event:<webrtcsink:video_0>
Renegotiation is not supported (
old: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)2.1, profile=(string)main, width=(int)480, height=(int)304, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, parsed=(boolean)true,
new: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)2.1, profile=(string)main, width=(int)480, height=(int)304, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB, coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true)
Here are the differences:
old: video/x-h264, ... colorimetry=(string)sRGB, parsed=(boolean)true
new: video/x-h264, ... colorimetry=(string)sRGB, coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true)
I’m not sure how to either ensure that webrtcsink expects the extra caps immediately, or ensure that nvh264enc/h264parse doesn’t include those extra caps