Jose
Jose

Reputation: 41

encode with webcodecs and forward to gstreamer

I'm encoding a videoframe using HTML5 native webcodecs into raw h264 (without transport) With the following configuration

    videoEncoder.configure({
        codec: 'avc1.420034',
        width: 1280,
        height: 720,
        bitrate: 1e6,
        avc: {
            format: 'annexb'
        },
        framerate: 30,
        bitrateMode: 'constant'
    })

I'm sending the video over a websocket to java server and then over udp to gstreamer

The following example open a local windows with the video

gst-launch-1.0 -v udpsrc port=5555 ! h264parse ! video/x-h264, profile=baseline ! avdec_h264 ! xvimagesink

but I'm trying to send over srt to a cloud server

gst-launch-1.0 -v udpsrc port=5555 ! video/x-h264, profile=baseline ! h264parse ! mpegtsmux ! queue ! srtsink uri="srt://REDACTED:10000"

the pipeline starts but I cannot watch the video online. And after a few seconds the following message appears

WARNING: from element /GstPipeline:pipeline0/GstSRTSink:srtsink0: Error on SRT socket. Trying to reconnect.
Additional debug info:
../ext/srt/gstsrtobject.c(1790): gst_srt_object_write_one (): /GstPipeline:pipeline0/GstSRTSink:srtsink0:
libsrt reported: Unknown or erroneous

Upvotes: 0

Views: 167

Answers (0)

Related Questions