Camerabin error internal data stream error

Не работает web камера Пишу приложение на Qt5 для захвата web камеры. Это зависит от gstreamer. gstreamer установлен, а как его настроить в данном случае? Зависит от дистра. На gentoo нужно было собирать с такими флагами: ага, сейчас попробую, спасибо Поставил разрешение 640х480 и заработало, но камера 2Мп, если ставить выше разрешение, то та […]

Содержание

  1. Не работает web камера
  2. QCamera gstreamer issue on Ubuntu 19.04
  3. Details
  4. Description
  5. Camerabin error internal data stream error
  6. QCamera gstreamer issue on Ubuntu 19.04
  7. Details
  8. Description
  9. v4l2src0 error internal data stream error #461
  10. Comments

Не работает web камера

Пишу приложение на Qt5 для захвата web камеры.

Это зависит от gstreamer.

gstreamer установлен, а как его настроить в данном случае?

Зависит от дистра. На gentoo нужно было собирать с такими флагами:

ага, сейчас попробую, спасибо

Поставил разрешение 640х480 и заработало, но камера 2Мп, если ставить выше разрешение, то та же ошибка.

На коробке написано? Это ничего не значит. У меня была web камера, которая под виндой могла в большее разрешение, чем под линуксом. Всё дело в драйверах.

А как это проверить? и возможно ли?

Так я у тебя и спросил, откуда ты узнал про 2 МП? Из надписи на коробке или у тебя в линуксе в какой-то другой программе показывает на полном разрешении?

А так загружайся в винду, ставь дрова и софт от производителя и смотри.

И ещё. Эти 2МП могут оказаться маркетинговыми. Т.е. разрешение матрицы меньше, но чип программно масштабирует картинку. В таком случае гнаться за ними не стоит.

Источник

QCamera gstreamer issue on Ubuntu 19.04

Details

Description

Application using QCamera on Ubuntu 19.04 does not start up webcam.

Notes: Webcam works with guvcview. QCamera-based application works on Ubuntu 16.04.

To reproduce the problem, build and run Qt Multimedia Camera example.

  • Camera application starts up but the webcam does not.
  • The view in the Camera application is black.
  • In the Camera application, under the devices menu, the webcam is selected.

In the application output in Qt Creator shows:

(camera:15203): GStreamer-CRITICAL **: 17:03:42.747: gst_pad_get_current_caps: assertion ‘GST_IS_PAD (pad)’ failed

(camera:15203): GLib-GObject-CRITICAL **: 17:03:42.747: g_object_set: assertion ‘G_IS_OBJECT (object)’ failed

(camera:15203): GLib-GObject-CRITICAL **: 17:03:42.747: g_object_set: assertion ‘G_IS_OBJECT (object)’ failed

CameraBin error: «GStreamer error: negotiation problem.»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

CameraBin error: «Internal data stream error.»

QWidget::paintEngine: Should no longer be called

QWidget::paintEngine: Should no longer be called

Источник

Camerabin error internal data stream error

Can someone tell me?
Why do I use QT’s official demo to run the camera,There will be mistakes?
development environment:Qt5.11.3, arm mp157 development board, Debian system

Just like this, camerabin error: «internal data stream error.»

I don’t know how to debug. Can someone help me

Hi and welcome to devnet,

Use GStreamer on the command line to check whether your camera works correctly.

You should also inspect your device logs just in case the device is acting up.

My camera can use the GST command to take pictures and video recording,

But I didn’t find the GST command to preview the camera image directly on the touch screen, which drives is linxufb,

QT official camera demo can run, completely OK in the window, but the same USB camera on the arm development board can only run for a period of time, and then it will report an error

CameraBin error: «Internal data stream error.»

I can not output more debug info,I don’t know if the error came from the camera driver or QT demo

Did you check your target system logs ? Kernel logs ?

As for the output on the frame buffer, looks like fbdevsink would be indicated.

