Gstreamer and Blackmagic Decklink Duo

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

TouchOfDestiny

  • Posts: 11
  • Joined: Wed Mar 13, 2019 4:23 pm
  • Real Name: Davide Caldelari

Gstreamer and Blackmagic Decklink Duo

PostMon Jun 17, 2019 1:42 pm

Hi,

I don't have a very deep knowledge of GStreamer and this problem is making me crazy:

In Ubuntu 18.04, if I try to send a video to ximagesink, this command works perfectly:

Code: Select all
gst-launch-1.0 rtpbin name=rtpbin latency=1000 debug=true udpsrc address=127.0.0.1 port=60010 caps="application/x-rtp, media=video, encoding-name=VP8, clock-rate=90000" ! rtpbin.recv_rtp_sink_1 rtpbin. ! rtpvp8depay ! vp8dec ! autovideoconvert ! ximagesink


but when I try to send that stream to my Decklink Duo Card, it does not work: no errors, the command seems to work but I only have a black screen:

Code: Select all
 gst-launch-1.0 rtpbin name=rtpbin latency=1000 debug=true udpsrc address=127.0.0.1 port=60010 caps="application/x-rtp, media=video, encoding-name=VP8, clock-rate=90000" ! rtpbin.recv_rtp_sink_1 rtpbin. ! rtpvp8depay ! vp8dec ! autovideoconvert ! decklinkvideosink device-number=1 mode=17


Does anybody have an idea of what the problem could be?

Thanky in advance,
Davide
Offline

Dave Johnstone

  • Posts: 221
  • Joined: Mon Dec 08, 2014 11:12 am
  • Location: Adelaide

Re: Gstreamer and Blackmagic Decklink Duo

PostWed Jun 19, 2019 8:54 am

Hi Davide,

My development machine is not available at the moment so I can’t test, but a few things to try:

Does the frame size and rate match mode 17? You could try a capsfilter or capssetter element for this or, for test, a videorate and/or videoscale element. Also take a look at the pipeline graph if you haven’t already - set the environment variable GST_DEBUG_DUMP_DOT_DIR=/somewhere/writable and view with xdot or similar.

Regards,

Dave.
Freelance Television Broadcast Engineer
and Software Programmer.
Offline

TouchOfDestiny

  • Posts: 11
  • Joined: Wed Mar 13, 2019 4:23 pm
  • Real Name: Davide Caldelari

Re: Gstreamer and Blackmagic Decklink Duo

PostFri Jun 21, 2019 8:16 am

Hi Dave,

thank you very much for your suggestion.
I did what you suggested without success, unfortunately. I also took a look at the graphs generated by xdot and didn't find anything but, again, I'm not an expert. I switched to mode 22 (720p50) and put a videorate and video scale before the decklinkvideosink object, with no luck.

Is there a way to debug intensively all the pipeline?

Thanks again,
Davide
Offline

Dave Johnstone

  • Posts: 221
  • Joined: Mon Dec 08, 2014 11:12 am
  • Location: Adelaide

Re: Gstreamer and Blackmagic Decklink Duo

PostFri Jun 21, 2019 8:50 am

Hi,

You can set the debug environment variable GST_DEBUG=5. This will log everything and dump a huge quantity of output to the console. If it is too much, step down through the levels until 1 (errors only). You can also set the debug on an element eg GST_DEGUG=decklinkvideosink:5.

Regards,

Dave.
Freelance Television Broadcast Engineer
and Software Programmer.
Offline

TouchOfDestiny

  • Posts: 11
  • Joined: Wed Mar 13, 2019 4:23 pm
  • Real Name: Davide Caldelari

Re: Gstreamer and Blackmagic Decklink Duo

PostSat Jun 22, 2019 8:06 pm

Hi,

I managed to do it, thanks to your suggestion. It seems to be a payload problem, I had to specify it in the caps and also I had to insert a rtpjitterbuffer object. I completed with audio, also:

Code: Select all
gst-launch-1.0 rtpbin name=rtpbin latency=500 udpsrc address=127.0.0.1 port=60010 caps="application/x-rtp, media=(string)video, encoding-name=(string)VP8, clock-rate=(int)90000, payload=(int)96" ! rtpjitterbuffer ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtpvp8depay ! queue ! vp8dec ! videoflip video-direction=2 ! videoconvert ! video/x-raw,format=UYVY ! videoscale  ! video/x-raw,width=1280,height=720 ! decklinkvideosink device-number=1 mode=22 sync=true udpsrc address=127.0.0.1 port=60001 caps="application/x-rtp, media=audio, encoding-name=OPUS, clock-rate=48000" ! rtpbin.recv_rtp_sink_1 rtpbin. ! rtpopusdepay ! queue ! opusdec ! decklinkaudiosink device-number=1


This works perfectly but I get tons of this error:

Code: Select all
(gst-launch-1.0:12154): GStreamer-CRITICAL **: 21:57:15.948: _gst_util_uint64_scale_int: assertion 'denom > 0' failed


I have no idea of what it could be the reason. Unfortunately, with this solution I'm tied to VP8 and OPUS. What I would like is to use a generated sdpfile, if possible. Do you have a hint?

Thank you very much,
Davide
Offline

Dave Johnstone

  • Posts: 221
  • Joined: Mon Dec 08, 2014 11:12 am
  • Location: Adelaide

Re: Gstreamer and Blackmagic Decklink Duo

PostMon Jun 24, 2019 11:16 pm

Hi,

For support of multiple input methods you should take a look at the uridecodebin element as the decoder.

Regards,

Dave.
Freelance Television Broadcast Engineer
and Software Programmer.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 1 guest