karla

  • *****
  • 629
Re: New video gadget
« Reply #75 on: December 14, 2017, 08:38:14 am »
well, that might very well be an option to use another screen capture software to get all the action in to a video file...

karla

  • *****
  • 629
Re: New video gadget
« Reply #76 on: December 30, 2017, 12:32:26 pm »
Yes, it works fine to capture PFD and a Video feed as OSD in to one video with other software!



I found a Product test of different free screen recorders here:
http://www.techradar.com/news/the-best-free-screen-recorder

I choosed OBS Studio https://obsproject.com/
Its avaialble for MS, Mac and Linux,
but there are many more.

I put the camera on another vehicle, the heli doesnt have it ready yet, but will soon.
This software seems to handle the sound capture as well.

« Last Edit: December 30, 2017, 12:36:29 pm by karla »

Re: New video gadget
« Reply #77 on: February 18, 2018, 10:56:10 am »
Hi
I've compiled my own LP next version on Windows 10 and I've got gstreamer 1.12.4 installed.
When trying to apply the suggestions in this thread I'm able to see the video stream in the Video Gadget but my PFD in video mode shows a gray background instead of the video.
In the PDF video pipeline I've this:
Code: [Select]
intervideosrc ! timeoverlay halignment=left valignment=bottom shaded-background=true font-desc="Sans, 36" ! videoconvert ! video/x-raw,format=RGB ! appsink name=sink emit-signals=true
And in the Video Gadget this:
Code: [Select]
ksvideosrc device-index=1 ! decodebin ! tee name=t
    t. ! queue ! intervideosink
    t. ! queue ! autovideosink
    t. ! queue ! x264enc tune=zerolatency bitrate=498 ! mpegpsmux ! filesink location=capture.mpg
Any help is more than welcome.
Regards
M A

f5soh

  • *****
  • 4572
    • LibrePilot
Re: New video gadget
« Reply #78 on: February 18, 2018, 03:30:52 pm »
Did you try the pipelines mentioned here ?
You should have 'ksvideosrc' first for PFD, same as Video gadget.

filnet

  • *****
  • 113
Re: New video gadget
« Reply #79 on: February 18, 2018, 07:04:24 pm »
Hi michelamerica,

The pipelines you mention should work, and PFD should show video provided the Video Gadget pipeline is started.

Can you provide a log of GCS (by adding "-log log.txt" argument to the GCS command line).

PS: you don't need to install gstreamer as it is provided by msys2. I'd suggest to uninstall it if you don't need it elsewhere.

Re: New video gadget
« Reply #80 on: February 18, 2018, 07:49:04 pm »
Hi

Here is the gcs log file. I noticed there is an error concerning an empty pipeline:

CRT: VideoWidget::createPipelineFromDesc - "Failed to create pipeline: empty pipeline not allowed"

But when I check the configuration on the GCS both pipelines (Video Gadget and PFD video) are not empty...

Attached the full log file.

Regards

M A

karla

  • *****
  • 629
Re: New video gadget
« Reply #81 on: May 01, 2018, 06:50:56 am »
Hello,
I just upgraded to LP Next r711 and have some unexpected Video in the GCS.
https://forum.librepilot.org/index.php?topic=4263.0

I now get an unwanted, additional video window, whereas I only had one before in the PFD.
If I close it the video in the PFD also disappears.



I have the previous LP Next r589 also installed on the win pc and its unclear to me what GCS settings are actually used. Here is a screenshot of the settings.



How to get rid of the extra video window (the smaller one)?
« Last Edit: May 01, 2018, 06:55:32 am by karla »

filnet

  • *****
  • 113
Re: New video gadget
« Reply #82 on: May 01, 2018, 07:06:40 pm »
Looks like some kind of regression.

Changing the autovideosink to a d3dvideosink (in the USBCamera - Play gadget) should workaround the issue.

karla

  • *****
  • 629
Re: New video gadget
« Reply #83 on: May 02, 2018, 07:29:47 am »
Thank you filnet.

Not sure if I did what you suggested, but
I changed the Options settings for gadget Video, USB Camera - Play

from this:

