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.

1080i v4l2 capture problem

Greetings,

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.

The SDK I am woring on is ezsdk 505. The psp docs clearly claim that 1080i/60 capture is supported since sdk503.

I have no problem with capture 1080p/60 and 720p/60 video data, however when I feed the dm814x with 1080i, things get screwed.

The capture always stop after capturing around 100 frames and the captured data is wrong.

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

Thanks,

Jun

  • Hi,

     

    Are you using scaling for down scaling your input? Can you share snapshot of the output image?

     

    Thx

    Brijesh

  • Hello Brijesh,

    Thanks for your quick attention to this matter.

    No, there is not scaling of the video input. I force the DVD output 1080i to our HDMI decoder.

    Here is the h.264 video clip, you can player it  by command "mplayer -fps 30 ./v4l2_1080i.264"

    Best,

    Jun 

  • Hello Brijesh,

    Did you have chance to look into my video clip?

    I noticed that in the saLoopFbedev example, it claimed that 1080i capture is  not support RGB video data.

    case V4L2_DV_1080I60:
    printf("%s:\n Mode set is 1080I60\n", APP_NAME);
    printf("1080I is not supported for RGB capture\n");

    Our HDMI decoder will ouput YUV422, and in the case of 1080p, 720p the result is correct, so I believe there is no issue with the hdmi decoder.

    The gstreamer video capture pipeline is like this:

    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=13 ! omx_h264enc bitrate=15000000 ! gstperf ! filesink location=v4l2_1080i.264

    If anyone knows how to do 1080i capture with v4l2, please help me out.

    Regards,

    Jun

  • I also noticed that when I do the 1080i capture, the ARM load is unusual high ( higher than 1080p capture).

    And the capture process will always stop after a few seconds, which looks like soft of memory leakage.

    Is there a bug with the ti81xxvin_main driver?

    Please notice that I already applied the 5633.v4l2_patches.zip.

    Jun 

  • Hi,

     

    Interlaced capture has issues for RGB input, so it is not supported. Are you using RGB input or YUV input? It looks like from the captured image that fields are not getting merged correctly, Could you try the sample application first and check the output?

     

    Thanks,

    Brijesh Jadav

  • Hi,

     

    Also let us know which platform and which revision you are using for 1080i capture?

     

    Thx,

    Brijesh

  • Hi Brijesh,

    Thanks for your reply. 

    We are using YUV422 input.

    The good news is when I use sample application, the output is correct.

    And after I using gstreamer coming from the ezsdk505 (I was using ezsdk504), the capture pipeline cannot even start.

    Here is my capture pipeline:

    gst-launch v4l2src always-copy=false 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_h264enc bitrate=15000000 ! gstperf ! filesink location=v4l2_1080i_1109.264

    Here is the dumped msgs:

    Mode set is 108IsHDCPMode= 0x01
    0
    GetResolution
    ti81xxvin ti81xxvin: ti81xxvin detected 1080i 50/60_line_378
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' cannot capture at 1920x1080
    Additional debug info:
    v4l2src_calls.c(326): gst_v4l2src_set_format (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Call to S_FMT failed for NV12 @ 1920x1080: Invalid argument
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Do you have any idea why this happened?

    Jun

     

  • Hi Jun,

     

    Good to hear that sample application works fine.

     

    It looks like NV12 does not seem to be working. Could you try YUV422I format?

    Could you tell me the platform and revision that you are using?

     

    Thanks,

    Brijesh Jadav

  • Hi Brijiesh,

    I am using ezsdk505 and dm814x, if this is what you meant by platform and revision?

    I tired the yuv422i, and this format is not recognized by gstreamer.

    Do you have any other suggestions?

    Jun 

  • Hi,

     

    Let me ask to correct person as i am not familiar with gstreamer. Since sample application works fine, it should be just minor change required somewhere i gstreamer or ezsdk.

     

    Thx,

    Brijesh Jadav

     

  • Hi Brijesh,

    Did you have the chance to get any feedback from some other people regarding this issue?

    Thanks,

    Jun 

  • Yes, waiting for the reply.

     

    Thx,

    Brijesh

  • Hi,

     

    Did you check in the psp example or OMX example? Both of these examples work differently. psp example uses V4L2 capture driver, but OMX does not use V4L2. Could you please first check the pspexample and see if it works?

     

    Regards,

    Brijesh Jadav

  • Dear Brijesh,

    Thanks for your reply.

    I am afraid we cannot run the omx example. In our hardware, we have a custom hdmi decoder, and we implement its driver following a v4l2 style.

    It would take time for us to implement another driver.

    Please let me know when you have an answer for this v4l2 capture issue.

    Jun  

  • Ok, so when you say, sample application is running fine, do you mean psp saLoopback sample application is running fine?

     

    I am checking with the team here to find out why it is failing for dm814x?

     

    Thanks,

    Brijesh Jadav

  • Dear Brijesh,

    Yes, the saLoopBackFbedv example is working fine, and can capture one good frame.

    Our HDMI decoder will output fixed color space (yuv422), and we captured1080p and 720p with gstreamer, and the result is perfect.

    Best,

    Jun 

  • Hi,

    saLoopBack works for number of frames. Are you able to capture only 1 frame or multiple frames. If its only one frame than it might be a problem with driver itself else there may be problem with gstreamer. Make sure that  you are not trying to do any scaling with gstreamer.

  • Hi Hardik,

    I am only able to capture one frame with saLoopback.

    The video source I feed to Davinici is YUV422.

    My video processing pipeline is like this way:

    gst-launch 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_h264enc bitrate=15000000 ! gstperf ! rtph264pay pt=96 ! udpsink host=10.0.1.47 port=6000 sync=FALSE.

    I guess there is sort of scaling between v4l2src and omxbufferalloc, and I have to do this as omx_h264enc only accept yuv420 format data.

    Do you have any idea regarding my 1080i capture issue?

    Thanks,

    Jun

  • Hi,

    I think you should try running saLopBack application first and make sure that its clean. After that you should try GST.

  • Hi Hardik,

    I am not quite sure. If I run the saLoopback, I always get on frame data with size 5.9 MB. If I playback it by Vooya, it is also shown as one frame.

    I donot think the capture driver has problem, might be I am wrong. But how can you explain the 1080p and 720p capture is  working fine with old GST05 not GST 06 under latest EZSDK?

    We are quite stuck due to 1080i and wish you guys might be able to help out.

    Jun

  • Hi,

    Unfortunately I am not the guy for GST. Let me forward here to few people and see if they can help you.