@SGaist Yes, I checked the dmesg log
The camera driver seems to be OK, and I have output the camera preview image to the touch screen. The GST command is like this:»gst-launch-1.0 -v v4l2src device=/dev/video0 ! fbdevsink»

I’m confused that I started the application in the form of eglfs, or tried other platforms and development boards, and the camera program worked well. But on the 157 development board, using linuxfb, he crashed.

There seems to be no problem with the camera driver and the program, but it just crashed.

Now, I plan to use the GST command in a thread to achieve preview.

Источник

QCamera gstreamer issue on Ubuntu 19.04

Details

Description

Application using QCamera on Ubuntu 19.04 does not start up webcam.

Notes: Webcam works with guvcview. QCamera-based application works on Ubuntu 16.04.

To reproduce the problem, build and run Qt Multimedia Camera example.

  • Camera application starts up but the webcam does not.
  • The view in the Camera application is black.
  • In the Camera application, under the devices menu, the webcam is selected.

In the application output in Qt Creator shows:

(camera:15203): GStreamer-CRITICAL **: 17:03:42.747: gst_pad_get_current_caps: assertion ‘GST_IS_PAD (pad)’ failed

(camera:15203): GLib-GObject-CRITICAL **: 17:03:42.747: g_object_set: assertion ‘G_IS_OBJECT (object)’ failed

(camera:15203): GLib-GObject-CRITICAL **: 17:03:42.747: g_object_set: assertion ‘G_IS_OBJECT (object)’ failed

CameraBin error: «GStreamer error: negotiation problem.»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

Unable to query the parameter info: «Invalid argument»

CameraBin error: «Internal data stream error.»

QWidget::paintEngine: Should no longer be called

QWidget::paintEngine: Should no longer be called

Источник

v4l2src0 error internal data stream error #461

[gstreamer] initialized gstreamer, version 1.14.5.0
[gstreamer] gstCamera attempting to initialize with GST_SOURCE_NVARGUS, camera /dev/video0
[gstreamer] gstCamera pipeline string:
v4l2src device=/dev/video0 ! video/x-raw, width=(int)1920, height=(int)720, format=YUY2 ! videoconvert ! video/x-raw, format=RGB ! videoconvert !appsink name=mysink
[gstreamer] gstCamera successfully initialized with GST_SOURCE_V4L2, camera /dev/video0
jetson.utils — PyDisplay_New()
jetson.utils — PyDisplay_Init()
[OpenGL] glDisplay — X screen 0 resolution: 1920×1080
[OpenGL] glDisplay — display device initialized
100mm

[gstreamer] opening gstCamera for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> videoconvert1
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> videoconvert0
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter0
[gstreamer] gstreamer changed state from NULL to READY ==> v4l2src0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> videoconvert1
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from READY to PAUSED ==> videoconvert0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> v4l2src0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer msg new-clock ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videoconvert1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> videoconvert0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> v4l2src0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer msg stream-start ==> pipeline0
[gstreamer] gstCamera onEOS
[gstreamer] gstreamer v4l2src0 ERROR Internal data stream error.
[gstreamer] gstreamer Debugging info: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink

The text was updated successfully, but these errors were encountered:

Источник

Hello Folks,

  • Device : RPi 3
  • What I’m trying to achieve:
    Roll over 4 USB camera displaying their video stream.

Right know, I got in a single thread, a state machine that roll over all the four camera (every 10 sec I switch) but time to time I got that internal data stream error (I have like 10 other thread for other module).

I got the exact same error with the qt camera example when I want to switch camera.

It might because, I got some library that are missing?
All the gstreamer relatives library that I installed are:

