This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8148 Capturing Video using v4l2 (Gstreamer)

Sir,

        We are using EZ SDK on DM8148 EVM board with USB camera for Capture and LCD for display. We have given the following command for trying to capture video (Video encode) from USB camera ( Vimicro UVC Camera -/dev/video0 ) using Gstreamer in the target board DM8148 EVM and we got the following error...

root@dm814x-evm:~# gst-launch v4l2src device=/dev/video0 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240  ! jpegenc ! filesink location=/media/video.avi               

Setting pipeline to PAUSED ...

Mode set is 0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format

Additional debug info:

gstbasesrc.c(2778): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any

Setting pipeline to NULL ...
Freeing pipeline ...
         And in host machine ( Ubuntu 10.04)  this command is working nicely...   Kindly suggest me to fix this error...

Regards,
 J.Moorthi
  • Hello Moorthi,


    If you add to pipeline --gst-debug=V4L2:5 you could check why it fails.

    Error: Could not negotiate format means can not recognize the video input format.

    The formats are:

    YCrCb 422 Interleaved YUYV

    YCrCb 420 Semiplaner NV12

    YCrCb 422 Semiplaner NV16

    RGB     RGB3

    In your case, probably the format which is expected on/dev/video0 doesn't match.

    /dev/video1 and /dev/video2 only support YUYV not NV12 or NV16. only /dev/video3 support YUYV, NV12 and NV16 format.

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/213275/753246.aspx#753246

    You could search in forum regarding this issue.

    Best Regards,

    Margarita

  • Margarita,

                The USB camera  having the following information and it seems that it supports YUYV and MJPG...      

    USB Camera Hardware information:
    -------------------------------------------------
    usb 1-1: new high speed USB device using musb-hdrc and address 3
    usb 1-1: New USB device found, idVendor=a0c8, idProduct=3460
    usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    usb 1-1: Product: Vimicro UVC Camera
    usb 1-1: Manufacturer: Vimicro
    uvcvideo: Found UVC 1.00 device Vimicro UVC Camera (a0c8:3460)
    input: Vimicro UVC Camera as /devices/platform/omap/ti81xx-usbss/musb-hdrc.0/usb1/1-1/1-1:1.0/input/input1



    When i give the following command mentioned in the link of your reply post, i got the same following error...

    root@dm814x-evm:~# gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv,width
    =320,height=240,framerate=30/1,format=\(fourcc\)YUYV,color-matrix=\"sdtv\" ! fak
    esink
    WARNING: erroneous pipeline: could not link v4l2src0 to fakesink0

    Also i have attched the debug message for GST_DEBUG="3"  ...Kindly suggest me to fix this error...

    Thanks & Regards,

     J.Moorthi

  • Margarita,

             I forget to attach the debug message for GST_DEBUG="3"... kindly find the attached...

    Thanks & Regards,

     J.Moorthi

  • Hello,

    Moorthi Jayaraman said:
    root@dm814x-evm:~# gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv,width
    =320,height=240,framerate=30/1,format=\(fourcc\)YUYV,color-matrix=\"sdtv\" ! fak
    esink
    WARNING: erroneous pipeline: could not link v4l2src0 to fakesink0

    Could you try for example :

    gst-launch -e --gst-debug=3 --verbose v4l2src device="/dev/video0" always-copy=false queue-size=12 num-buffers=-1 ! 'video/x-raw-yuv-strided,format=(fourcc)YUYV,width=800,height=480,framerate=(fraction)30/1' ! omxbufferalloc silent=false numBuffers=12 ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60  ! omx_videosink sync=false

    Double check the input format from the video source, resolution and the /dev/videoXX.

    Best Regards,

    Margarita

  • Margarita,

              Thanks for your kind reply...

    Regards,

         J.Moorthi