Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

CameraBin error: "Your GStreamer installation is missing a plug-in."



  • Hi, i follow these tutorial, and install these package before resync to host.

    libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-alsa  libasound2-dev
    

    It's a fresh installation of raspberry pi and i want to cross compile and use qtmultimedia to use camera. Here is my sample code :

    import QtQuick 2.12
    import QtQuick.Controls 2.12
    import QtMultimedia 5.12
    
    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
    
        Rectangle {
            id : myCamera
            width: 376
            height: 254
            color: "white"
    
                property alias record: camera.videoRecorder
                    property alias camera: camera
            //        property string cameraId
    
            Camera {
                id: camera
                captureMode: Camera.CaptureVideo
                //            videoRecorder.outputLocation: "file:///home/pi/saved_videols/namafile"
    
                videoRecorder {
                    resolution: "640x480"
                    frameRate: 30
                    mediaContainer: "mp4"
                }
    
            }
    
            VideoOutput {
                id: viewfinder
                visible: true
    
                x: 0
                y: 0
                anchors.fill: parent
                source: camera
                autoOrientation: true
            }
        }
    
        Button {
            id: button1
            x: 380
            y: 364
            text: qsTr("START")
            onClicked: {
    //            myCamera.record.record()
                console.log(QtMultimedia.availableCameras.length)
                console.log("start")
                myCamera.camera.start()
            }
        }
    
        Button {
            id: button
            x: 477
            y: 150
            text: qsTr("STOP")
    
            onClicked: {
                console.log("Done")
                myCamera.camera.stop()
            }
        }
    }
    
    

    Here is the error :

    (tes_camera:29939): GStreamer-WARNING **: 14:35:00.605: Name 'video-encodebin' is not unique in bin 'camerabin', not adding
    
    (tes_camera:29939): GStreamer-WARNING **: 14:35:00.605: Name 'videobin-filesink' is not unique in bin 'camerabin', not adding
    
    (tes_camera:29939): GStreamer-WARNING **: 14:35:00.605: Name 'image-encodebin' is not unique in bin 'camerabin', not adding
    
    (tes_camera:29939): GStreamer-WARNING **: 14:35:00.605: Name 'imagebin-filesink' is not unique in bin 'camerabin', not adding
    
    (tes_camera:29939): GStreamer-WARNING **: 14:35:00.605: Name 'viewfinderbin-queue' is not unique in bin 'camerabin', not adding
    
    CameraBin error: "Your GStreamer installation is missing a plug-in."
    

    Please kindly advise, thanks!


  • Lifetime Qt Champion

    Hi,

    Can you access that camera directly with GStreamer ?



  • Yes i think it works.

    i do this command

    in Pi:

    raspivid -t 0 -w 1280 -h 720 -fps 30 -b 1700000 -o - | gst-launch-1.0 -v fdsrc ! h264parse config-interval=1 ! rtph264pay ! udpsink host=192.167.1.103 port=5000
    
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1280, height=(int)720, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
    /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)640028, sprop-parameter-sets=(string)"J2QAKKwrQCgC3QDxImo\=\,KO4CXLA\=", payload=(int)96, ssrc=(uint)2235839874, timestamp-offset=(uint)2928261315, seqnum-offset=(uint)9912
    /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)640028, sprop-parameter-sets=(string)"J2QAKKwrQCgC3QDxImo\=\,KO4CXLA\=", payload=(int)96, ssrc=(uint)2235839874, timestamp-offset=(uint)2928261315, seqnum-offset=(uint)9912
    /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, width=(int)1280, height=(int)720, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
    /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 2928261315
    /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 9912
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    

    in linux host :

    gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Got context from element 'autovideosink0-actual-sink-vaapi': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx1";
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    
    

  • Lifetime Qt Champion

    That's not the same pipeline as Qt. The error mentions camerabin.

    [edit: fixed auto correct generated typo SGaist]



  • @SGaist Hi, i don't understand, what cameraman you means? So what should i do, thank you so much for your reply!


  • Lifetime Qt Champion

    It was "camerabin" but the autocorrection kicked in and I didn't saw that.



  • Turns out when i remove mediaContainer in videoRecorder properties it works. The video format default will be .mov . So the problem is the format plugins


Log in to reply