baresip-gstreamer/oldstable 0.5.0-4 armhf
deejayd-gstreamer/oldstable 0.10.0-6 all
fso-deviced-player-gstreamer/oldstable 0.12.0-7 armhf
gir1.2-gstreamer-0.10/oldstable 0.10.36-1.5 armhf
gir1.2-gstreamer-1.0/oldstable,now 1.10.4-1 armhf [installed,automatic]
gnome-twitch-player-backend-gstreamer-cairo/oldstable 0.3.1-1 armhf
gnome-twitch-player-backend-gstreamer-clutter/oldstable 0.3.1-1 armhf
gnome-twitch-player-backend-gstreamer-opengl/oldstable 0.3.1-1 armhf
gstreamer-qapt/oldstable 3.0.2-1+b1 armhf
gstreamer-tools/oldstable 0.10.36-1.5 armhf
gstreamer0.10-alsa/oldstable 0.10.36-2 armhf
gstreamer0.10-buzztard/oldstable 0.5.0-2+deb7u1 armhf
gstreamer0.10-buzztard-doc/oldstable 0.5.0-2+deb7u1 all
gstreamer0.10-chromaprint/oldstable 0.1-3+b1 armhf
gstreamer0.10-doc/oldstable,stable 0.10.36-1.5 all
gstreamer0.10-dvswitch/oldstable 0.0.1-1 armhf
gstreamer0.10-gconf/oldstable 0.10.31-3+nmu4+b1 armhf
gstreamer0.10-gnomevfs/oldstable 0.10.36-2 armhf
gstreamer0.10-gnonlin/oldstable 0.10.17-2 armhf
gstreamer0.10-gnonlin-dbg/oldstable 0.10.17-2 armhf
gstreamer0.10-gnonlin-doc/oldstable 0.10.17-2 all
gstreamer0.10-hplugins/oldstable 0.2.0-2 armhf
gstreamer0.10-plugins-base/oldstable 0.10.36-2 armhf
gstreamer0.10-plugins-base-apps/oldstable 0.10.36-2 armhf
gstreamer0.10-plugins-base-dbg/oldstable 0.10.36-2 armhf
gstreamer0.10-plugins-base-doc/oldstable,stable 0.10.36-2 all
gstreamer0.10-plugins-cutter/oldstable 1.1.7-1.2 armhf
gstreamer0.10-plugins-good/oldstable 0.10.31-3+nmu4+b1 armhf
gstreamer0.10-plugins-good-dbg/oldstable 0.10.31-3+nmu4+b1 armhf
gstreamer0.10-plugins-good-doc/oldstable 0.10.31-3+nmu4 all
gstreamer0.10-plugins-ugly/oldstable 0.10.19-2.1+b4 armhf
gstreamer0.10-plugins-ugly-dbg/oldstable 0.10.19-2.1+b4 armhf
gstreamer0.10-plugins-ugly-doc/oldstable 0.10.19-2.1 all
gstreamer0.10-pulseaudio/oldstable 0.10.31-3+nmu4+b1 armhf
gstreamer0.10-qapt/oldstable 3.0.2-1 all
gstreamer0.10-tools/oldstable 0.10.36-1.5 armhf
gstreamer0.10-x/oldstable 0.10.36-2 armhf
gstreamer1.0-alsa/oldstable,now 1.10.4-1+deb9u1 armhf [installed,automatic]
gstreamer1.0-clutter/oldstable 2.0.18-1 armhf
gstreamer1.0-clutter-3.0/oldstable 3.0.24-1 armhf
gstreamer1.0-doc/oldstable,now 1.10.4-1 all [installed,automatic]
gstreamer1.0-dvswitch/oldstable 0.1.1-1 armhf
gstreamer1.0-espeak/oldstable 0.4.0-2 armhf
gstreamer1.0-fluendo-mp3/oldstable 0.10.32.debian-1 armhf
gstreamer1.0-gnonlin/oldstable 1.4.0-2 armhf
gstreamer1.0-gnonlin-dbg/oldstable 1.4.0-2 armhf
gstreamer1.0-gnonlin-doc/oldstable 1.4.0-2 all
gstreamer1.0-libav/oldstable 1.10.4-1 armhf
gstreamer1.0-libav-dbg/oldstable 1.10.4-1 armhf
gstreamer1.0-nice/oldstable 0.1.13-2 armhf
gstreamer1.0-omx/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-bellagio-config/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-dbg/oldstable 1.0.0.1-0+rpi12+jessiepmg armhf
gstreamer1.0-omx-generic/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-generic-config/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-generic-dbgsym/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-rpi/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-rpi-config/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-omx-rpi-dbgsym/stable 1.10.4-1+rpt3 armhf
gstreamer1.0-packagekit/oldstable 1.1.5-2+deb9u1 armhf
gstreamer1.0-plugins-bad/oldstable,now 1.10.4-1 armhf [installed]
gstreamer1.0-plugins-bad-dbg/oldstable,now 1.10.4-1 armhf [installed]
gstreamer1.0-plugins-bad-doc/oldstable,now 1.10.4-1 all [installed]
gstreamer1.0-plugins-base/oldstable,now 1.10.4-1+deb9u1 armhf [installed]
gstreamer1.0-plugins-base-apps/oldstable,now 1.10.4-1+deb9u1 armhf [installed]
gstreamer1.0-plugins-base-dbg/oldstable,now 1.10.4-1+deb9u1 armhf [installed]
gstreamer1.0-plugins-base-doc/oldstable,now 1.10.4-1+deb9u1 all [installed]
gstreamer1.0-plugins-good/oldstable,now 1.10.4-1 armhf [installed]
gstreamer1.0-plugins-good-dbg/oldstable,now 1.10.4-1 armhf [installed]
gstreamer1.0-plugins-good-doc/oldstable,now 1.10.4-1 all [installed]
gstreamer1.0-plugins-ugly/oldstable,now 1.10.4-1 armhf [installed]
gstreamer1.0-plugins-ugly-dbg/oldstable,now 1.10.4-1 armhf [installed]
gstreamer1.0-plugins-ugly-doc/oldstable,now 1.10.4-1 all [installed]
gstreamer1.0-pocketsphinx/oldstable 0.8+5prealpha-2 armhf
gstreamer1.0-pulseaudio/oldstable,now 1.10.4-1 armhf [installed,automatic]
gstreamer1.0-rtsp/oldstable 1.10.4-1 armhf
gstreamer1.0-rtsp-dbg/oldstable 1.10.4-1 armhf
gstreamer1.0-tools/oldstable,now 1.10.4-1 armhf [installed,automatic]
gstreamer1.0-vaapi/oldstable 1.10.4-1+b1 armhf
gstreamer1.0-vaapi-doc/oldstable 1.10.4-1 all
gstreamer1.0-x/oldstable,now 1.10.4-1+deb9u1 armhf [installed,automatic]
libcanberra-gstreamer/oldstable 0.30-3+b2 armhf
libghc-tagstream-conduit-dev/oldstable 0.5.5.3-7 armhf
libghc-tagstream-conduit-doc/oldstable 0.5.5.3-7 all
libghc-tagstream-conduit-prof/oldstable 0.5.5.3-7 armhf
libgstreamer-interfaces-perl/oldstable 0.06-2+b4 armhf
libgstreamer-ocaml/oldstable 0.2.0-2+b2 armhf
libgstreamer-ocaml-dev/oldstable 0.2.0-2+b2 armhf
libgstreamer-perl/oldstable 0.19-1+b3 armhf
libgstreamer-plugins-bad1.0-0/oldstable,now 1.10.4-1 armhf [installed]
libgstreamer-plugins-bad1.0-dev/oldstable,now 1.10.4-1 armhf [installed]
libgstreamer-plugins-base0.10-0/oldstable 0.10.36-2 armhf
libgstreamer-plugins-base0.10-dev/oldstable 0.10.36-2 armhf
libgstreamer-plugins-base1.0-0/oldstable,now 1.10.4-1+deb9u1 armhf [installed,automatic]
libgstreamer-plugins-base1.0-dev/oldstable,now 1.10.4-1+deb9u1 armhf [installed]
libgstreamer0.10-0/oldstable 0.10.36-1.5 armhf
libgstreamer0.10-0-dbg/oldstable 0.10.36-1.5 armhf
libgstreamer0.10-dev/oldstable 0.10.36-1.5 armhf
libgstreamer1.0-0/oldstable,now 1.10.4-1 armhf [installed,automatic]
libgstreamer1.0-0-dbg/oldstable 1.10.4-1 armhf
libgstreamer1.0-dev/oldstable,now 1.10.4-1 armhf [installed]
libgstreamerd-3-0/oldstable 3.3.1-2 armhf
libgstreamerd-3-dev/oldstable 3.3.1-2 armhf
libgstreamermm-1.0-1/oldstable 1.8.0+dfsg-1 armhf
libgstreamermm-1.0-dev/oldstable 1.8.0+dfsg-1 armhf
libgstreamermm-1.0-doc/oldstable 1.8.0+dfsg-1 all
libqt5gstreamer-1.0-0/oldstable 1.2.0-4 armhf
libqt5gstreamer-dev/oldstable 1.2.0-4 armhf
libqt5gstreamerquick-1.0-0/oldstable 1.2.0-4 armhf
libqt5gstreamerui-1.0-0/oldstable 1.2.0-4 armhf
libqt5gstreamerutils-1.0-0/oldstable 1.2.0-4 armhf
libqtgstreamer-1.0-0/oldstable 1.2.0-4 armhf
libqtgstreamer-dev/oldstable 1.2.0-4 armhf
libqtgstreamerui-1.0-0/oldstable 1.2.0-4 armhf
libqtgstreamerutils-1.0-0/oldstable 1.2.0-4 armhf
libreoffice-avmedia-backend-gstreamer/oldstable 1:5.2.7-1+rpi1+deb9u9 armhf
liquidsoap-plugin-gstreamer/oldstable 1.1.1-7.1+b1 armhf
mkchromecast-gstreamer/oldstable 0.3.7+git20170130-2 all
phonon-backend-gstreamer/oldstable 4:4.9.0-1 armhf
phonon-backend-gstreamer-common/oldstable 4:4.9.0-1 armhf
phonon4qt5-backend-gstreamer/oldstable 4:4.9.0-1 armhf
qml-module-qtgstreamer/oldstable 1.2.0-4 armhf
qt5gstreamer-dbg/oldstable 1.2.0-4 armhf
qtgstreamer-dbg/oldstable 1.2.0-4 armhf
qtgstreamer-declarative/oldstable 1.2.0-4 armhf
qtgstreamer-doc/oldstable 1.2.0-4 all
qtgstreamer-plugins/oldstable 1.2.0-4 armhf
qtgstreamer-plugins-qt5/oldstable 1.2.0-4 armhf
ruby-gstreamer/oldstable 3.1.0-1+deb9u1 armhf

