LI-VI365

LI-VI365

  • Hi

    I tried capture video from LI-VI365 board. I did instructions from https://www.ridgerun.com/developer/wiki/index.php/Hardware_setup_-_LeopardBoard_DM365

    and then I ran pipeline:

    FILE_NAME=composite_capture_module.mp4
    
    gst-launch -e v4l2src input-src=composite always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480,pitch=736' \
    ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=$FILE_NAME

    Pipeline starts, file is created but it's rubbish. Here is the link to this video: http://www.youtube.com/watch?v=tMw5-qVsq9U

    Can anyone help me with this issue?

    Thanks

    Marian

  • Hi,

    Try the same pipe removing the pitch option,

    FILE_NAME=composite_capture_module.mp4

    gst-launch -e v4l2src input-src=composite always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480' ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=$FILE_NAME

    Regards,

    Carlos Aguero
    Embedded Software Engineer
    RidgeRun

  • Hello Carlos

    Thanks for help

     

     

    Without pitch option it works good but pipeline stops after 40s

     

    / # gst-launch -e v4l2src input-src=composite always-copy=false num-buffers=1000

    ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480' ! queue ! dmaiac

    cel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=vi

    deo2.mp4                                                                        

    Setting pipeline to PAUSED ...                                                  

    davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124                        

    vpfe-capture vpfe-capture: IPIPE Chained                                        

    vpfe-capture vpfe-capture: Resizer present                                      

    tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)    

    Pipeline is live and does not need PREROLL ...                                  

    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input de

    vice did not accept new frame rate setting.                                    

    Additional debug info:                                                          

    ../../../src/sys/v4l2/v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipe

    line:pipeline0/GstV4l2Src:v4l2src0:                                            

    system error: Invalid argument                                                  

    Setting pipeline to PLAYING ...                                                

    New clock: GstSystemClock                                                      

    Got EOS from element "pipeline0".                                              

    Execution ended after 40377811001 ns.                                          

    Setting pipeline to PAUSED ...                                                  

    Setting pipeline to READY ...                                                  

    Setting pipeline to NULL ...                                                    

    Freeing pipeline ...

     

    Is this eval SDK limitation or some issue?

    regards

  • Hi,

    No, recording time is not limited, it stops because of the number of buffers at the pipeline:

    num-buffers=1000: In this case 1000 buffers approx 40 secs

    In order to record more video, use a bigger number or remove num-buffers at all.

    A pipeline without num-buffers:

    gst-launch -e v4l2src input-src=composite always-copy=false ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480' ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=composite_capture_module.mp4

    To stop video recording use ctrl+c

    Also if you want more information about pipe elements, it's recommended to use gst-inspect, for example "gst-inspect v4l2src" will display information about v4l2src, and a short explanation about its properties will be displayed too(num-buffers is there).

    Carlos Aguero
    Embedded Software Engineer
    RidgeRun

  • A couple more thoughts.

     

    I think for cntl+c to close the pipeline correctly, you need to use the -e option with gst-launch.

    We have developed GStreamer Daemon that works rather nicely if you have some start record / stop record events occurring, like a button press, web page control, etc.  You can learn more about it at:

    https://github.com/RidgeRun

    Todd

     

  • Hi

    Thanks for help. It works now very nice. I have one additional question. Is it possible to get from LI-VI365 board video in PAL standard 720x576 using GStreamer? I tested  below pipeline, it works without errors but created file it's a rubbish. I assume that I need to add some parameters in my pipeline to get PAL standard. Let me know if I am right.

    gst-launch -e v4l2src input-src=composite always-copy=false ! 'video/x-raw-yuv,format=(fourcc)NV12, width=720, height=576' ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=video.mp4

    regards Marian

  • Hi Marian,

    The problem is that DM365 captures video with with multiple of 32 bytes, so you need a matching pitch (this is a hack that will be replaced by new stride functionality in future gstreamer):

    gst-launch -e v4l2src input-src=composite always-copy=false ! 'video/x-raw-yuv,format=(fourcc)NV12, width=720, height=576, pitch=736' ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=video.mp4

    Regards,

    Diego

  • Hi Diego

    Thank you, now I can get pretty nice video in PAL :)

    regards

    Marian

  • dear freinds

    my captured output is not working always shows 494 bytes also my pipeline is not stopping auto matically

    with and without pitch option both

    tried all the ways given in the above posts

    gst-launch -e v4l2src input-src=composite always-copy=false num-buffers=100                                                                                                                

    ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480,pitch=736' ! queue                                                                                                              

    ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink lo                                                                                                              

    cation=video3.mp4                                                                                                                                                                              

    Setting pipeline to PAUSED ...                                                                                                                                                                

    davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124                                                                                                                                        

    vpfe-capture vpfe-capture: IPIPE Chained                                                                                                                                                      

    vpfe-capture vpfe-capture: Resizer present                                                                                                                                                    

    tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)                                                                                                                  

    Pipeline is live and does not need PREROLL ...                                                                                                                                                

    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.                                                                    

    Additional debug info:                                                                                                                                                                        

    ../../../src/sys/v4l2/v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:                                                                            

    system error: Invalid argument                                                                                                                                                                

    Setting pipeline to PLAYING ...                                                                                                                                                                

    New clock: GstSystemClock    

    tried with buffer 1000 and without pitch also same result

    thanx

    kailash

  • Hi Marian, I follow same instrucitons, and I have same hw of you (DM365 + LI-VI365) but I can't capture nothing , maybe you can send me your img file just to understand if I'm doing something wrong on the sw ?

    I appreciate any help.

    Regards

  • Hi Valenti, give me your email. I will send you my image.

    regards

  • Thanks I appreciate your help , my email is valenti1234@gmail.com

  • Hi Marian , same things happened to me like valenti , i cant get any picture from /dev/video0 , i checked everything it seems ok.  i also check signals  on LI-VI365 board using scope , it looks like working when i fire gst-lunch command

    so can you please send your u-boot cmd's and second question is did u change anything on kernel source

    Thanks Mehmet