ksvideosrc device-index=0 ! decodebin ! tee name=t
    t. ! queue ! intervideosink
    t. ! queue ! autovideosink

 
to this:

ksvideosrc device-index=0 ! decodebin ! tee name=t
    t. ! queue ! intervideosink
    t. ! queue ! d3dvideosink


It only resulted in no Video dislplay at all, no extra window, but no video in the PFD either :(

FYI, this is the setting for the PDF Video gadget:

intervideosrc ! videoconvert ! video/x-raw,format=RGB ! appsink name=sink emit-signals=true

I checked and the old settings are the same when using r711 as r589 and r589 is still working fine with nice video in PFD. So maybe something changed in this r711 version?
« Last Edit: May 02, 2018, 07:51:17 am by karla »

filnet

  • *****
  • 113
Re: New video gadget
« Reply #84 on: May 02, 2018, 08:18:40 am »
Hi karla,

Yes, there is a problem in the latest next.
It is due to changes to handle the latest GStreamer version (1.14.0) but unfortunately the packaged next that you are using was built with an older version of GStreamer (1.8.3) and is missing a few GStreamer plugins.

One workaround is to add the missing files manually.

Locate the .\lib\librepilot-gcs\gstreamer-1.0 directory in your r589 install and copy its full content to the corresponding directory in your r711 install.

PS: this is the change that broke video :
https://bitbucket.org/librepilot/librepilot/diff/ground/gcs/src/libs/gstreamer/copydata.pro?diff2=a4c0bcfb1a68&at=next&mode=edit&spa=0&fileviewer=file-view-default
« Last Edit: May 02, 2018, 08:23:16 am by filnet »

karla

  • *****
  • 629
Re: New video gadget
« Reply #85 on: May 02, 2018, 09:24:20 am »
Yes filnet!
It works now
Hero!

andyp

  • **
  • 52
New Video Gadget - Hauppauge USB Live 2
« Reply #86 on: May 23, 2018, 11:10:11 am »
I am trying the last next branch with Hauppauge USB Live 2 and I am not getting it working. USB Camera works fine.

Following console output:

setting pipeline ksvideosrc device-index= 1 ! decodebin ! videoconvert ! autovideosink
starting...
StateChange: element pipeline1 changed state from Null to Ready
StateChange: element pipeline1 changed state from Ready to Paused
NewClock : element pipeline1 has new clock GstSystemClock
Info: element pipeline1 sent info event: Unhandled message (stream-start)
PrepareWindowId: element autovideosink0-actual-sink-d3dvideo prepare window id
Error: element ksvideosrc1 sent error event: failed to start capture (0x0000048f) (../../../gst-plugins-bad-1.8.3/sys/winks/gstksvideosrc.c(963): gst_ks_video_src_create (): /GstPipeline:pipeline1/GstKsVideoSrc:ksvideosrc1:
failed to change pin state to KSSTATE_RUN)
Error: element ksvideosrc1 sent error event: Internal data flow error. (../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline1/GstKsVideoSrc:ksvideosrc1:
streaming task paused, reason error (-5))
StateChange: element pipeline1 changed state from Paused to Ready

Can anyone help?

filnet

  • *****
  • 113
Re: New Video Gadget - Hauppauge USB Live 2
« Reply #87 on: May 23, 2018, 03:25:04 pm »
Hi andyp,

Can anyone help?

Most probably some compatibility issue with your hardware.
Can you get video from your hardware using another application ?
Are there ways to configure your hardware and, if yes, what options do you have.

You might also want to google "failed to change pin state to KSSTATE_RUN".


andyp

  • **
  • 52
Re: New video gadget
« Reply #88 on: May 23, 2018, 11:51:26 pm »
No trouble with virtualdub or the application of Hauppauge.

filnet

  • *****
  • 113
Re: New video gadget
« Reply #89 on: May 24, 2018, 09:42:07 pm »
@andyp, If you are feeling bold then you can try to compile next yourself.
You'll get a much more recent version of GStreamer (1.14.1 vs 1.8.3 for the shipped version).

PS : also make sure that no other application is using your device when using it from LP GCS.
« Last Edit: May 24, 2018, 09:51:29 pm by filnet »