# Advice needed to build up a pipline with gstlaunch

**URL:** <https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555>\
**Category:** Newcomers\
**Created:** [November 17, 2023, 5:57am UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555 "2023-11-17T05:57:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![xenosun](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/xenosun/32/242_2.png) [@xenosun](https://discourse.gstreamer.org/u/xenosun)\
**Post date:** [November 17, 2023, 5:57am UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/1 "2023-11-17T05:57:46Z")

</div>

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 ?

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

any help appreciated … best regards martin
```

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [November 17, 2023, 10:31am UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/2 "2023-11-17T10:31:15Z")

</div>

> [@xenosun](#):
>
> `gst-launch-1.0 dv1394src ! … <additional steps> … ! decklinkvideosink device-number=0 mode=1080p25`

Not tested, but try something like this for starters:

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

```

---

<div class="post-metadata">

**Author:** ![xenosun](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/xenosun/32/242_2.png) [@xenosun](https://discourse.gstreamer.org/u/xenosun)\
**Post date:** [November 17, 2023, 11:36am UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/3 "2023-11-17T11:36:58Z")

</div>

tried it but unfortunately there is an error message:

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

---

<div class="post-metadata">

**Author:** ![xenosun](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/xenosun/32/242_2.png) [@xenosun](https://discourse.gstreamer.org/u/xenosun)\
**Post date:** [November 17, 2023, 11:47am UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/4 "2023-11-17T11:47:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xenosun](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/xenosun/32/242_2.png) [@xenosun](https://discourse.gstreamer.org/u/xenosun)\
**Post date:** [November 17, 2023, 3:45pm UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/5 "2023-11-17T15:45:49Z")

</div>

… 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

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [November 18, 2023, 10:10am UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/6 "2023-11-18T10:10:20Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![xenosun](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/xenosun/32/242_2.png) [@xenosun](https://discourse.gstreamer.org/u/xenosun)\
**Post date:** [November 18, 2023, 1:09pm UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/7 "2023-11-18T13:09:02Z")

</div>

> [@tpm](#):
>
> `audioresample`

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

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [November 18, 2023, 1:11pm UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/8 "2023-11-18T13:11:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xenosun](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/xenosun/32/242_2.png) [@xenosun](https://discourse.gstreamer.org/u/xenosun)\
**Post date:** [December 21, 2023, 2:05pm UTC](https://discourse.gstreamer.org/t/advice-needed-to-build-up-a-pipline-with-gstlaunch/555/9 "2023-12-21T14:05:36Z")

</div>

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](http://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
