teltek / Galicaster

The Galicaster Project is an open initiative to provide flexible, state-of-the-art solutions for recording educational multimedia contents like lectures and conferences
galicaster.teltek.es
Other
35 stars 31 forks source link

Recording with VisionLC-HD2 card does not stop correctly #506

Open smarquard opened 7 years ago

smarquard commented 7 years ago

We are testing the new Datapath LC-HD2 card:

https://www.datapath.co.uk/video-capture-cards/visionlc-range/visionlc-hd2

This is a dual-hdmi capture card, configured to expose both channels as /dev/dada0 and /dev/dada1 in /etc/modprobe.d/rgb200l.conf:

options rgb200 rgb133_expose_inputs=1

Galicaster is configured the same way it would be as with a Datapath E2S card.

[track3]
name = presentation
device = v4l2
flavor = presentation
location = /dev/dada0
file = presentation.avi
caps = video/x-raw,format=YUY2,framerate=25/1,width=1280,height=720
caps-preview = video/x-raw,framerate=1/1
active = True

[track4]
name = presentation2
device = v4l2
flavor = presentation
location = /dev/dada1
file = presentation2.avi
caps = video/x-raw,format=YUY2,framerate=25/1,width=1280,height=720
caps-preview = video/x-raw,framerate=1/1
active = True

The preview works correctly and starting a recording works correctly.

When the recording is stopped (manual recording), the following gstreamer error occurs:

0:00:23.623169158  3099      0x2f42ef0 WARN                    v4l2 v4l2_calls.c:620:gst_v4l2_open:<gc-v4l2-src> error: Could not open device '/dev/dada1' for reading and writing.
0:00:23.623178923  3099      0x2f42ef0 WARN                    v4l2 v4l2_calls.c:620:gst_v4l2_open:<gc-v4l2-src> error: system error: No such device

related to this /var/log/syslog entry:

Apr 19 12:50:10 testca kernel: [ 1139.283462] <6>rgb200: RealCaptureOpen: Device in use by maximum allowed number of clients 1
Apr 19 12:50:10 testca kernel: [ 1139.283466] <6>rgb200: APIOpenCapture: CaptureOpen failed(-19) [0][1][-1]
Apr 19 12:50:10 testca kernel: [ 1139.283467] rgb200: rgb133_open: APIOpenCapture failed(-19)

A simple gstreamer pipeline like this works correctly:

gst-launch-1.0 -vvv v4l2src device=/dev/dada1 ! xvimagesink

Datapath Support advises:

"For some reason, when you’re using it through Galicaster and try and stop the recording the Galicaster software is attempting to open a second client on the same device. Unfortunately the VisionLC range is limited to a single client and so when this happens the client opened to perform the ‘stop’ fails to open."

The same behaviour is seen when only 1 of the 2 channels is configured in Galicaster (e.g. just dada0).

smarquard commented 7 years ago

Also from Datapath Support:

"The E2s cards are able to use 16 simultaneous clients, so opening a new one to possibly query the device to perform the stop would not be an issue so long as there weren’t 16 video captures already in progress.

The LC range is strictly limited to a single client, hence why this issue is occurring now. I don’t think it will be timing related unless the new client is supposed to be opened after the existing client is stopped."

smarquard commented 7 years ago

Testing with GStreamer 1.10.4 on Ubuntu 16.04, it's now possible to start and stop recording.

The simple gstreamer pipeline:

gst-launch-1.0 -vvv v4l2src device=/dev/dada1 ! xvimagesink

also works correctly.

However, the Galicaster preview of that channel flashes between the actual image and a green screen.

smarquard commented 7 years ago

This now works correctly under these conditions:

  1. gstreamer 1.10.4 (or possibly newer versions; not tested)
  2. VisionLC driver v1.0.0.251
  3. In the track profile, use io-mode=rw (to work around a driver bug which Datapath is fixing)
  4. Remove the videobox element from the recording pipeline in the v4l2.py bin
smarquard commented 7 years ago

Issue #531 for gstreamer 1.10.4 support.

smarquard commented 7 years ago

There is a VisionLC 1.1 driver now released but it appears to have a different problem (causes Galicaster to lock up). We are working with Datapath to resolve this.

paulgration commented 7 years ago

Hi @smarquard, I wish I'd read through the current issues sooner, I've just been through exactly the same as you with issues relating to this card and Galicaster and performed a lot of the same debugging/testing. Is there any update on your work with Datapath on this issue? I am currently using the 1.1.1.264 beta driver from Datapath which is supposed to fix issues with freezing when stopping a capture. I haven't tried upgrading to gstreamer 1.10.4 with this as well yet though. I can't find a gstreamer 1.10.4 package available anywhere, did you use a PPA or build it from source? Have you tried the latest release/beta drivers from Datapath?

smarquard commented 7 years ago

I followed up today with Datapath, and the driver engineer is still working on the issue.

Our known-to-work configuration is the 1.0.0 driver with "io-mode=rw" in the Galicaster track configuration. That driver no longer seems to be available on Datapath's website though, so perhaps email support@datapath.co.uk and ask for a direct download link.

I believe we installed the 1.10 gstreamer from the PPAs for Ubuntu 17.04.

paulgration commented 7 years ago

I tried with Datapath's latest Vision LC driver yesterday (v1.1.1-265) with Galicaster 2 from the repo on Ubuntu 16.04 and didn't have any problems. I only tried making 3 recordings and haven't ingested them yet but I've watched the media back in VLC and it looks ok so far..

smarquard commented 7 years ago

Yes, we're now running this driver version on several production CAs. There is still maybe a slight issue in that gstreamer complains about lost frames which Datapath is looking into, but it doesn't seem to affect the recording.

andiempettJISC commented 6 years ago

i can confirm this card works well with the below config driver 1.1.1.268 kernel 4.10 gstreamer 10.4 /etc/modprobe.d/rgb200.sample.conf edit the below to expose both video inputs options rgb200 rgb133_expose_inputs=1

profile:

[data] name = Dual Datapath Split Audio

[track1] name = camera device = v4l2 flavor = presenter location = /dev/video0 file = presenter.avi caps = video/x-raw,format=YUY2,framerate=30/1,width=1280,height=720 videoencoder = x264enc pass=5 quantizer=17 bitrate=5120

[track2] name = screen device = v4l2 flavor = presentation location = /dev/video1 file = presentation.avi caps = video/x-raw,format=YUY2,framerate=30/1,width=1280,height=720 videoencoder = x264enc quantizer=22 speed-preset=2

[track3] name = AudioSource active = true flavor = presenter device = pulse location = default file = presenter.mp3 amplification = 1.0 vumeter = true delay = 0.21