TheImagingSource / tiscamera

The Linux SDK for The Imaging Source cameras.
https://www.theimagingsource.com
Apache License 2.0
297 stars 145 forks source link

Camera getting disconnected after run gstreamer pipeline code #514

Closed KushalBiyani closed 2 months ago

KushalBiyani commented 1 year ago

Issue We have created a docker image with Ubuntu 18.04 with the commands specified in the Building tiscamera on GitHub. We were able to list down the camera using tcam-ctrl -l command.

image

When we are starting the pipeline using below command : gst-launch-1.0 tcambin ! videoconvert ! ximagesink

we are getting the below error :

image

And while running this code our camera is getting disconnected every time and we are not able to receive any frames and not able to list down the camera also.

TIS-Edgar commented 1 year ago

Hi,

Could you set the following environment variable:

export GST_DEBUG=ximagesink:5,tcam-libtcam:5

This will enable debug output for our backend and the ximagesink.

Does tcam-capture work? Does the xvimagesink work? Does tiscamera work outside of the docker container?

The disconnects should also be logged in the debug output. Did you adjust the MTU to 9000?

KushalBiyani commented 1 year ago

Tiscamera is running outside the docker container. We are using docker desktop on windows machine form where we are able to receive the feeds on IC capture software.

The same container is running successfully on the Linux server and we are able to recieve the feed.

While running the tcam-ctrl -l command we are getting this output:

image

On running gst-launch-1.0 tcambin ! videoconvert ! ximagesink we were getting this output:

image

On running gst-launch-1.0 tcambin ! videoconvert ! xvimagesink we were getting this output:

image

On running tcam-capture we were getting this output:

image

On running the code from the app-sink.py file in Github example we get this error and camera also got disconnected :

image
TIS-Edgar commented 1 year ago

ximagesink and xvimagesink require a X-Server to work. Further confirmed by the message tcam-capture is giving you ("could not connect to display").

The message "Failed to create shmkey. Not using gige-daemon to enumerate devices." means the tcam-gige-daemon is not running, this slows indexing down but should not cause any timeouts.

Can you provide us with the dockerfile you are using? Since the camera works on the host system, we have to look into why the docker instance is having issues.

KushalBiyani commented 1 year ago

Docker file used for running docker container on Linux and windows. With this docker container, we are able to receive frames when we used a Linux server to run the docker but when we used the docker desktop to run this container we faced the above issue in receiving the frames.

Dockerfile:

FROM ubuntu:18.04
ENV TZ=Europe/Kiev
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get -y install
RUN apt-get install python3.6 python3-pip gstreamer1.0-tools iputils-ping vim -y
RUN pip3 install --upgrade pip

COPY requirements.txt .
COPY package_install_file.deb .
COPY tcamdutils_1.0.0.560_amd64.deb .
COPY tiscamera_1.0.0.4005_amd64_ubuntu_1804.deb .

RUN pip3 install -r requirements.txt
RUN apt install ./package_install_file.deb -y
RUN apt install ./tcamdutils_1.0.0.560_amd64.deb -y 
RUN apt install ./tiscamera_1.0.0.4005_amd64_ubuntu_1804.deb -y

COPY . .
CMD [ "python3", "test.py"]
TIS-Edgar commented 1 year ago

We are trying to find the cause of this issue. Docker on Windows makes things more "interesting" than needed.

Can you set the following environment variable export ARV_DEBUG=all:3

and capture the output of wireshark for us? You should have your native interface available and a WSL interface. Output of both would be of interest at this point.

Please disable host camera services before doing this.

You can send the capture to support -at_ theimagingsource.com referencing this issue so that potential confidential data will be handled as such.

TIS-Edgar commented 2 months ago

Closed due to inactivity.