teltek / gst-plugin-ndi

GStreamer NDI Plugin for Linux
GNU Lesser General Public License v2.1
154 stars 27 forks source link

NDI HX / NDI HX2 #86

Closed danjenkins closed 2 years ago

danjenkins commented 2 years ago

Anyone got a gstreamer pipeline that works for decoding hx / hx2 streams?

I'm trying to take an ndi hx stream (or a hx2 stream) and insert it into a webrtcbin pipeline.

I'm using a Mevo live camera which is setup for HX but can also be setup to use HX2

If I use decodebin I get a video output that tells me that the video decoder wasnt found...

ndisrc ndi-name="MEVO-23NL5\ \(Mevo-23NL5\)" ! ndisrcdemux name=n n.video ! decodebin ! videoconvert ! vp8enc deadline=1 target-bitrate=500000 ! rtpvp8pay pt=96 ssrc=2 ! queue ! application/x-rtp,media=video,encoding-name=VP8,payload=96

Screen Shot 2021-11-08 at 14 01 31

If I use avdec_h264 I get no gstreamer pipeline start.... but I do get a load of logs that tell me about a queue having 11 items and dropping old buffer... this is the case with hx2 (using avdec_h265) as well....

My pipeline works when getting NDI sources (and not using a decoder at all before videoconvert

webrtcbin name=sendonly bundle-policy=3    ndisrc ndi-name="MEVO-23NL5\ \(Mevo-23NL5\)" ! ndisrcdemux name=n n.video ! avdec_h264  ! videoconvert ! vp8enc deadline=1 target-bitrate=500000 ! rtpvp8pay pt=96 ssrc=2 ! queue ! application/x-rtp,media=video,encoding-name=VP8,payload=96 ! sendonly. n.audio ! audioconvert ! audioresample ! audiobuffersplit output-buffer-duration=2/50 ! queue ! opusenc ! rtpopuspay pt=100 ssrc=1 ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=100 ! sendonly.
[WHIP] Starting the GStreamer pipeline
0:00:00.079222949  1652 0x560258bffa40 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<ndisrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.130172032  1652 0x560258bffa40 WARN         audio-resampler audio-resampler.c:274:convert_taps_gint16_c: can't find exact taps
0:00:02.372164290  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:353:gstndi::receiver:<ndisrc0> Delta 2251468433 too far from skew -3539946, resetting
0:00:02.373867508  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:326:gstndi::receiver:<ndisrc0> Too small/big slope 0.0000026324114948095085, resetting
0:00:02.373923340  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:326:gstndi::receiver:<ndisrc0> Too small/big slope 0.0031474589141908932, resetting
0:00:02.373945858  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:326:gstndi::receiver:<ndisrc0> Too small/big slope 0.0010825798165309632, resetting
0:00:02.373980123  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:326:gstndi::receiver:<ndisrc0> Too small/big slope 0.0008750169922140503, resetting
0:00:02.382056122  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:326:gstndi::receiver:<ndisrc0> Too small/big slope 0.37859502001556244, resetting
0:00:02.384477674  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.399842168  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.425363903  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.425466422  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.445427247  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.451829985  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.464713360  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.485641241  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.493375081  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.507566091  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.524736647  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.528608529  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
0:00:02.549612041  1652 0x7f186c007ad0 WARN             ndireceiver src/receiver.rs:755:gstndi::receiver:<ndisrc0> Dropping old buffer -- queue has 11 items
danjenkins commented 2 years ago

You need to ask Newtek for a Linux NDI HX Driver... not that it seems to be working for me right now...

danjenkins commented 2 years ago

This has now been resolved by the newtek team

sdroege commented 2 years ago

Do you have some more details about what was fixed? Do they now generate timecodes in 100ns units (like the SDK documentation says) instead of 1ns units as before?

danjenkins commented 2 years ago

No I don't know about that... all I know is you go and ask for the "ndi hx for Linux sdk" and they send it to you with a "be careful about licenses" warning. In my case it still wouldn't pick up the decoder in the sdk they sent me... lots of sending debugging to them and they found a problem with the sdk; sent a new version and now the gstreamer ndi plug-in gets video instead of the "no decoder image as video" video

sdroege commented 2 years ago

Oh well, newtek :shrug: Thanks :)