Advice needed to build up a pipline with gstlaunch

hi, i am a beginner to gstreamer and want to build up a pipeline using gstlaunch. The goal is to read directly a ieee 1394 source from tape (dv) and display it without processing (if possible) to a decklink sink ( i.e. BM MultiMonitor) - is this possible ?

gst-launch-1.0 dv1394src ! … <additional steps> … !  decklinkvideosink device-number=0 mode=1080p25


any help appreciated … best regards martin

Not tested, but try something like this for starters:

gst-launch-1.0 dv1394src ! decodebin ! videoconvert ! deinterlace! videoconvert ! videoscale !  decklinkvideosink device-number=0 mode=1080p25

tried it but unfortunately there is an error message:

error: internal data stream error
error: element / GstPipeline/GstDV1394src
streaming stopped: reason not-linked (-1)

sorry my fault it works - many thanks for your help - i forgot one separator …

… one last question: how would i integrate also the audio stream - actually it works fine but without audio … sorry for such basic questions …

this would be me proposal:
sudo gst-launch-1.0 filesrc location=dvgrab-001.dv ! queue ! dvdemux name=dm ! queue ! audioconvert ! decklinkaudiosink device-number=0 dm. ! queue ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25
(this works)

but this crashes:
sudo gst-launch-1.0 dv1394src ! queue ! dvdemux name=dm ! queue ! audioconvert ! decklinkaudiosink device-number=0 dm. ! queue ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25

is this correct ?

best regards martin

What do you mean by ‘it crashes’? It errors out? What’s the error it prints?

Make sure you have the avdec_dvvideo element installed (if not install gstreamer-1.0-ffmpeg). You can also try it in place of the decodebin here.

In the audio branch you may need an audioresample between the audioconvert and the decklinkaudiosink.

Hi tpm,
sorry for being not precise: the error was: FEHLER: Von Element /GstPipeline:pipeline0/GstDV1394Src:dv1394src0: Internal data stream error.

Your hint to use “audioresample” did solve the problem entirely. Now I have a good base to build up further knowledge in gstreamer. Let me say thank you for your time.

The package gstreamer-1.0-ffmpeg was replaced with gstreamer1.0-libav as far as I understand the docs and was installed by default in ubuntu 22.04.

The reason I was so confused that from a file source my pipeline string worked without the “resample” statement. But it turned out - not for all files. With the “resample” statement ALL files are correctly displayed.

Again thank you for your help.

Best regards Martin

When you get an “internal data stream error” there should usually be more details in the debug message part of the error message. It should contain a “reason” why streaming stopped, which might provide a hint as to what’s wrong. I suspect that in your case it was “reason: not-negotiated” which indicates a problem with the caps / format negotiation (often means a missing converter somewhere).

Good to hear it works now.

1 Like

My task was to output as much video/audio data as possible in various formats via a Blackmagic Monitor 4K card in an SDI data stream. My initial difficulties were resolved by Mr. Müller (tpm) with his extremely valuable advice. Thank you very much for this, it made my start much easier. The more I deal with gstreamer, the more I see the universal applicability and power of the procedure. At first it was a tool that had to be installed with Photomechanic - now I manage to replace playdeck.tv in 50% of the cases - and the trend is rising. To give those who are facing similar starting difficulties a little help, I have summarized my current notes in a table in the hope of being of some help:

stream a DV video from a dv camera:
sudo gst-launch-1.0 dv1394src ! queue ! dvdemux name=demuxer ! queue ! audioresample ! audioconvert ! decklinkaudiosink device-number=0 demuxer. ! queue ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25

stream a DV video from a file:
gst-launch-1.0 filesrc location=dvgrab-001.dv ! queue ! dvdemux name=demuxer ! queue ! audioresample ! audioconvert ! decklinkaudiosink device-number=0 demuxer. ! queue ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25

stream from a DVD:
gst-launch-1.0 -v dvdreadsrc title=“1” chapter=“1” angle=“1” device=///dev/cdrom ! queue ! mpegpsdemux name=demuxer ! queue ! ac3parse ! a52dec ! audioresample ! audioconvert ! decklinkaudiosink device-number=0 demuxer. ! queue ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25

stream DVD VOBs:
gst-launch-1.0 -v filesrc location=VTS_01_1.VOB ! queue ! mpegpsdemux name=demuxer ! queue ! ac3parse ! a52dec ! audioresample ! audioconvert ! decklinkaudiosink device-number=0 demuxer. ! queue ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25

stream from MP4 file (h264 AVC/h265 HEVC):
gst-launch-1.0 filesrc location=20231220_232536B.mp4 ! queue ! qtdemux name = demuxer ! queue ! avdec_aac ! audioresample ! audioconvert ! decklinkaudiosink device-number=0 demuxer. ! decodebin ! videoconvert ! deinterlace method=yadif ! videoconvert ! videoscale ! decklinkvideosink device-number=0 mode=1080p25

All pipes work under ubuntu 22.04 with Decklink support installed. If I have overlooked something or have formulated things awkwardly, I would be happy to hear from you.

Best Regards Martin