A short resume of my code:

void popupavancement::rollCamera()
{
    /*
     * Roulement des caméras chaque index ne possède qu'une caméra
     *
    */

    /* On set la caméra sur le viewer du layout camera */
    if(max_camera != 0)
    {
        setCamera();

        if( index_camera < (max_camera - 1))
        {
            index_camera = (enum camera) (index_camera + 1);
        }
        else
        {
            index_camera = VertexG;
        }
    }

}
int popupavancement::setCamera()
{

    int res = 1;
    CameraList::iterator itfirst;
    SubCameraList::iterator itsecond;

    qCInfo(logger) << QString("set de la camera: %1").arg(index_camera);

    switch(index_camera)
    {
        case VertexG:

                itfirst = m_CameraList.find(VELVET_MODULE_VERTEX);

                if (itfirst != m_CameraList.end())
                {
                    itsecond = itfirst->second.find(VELVET_EYE_LEFT);

                    if (itsecond != itfirst->second.end())
                    {
                        if(m_modules[VELVET_MODULE_VERTEX][VELVET_EYE_LEFT]->is_enable() &&
                                !m_modules[VELVET_MODULE_VERTEX][VELVET_EYE_LEFT]->is_missing())
                        {
                            m_camera.reset(new QCamera(m_CameraList[VELVET_MODULE_VERTEX][VELVET_EYE_LEFT]));
                            start(VELVET_MODULE_VERTEX, VELVET_EYE_LEFT);
                            break;
                        }
                        else
                        {
                           index_camera = (enum camera) (index_camera + 1);
                           // On passe sur Vertex Droit
                        }

                    }
                }
                else
                {
                 qCCritical(logger) << "Module non présent";
                 res = -1;
                 break;
                }

       ...
        case AlignementD:

                itfirst = m_CameraList.find(VELVET_MODULE_ALIGNEMENT);

                if (itfirst != m_CameraList.end())
                {
                    itsecond = itfirst->second.find(VELVET_EYE_RIGHT);

                    if (itsecond != itfirst->second.end())
                    {
                        if(m_modules[VELVET_MODULE_ALIGNEMENT][VELVET_EYE_RIGHT]->is_enable() &&
                                !m_modules[VELVET_MODULE_ALIGNEMENT][VELVET_EYE_RIGHT]->is_missing())
                        {
                            m_camera.reset(new QCamera(m_CameraList[VELVET_MODULE_ALIGNEMENT][VELVET_EYE_RIGHT]));
                            start(VELVET_MODULE_ALIGNEMENT, VELVET_EYE_RIGHT);
                            break;
                        }
                        else
                        {
                            index_camera = VertexG;
                            // On passe sur Vertex Gauche
                            setCamera();

                        }

                    }
                }
                else
                {
                 qCInfo(logger) << "Module non présent";
                 res = -1;
                 break;
                }

    };


    if( m_camera.data() != NULL)
    {
        m_mediaRecorder.reset(new QMediaRecorder(m_camera.data()));
        m_imageCapture.reset(new QCameraImageCapture(m_camera.data()));

        m_camera->setViewfinder(ui->cameraview);
        //ui->cameraview->setFixedSize(500, 230);

        // m_camera->start();
        qCInfo(logger) << QString("Start de la camera: %1").arg(index_camera);
    }
    else
    {
        qCCritical(logger) << "Unexpected null ptr";
        res = -1;
    }

    return res;
}

