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.

gstreamer v4l2 1080i60 capture problem in EZSDK05 05 02 00 : Call to S_FMT failed for NV12 @ 1920x1080: Invalid argument

Hi,

I am working on a custom DM814x board, and the video input is from a hdmi decoder, and I am using gstreamer to build my application.

EZSDK version 05050200,

The system can work under 1080p and 720p modes.But It can not work under 1080i mode.

The pipeline:

gst-launch -v v4l2src queue-size=13  always-copy=false num-buffers=-1 decimate=1 ! 'video/x-raw-yuv-strided, format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=10 ! omx_h264enc bitrate=15000000 ! gstperf ! filesink location=test.264

When I launch the pipeline, it can not start and give the following error message:

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/vid
eo0' cannot capture at 1920x1080
Additional debug info:
v4l2src_calls.c(326): gst_v4l2src_set_format (): /GstPipeline:pipeline0/GstV4l2S
rc:v4l2src0:
Call to S_FMT failed for NV12 @ 1920x1080: Invalid argument

Could anyone give me any hints why the 1080i capture is not working properly?

Best regards.



  • Hello,

    Could you try to add in the pipeline  omx_mdeiscaler element before the encoder element?

    Let me know the result.

    BR

    Margarita

  • Hello,

    I add the element omx_mdeiscaler in the pipeline. But it still can not work. The error message is the same.  

    Thank you very much.

  • Hello,

    Could you add --gst-debug=3 or --gst-debug=v4l2:3 to the pipeline and share the  log.

    You could check here:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/282191.aspx

    roderick fang1 said:
    Call to S_FMT failed for NV12 @ 1920x1080: Invalid argument

    This means that the format NV12 is not recognized.

    Could you try with SaLoopBack demo first.

    BR

    Margarita

  • Hello,

    I add gst-debug and it seems that there is no more error information. I have applied the v4l2patch and fixed the new gstreamer bug. Now the pipeline can work in1080p and 720p, but it can not work under 1080i.

    gst-launch -v v4l2src queue-size=12 num-buffers=-1 decimate=2
    ! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1920,height=1080,framerate
    =(fraction)60/1' ! omxbufferalloc numBuffers=12 ! omx_mdeiscaler ! omx_h264enc b
    itrate=15000000 ! gstperf ! rtph264pay pt=96 ! udpsink host=10.0.1.56 port=6000
    sync=true --gst-debug=v4l2src:3
    Setting pipeline to PAUSED ...



    0:00:01.451488496 1255 0x16050 INFO v4l2src gstv4l2src.c:611:gst_v4l2src_get_caps:<v4l2src0>
    0m probed caps: 0xd9bc0
    0:00:01.680046348 1255 0x16050 WARN v4l2src v4l2sr
    c_calls.c:326:gst_v4l2src_set_format:<v4l2src0> error: Device '/dev/video0' cann
    ot capture at 1920x1080
    0:00:01.680203598 1255 0x16050 WARN v4l2src v4l2src_calls.c:
    326:gst_v4l2src_set_format:<v4l2src0> error: Call to S_FMT failed for NV12 @ 192
    0x1080: Invalid argument
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/vid
    eo0' cannot capture at 1920x1080
    Additional debug info:
    v4l2src_calls.c(326): gst_v4l2src_set_format (): /GstPipeline:pipeline0/GstV4l2S
    rc:v4l2src0:
    Call to S_FMT failed for NV12 @ 1920x1080: Invalid argument
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Thank you very much.

  • Hello,

    Could you try with SaLoopBack demo to verify that is working.

    BR
    Margarita

  • Hello,

    Our board does not use the fbdev.So the saloopBack can not run through. At least the program can call the V4L2 API  S_FMT  and set the format.

    I checked the gstreamer V4L2src  code. In the gstreamer gstv4l2object.c, it uses "field = V4L2_FIELD_SEQ_TB".

    But in ezsdk ti81xxvin_main.c, the drivers always use field = V4L2_FIELD_INTERLACED.

    Does  this mismatch lead to the gstreamer api S_FMT call error?

    Thanks