# Gstreamer in win10

**URL:** <https://discuss.bluerobotics.com/t/gstreamer-in-win10/558>\
**Category:** BlueROV2\
**Created:** [November 21, 2016, 9:09pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558 "2016-11-21T21:09:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [November 21, 2016, 9:09pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/1 "2016-11-21T21:09:06Z")

</div>

Hi there.

I would like to have an additional video streaming window in my PC, independently from QGC (which works fine).

I have downloaded Gstreamer v.1.5.2, and I have created a .bat file as follows:

```auto
@echo off
cd C:\gstreamer\1.0\x86\bin
gst-launch-1.0 -e -vvv udpsrc port=5600 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false

```

However no video window appears…

All I get to CLI window is:

```auto
WARNING: no real random source present!
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstD3DVideoSink:fps-display-video_sink-actual-sink-d3dvideo: sync = false
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

```

Any ideas?

Thanks in advance,  
Vagelis

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [November 23, 2016, 5:07am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/2 "2016-11-23T05:07:56Z")

</div>

This works for me in linux. Have you tried running that command while qgc is not running?

&nbsp;

This one also works for me

> gst-launch-1.0 -e -v udpsrc port=5600 ! application/x-rtp, payload=96 ! rtph264depay ! avdec\_h264 ! autovideosink

-Jacob

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [November 23, 2016, 8:17pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/3 "2016-11-23T20:17:37Z")

</div>

Hello Jacob and thank you for your answer.

The same command works fine on a linux machine - you have to disconnect qgc to get video screen.

Just tried both commands (yours and mine) after having first closed qgc and worked perfectly.

So the key here was that I should have firstly close qgc.

A couple of additional questions:

1. Is there a way to run qgc and gst-launch in parallel?
2. How can I save the streaming video in a file?

Thanks in advance,

Vagelis

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [November 29, 2016, 3:15am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/4 "2016-11-29T03:15:16Z")

</div>

Vagelis,

This command will run the video in a separate window, as well as qgc, and save the video to file. You need to set QGC to look at a different port, like 5700. This can be done in the latest daily builds, at the bottom of the ‘General’ tab when you click the Q icon in the upper left.

gst-launch-1.0 -e -v udpsrc port=5600 ! tee name=STREAMOUT ! tee name=VIDEOWINDOW ! queue ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! mp4mux ! filesink location= **/path/to/save/myvideo.mp4** STREAMOUT. ! queue ! udpsink port= **5700** VIDEOWINDOW. ! queue ! application/x-rtp, payload=96 ! rtph264depay ! avdec\_h264 ! autovideosink

-Jacob

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [November 29, 2016, 9:46am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/5 "2016-11-29T09:46:40Z")

</div>

Wow! Thanks! I will try it and let you know the results!

Vagelis

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [November 29, 2016, 6:44pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/6 "2016-11-29T18:44:46Z")

</div>

Thanks again Jacob.

Works perfectly!

The only problem I see is that the file it produces is huge (250 MB for 1:38)

Is there a way to compress it more?

Vagelis

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [December 5, 2016, 9:21pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/7 "2016-12-05T21:21:00Z")

</div>

Hi again Jacob.

Suddenly both commands you provided are not working anymore.  
The video screen shows a green screen.

FYI, when I open QGC the video shows perfectly.

The above is true on both Linux and Windows.

Any ideas?

BR,  
Vagelis

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [December 11, 2016, 9:29pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/8 "2016-12-11T21:29:59Z")

</div>

Somehow the problem was disappeared!  
I don’t know why, but now (6 days after) it works again!

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [February 8, 2017, 9:39am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/9 "2017-02-08T09:39:39Z")

</div>

@jwalser  
Although in linux the command-line you proposed works fine, in windows-10 I get an error message:

> ERROR: from element /GstPipeline:pipeline0/GstQueue:queue1: Internal data flow error.  
> Additional debug info:  
> gstqueue.c(970): gst\_queue\_handle\_sink\_event (): /GstPipeline:pipeline0/GstQueue:queue1:  
> streaming task paused, reason error (-5)

Any ideas?

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [February 8, 2017, 3:38pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/10 "2017-02-08T15:38:42Z")

</div>

Is that the entire output after you enter the command, or is there more before the error bit? Try doing `gst-inspect-1.0 queue` on both machines and compare the output, particularly the version of the plugin.

-Jacob

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [February 8, 2017, 5:23pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/11 "2017-02-08T17:23:46Z")

</div>

Hi Jacob and thanks for your response.

I am not in my lab, so I will reply tomorrow with additional data.  
Out of my memory I can tell that before that in both machines it says something about opening pipelines etc.

I’m not sure i understand how to use “gst-inspect-1.0 queue” though (but I’ll give it a try and let you know the results).

V.

---

<div class="post-metadata">

**Author:** ![Altum\_Operations](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/altum_operations/32/719_2.png) [@Altum\_Operations](https://discuss.bluerobotics.com/u/Altum_Operations)\
**Post date:** [February 8, 2017, 7:18pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/12 "2017-02-08T19:18:32Z")

</div>

Hi @jwalser

> [@jwalser](#):
>
> gst-launch-1.0 -e -v udpsrc port=5600 ! tee name=STREAMOUT ! tee name=VIDEOWINDOW ! queue ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! mp4mux ! filesink location=/path/to/save/myvideo.mp4 STREAMOUT. ! queue ! udpsink port=5700 VIDEOWINDOW. ! queue ! application/x-rtp, payload=96 ! rtph264depay ! avdec\_h264 ! autovideosink

Would I be able to run this same code in GStreamer on my OS X machine?  
Regards,  
Tobin Cox

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [February 8, 2017, 7:23pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/13 "2017-02-08T19:23:39Z")

</div>

If you have gstreamer installed, yes, I believe so.

-Jacob

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [February 9, 2017, 10:46am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/14 "2017-02-09T10:46:57Z")

</div>

@jwalser  
Hi again Jacob.

So here are the gst-inspect-1.0 queue" results:

Linux Debian PC:  
queue gst plugin version: 1.4.4

Win10 PC:  
queue gst plugin version: 1.5.2

In the meanwhile, as I was digging, I stopped having video signal in both QGC and gstreamer and in both machines (Win10 and linux) …  
IP addresses are ok, 5600 port is used, QGC / gstreamer don’t run in parallel.  
QGC remains with “no-video” (5600 udp port is used) and gstreamer does not open the video window.  
When QGC runs, I can control the ROV (e.g. i can change flight mode, compass and art. horizon work ok)

Any ideas?

This is what I get on the linux machine:  
$ gst-launch-1.0 -e -v udpsrc port=5600 ! application/x-rtp, payload=96 ! rtph264depay ! avdec\_h264 ! autovideosink  
Setting pipeline to PAUSED …  
libva info: VA-API version 0.36.0  
libva info: va\_getDriverName() returns 0  
libva info: Trying to open /usr/lib/x86\_64-linux-gnu/dri/i965\_drv\_video.so  
libva info: Found init function \_\_vaDriverInit\_0\_36  
libva info: va\_openDriver() returns 0  
Pipeline is live and does not need PREROLL …  
Setting pipeline to PLAYING …  
New clock: GstSystemClock

And this is what I get on the Win10 machine with the same cmd-line:  
WARNING: not real random source present!  
Setting pipeline to PAUSED …  
Pipeline is live and does not need PREROLL …  
Setting pipeline to PLAYING …  
New clock: GstSystemClock

Vagelis

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [February 9, 2017, 3:22pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/15 "2017-02-09T15:22:37Z")

</div>

Try this [troubleshooting section](http://ardusub.com/troubleshooting/#no-video) to check on the Pi side if the camera is working.

-Jacob

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [February 13, 2017, 8:54am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/16 "2017-02-13T08:54:39Z")

</div>

Troubleshooting revealed the problem (loose camera cable connection @Raspberry board), and now QGC shows video.

@jwalser: However i still cannot get video signal using the “tee” command on Win10. The only message i receive when giving the command is the same as above:

_WARNING: not real random source present!_  
_Setting pipeline to PAUSED …_  
_Pipeline is live and does not need PREROLL …_  
_Setting pipeline to PLAYING …_  
_New clock: GstSystemClock_

The file “myvideo.mp4” is created but it is empty

Also, if i give the single video streaming command:  
_gst-launch-1.0 -e -v udpsrc port=5600 ! application/x-rtp, payload=96 ! rtph264depay ! avdec\_h264 ! autovideosink_

the video window shows up and video is shown perfectly right.

UPDATE: for @jwalser / maybe @rjehangir should have a look?  
It looks that the problem was not the (what I thought) loose cable.  
Video starts and stops at will in random time intervals.  
And when it works, the above commands work perfectly.

I followed troubleshooting - without success.  
I changed camera cable, and the camera itself without success.  
So I return to my first thought: can it be a software problem caused by a “sudo rpi-update” for example?  
Please help, as it drives me crazy…  
An additional “clue” may be that when i ordered a rpi-update, it finishes with the following:

\*\*\* Updating firmware  
\*\*\* Updating kernel modules  
\*\*\* depmod 4.4.48-v7+  
\*\*\* depmod 4.4.48+  
\*\*\* Updating VideoCore libraries  
\*\*\* Using HardFP libraries  
cp: cannot create regular file ‘//opt/vc/bin/raspivid’: Text file busy

Vagelis

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [February 13, 2017, 3:38pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/17 "2017-02-13T15:38:10Z")

</div>

Try doing `sudo rpi-update` without the streaming process running. To stop the streaming process, do `sudo screen -X -S video quit`.

Let me know if anything changes.

> [@vagelis-chalkiadakis](#):
>
> Video starts and stops at will in random time intervals.And when it works, the above commands work perfectly.

How are you determining this, do you see video starting and stopping in a videosink window or QGC? Which command are you referring to?

-Jacob

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [February 13, 2017, 7:39pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/18 "2017-02-13T19:39:41Z")

</div>

Thanks @jwalser

I will try tomorrow (our time) your proposal.

Answering your question:  
trying both gst-launch commands in both win10 and linux systems, the stream sometimes starts and then stops, sometimes starts after some delay and then stops, sometimes never starts (in approx 10 minutes).

The same is true with QGC in both PCs, while telemetry works perfectly all the time.

That’s why I thought ti was the camera or the camera-cable. I replace both with similar results.

Let’s hope it is the incomplete rpi-update. Otherwise the only thing I have not replace is Raspberry and its software…  
We will know in the next 14-15 hours 😉

Thanks for your support,  
Vagelis

---

<div class="post-metadata">

**Author:** ![vagelis-chalkiadakis](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/vagelis-chalkiadakis/32/830_2.png) [@vagelis-chalkiadakis](https://discuss.bluerobotics.com/u/vagelis-chalkiadakis)\
**Post date:** [February 14, 2017, 7:37am UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/19 "2017-02-14T07:37:06Z")

</div>

@jwalser: Problem solved Jacob!!  
The incomplete rpi-update was the real problem for all the above.

The only remaining issue (was not an issue in the past when we were using the “daily” QGC versions) is that I cannot make QGC 3.1.2 to look @port 5700 (where the gst-launch tee the video stream)

Thanks a lot Jacob!  
I really appreciate your “first class” support!

Vagelis

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [February 14, 2017, 6:20pm UTC](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558/20 "2017-02-14T18:20:39Z")

</div>

Interesting on the point of 3.1.2, I still have this option in Ubuntu, what operating system are you using? An alternative would be to edit the [video launch script](https://github.com/bluerobotics/companion/blob/master/RPI2/Raspbian/start_video.sh#L44) on the pi to send the stream from the raspberry pi to a different port, then tee it to 5600.

[Next page](https://discuss.bluerobotics.com/t/gstreamer-in-win10/558.md?page=2)