The start of the camera is done in the worker class.

When the result is hitten every 10 sec, I reset for the new camera:

void popupavancement::handleResults_emi(int res)
{

    // Arrêt caméra
    m_camera->stop();

    if(res == 2)
    {
        rollCamera();
    }
    else
    {
        workerThread_emi.quit();
        workerThread_emi.wait();

        stop = true;
        qCInfo(logger) << QString("Arrêt du test d'émission des caméras avec le résultat: %1").arg(res);
    }
}

If you need any other information.

Thanks in advance,

Eve

Spec

  • Raspberry Pi 3 Model B Rev 1.2
    Raspbian Buster Lite, Linux raspberrypi 4.19.69-v7+
    gstreamer 1.14
    Tested with USB Logitech C920 and USB TRUST TRINO 720p

Problem
When upgrading from stretch to buster image the gstreamer pipeline fails with Internal data stream error
I have tried several diffrent pipelines but they all fails with the same error. Seems like some sort of conflict in Buster image.
dmesg log reveals the cannot get freq at ep 0x84 error and i belive this might be the root cause.

Both Stretch Lite and Desktop works like a charm.

Pipeline used for this example

Code: Select all

gst-launch-1.0 -v rtpbin name=rtpbin v4l2src device=/dev/video0 ! 
        video/x-raw,width=1280,height=720,framerate=15/1 ! queue ! 
        omxh264enc target-bitrate=2000000 control-rate=1 ! 
        "video/x-h264,profile=main" ! h264parse ! 
        queue max-size-bytes=10000000 ! 
        rtph264pay pt=96 config-interval=1 ! 
        udpsink port=5600 host=10.0.0.131 ts-offset=0 

Error message (—gst-debug=v4l2src:5)

Code: Select all

Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.286012635 16375  0x1002f50 DEBUG                v4l2src gstv4l2src.c:520:gst_v4l2src_negotiate:<v4l2src0> caps of peer: video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)15/1, format=(string)I420; video/x-raw, width=(int)640, height=(int)480, framerate=(fraction)15/1, format=(string)NV12
0:00:00.286246332 16375  0x1002f50 DEBUG                v4l2src gstv4l2src.c:526:gst_v4l2src_negotiate:<v4l2src0> intersect: EMPTY
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.001050311
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

dmesg log

Code: Select all

2724.283426] usb 1-1.3: USB disconnect, device number 8
[ 2725.307493] usb 1-1.4: USB disconnect, device number 5
[ 2727.390400] usb 1-1.2: new high-speed USB device number 9 using dwc_otg
[ 2727.611162] usb 1-1.2: New USB device found, idVendor=0c45, idProduct=6340, bcdDevice= 0.00
[ 2727.611176] usb 1-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 2727.611186] usb 1-1.2: Product: USB 2.0 Camera
[ 2727.611195] usb 1-1.2: Manufacturer: Sonix Technology Co., Ltd.
[ 2727.616148] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340)
[ 2727.637411] uvcvideo 1-1.2:1.0: Entity type for entity Extension 4 was not initialized!
[ 2727.637429] uvcvideo 1-1.2:1.0: Entity type for entity Processing 3 was not initialized!
[ 2727.637441] uvcvideo 1-1.2:1.0: Entity type for entity Camera 1 was not initialized!
[ 2727.637820] input: USB 2.0 Camera: HD 720P Webcam as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input4
[ 2727.647744] usb 1-1.2: 3:1: cannot get freq at ep 0x84

lsusb

Code: Select all

root@raspberrypi:/home/pi# lsusb
Bus 001 Device 009: ID 0c45:6340 Microdia Camera
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ls /dev/vi*

Code: Select all

/dev/video0  /dev/video1  /dev/video10  /dev/video11  /dev/video12

Any advice is highly appreciated.

Hi!!! Probably is because you don’t have the correct width and height specified for the device which is normally 640 * 480

By default, the discrete size is 1920 * 720.

v4l2src device=/dev/video0 ! video/x-raw, width=(int)1920, height=(int)720, format=YUY2 !

Just specify the discrete size like this:
python3 imagenet-camera.py --camera=/dev/video0 --width=640 --heigh=480
or
python3 detectnet-camera.py --camera=/dev/video0 --width=640 --heigh=480

not sure what you are referring ?
same problem at my end,

where would that be if source code is

import jetson.inference
import jetson.utils

net = jetson.inference.detectNet("ssd-mobilenet-v2", threshold=0.5)
camera = jetson.utils.gstCamera(1280, 720, "/dev/video0")  # using V4L2
display = jetson.utils.glDisplay()

while display.IsOpen():
	img, width, height = camera.CaptureRGBA()
	detections = net.Detect(img, width, height)
	display.RenderOnce(img, width, height)
	display.SetTitle("Object Detection | Network {:.0f} FPS".format(net.GetNetworkFPS()))

i tried editing
camera = jetson.utils.gstCamera(1280, 720, "/dev/video0") # using V4L2

but no luck

Понравилась статья? Поделить с друзьями:
  • Camera init failed with error 0x106
  • Camera in use error
  • Camera has been disabled because of security policies как исправить на телефоне
  • Camera event capture error перевод
  • Camera error как переводится