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.

AM5728: Dual acquisition video error

Part Number: AM5728


Hi,

    Use device as am5728 /dev/video1 and /dev/video2.     The video source is the camera  1920*1080p30.

     Scripts 1:

     gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)30/1' ! ducatih264enc bitrate=4000 ! filesink location=test.h264

    Scripts 2:

     gst-launch-1.0 v4l2src device=/dev/video2 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)20/1' ! ducatih264enc bitrate=4000 ! filesink location=test_2.h264

     Running both scripts above saves the video as an H264 file.  

     Run the first script in the background and then run the second script will report the following error:

     

     Run two scripts alone can save the video as h264 file, while running two scripts reported on the error, may I ask what causes the above error.

     How can  I solve this problem ?

BR 

Andre

  • The software team have been notified. They will respond here.
  • Hello,

    What is the PSDK version that you are using here?
    If it is not the latest one I would recommend you to give a try with PSDK 4.1.
    Correct me if I am wrong but you have two video sources, right?
    Is pipeline like this working?

    gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)30/1' ! ducatih264enc bitrate=4000 ! filesink location=test.h264 v4l2src device=/dev/video2 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)20/1' ! ducatih264enc bitrate=4000 ! filesink location=test_2.h264

    From the error it seems like v4l2src failing.
    What about if you change the resolution(try with lower resolution)?
    Could you also try to change the v4l2src io-mode of /dev/video2 for example?

    I can not set your usecase but pipelines like this is working on my side:

    root@am57xx-evm:~# gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)30/1' ! ducatih264enc bitrate=4000 ! filesink location=test.h264 &
    [1] 1084
    root@am57xx-evm:~# Setting pipeline to PAUSED ...
    [ 63.656281] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is PREROLLING ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock

    root@am57xx-evm:~# gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)20/1' ! ducatih264enc bitrate=4000 ! filesink location=test_2.h264
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:07.926145917
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    and

    gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)30/1' ! ducatih264enc bitrate=4000 ! filesink location=test.h264 videotestsrc ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! vpe num-input-buffers=6 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080,framerate=(fraction)20/1' ! ducatih264enc bitrate=4000 ! filesink location=test_2.h264




    BR
    Margarita
  • hello,

        The version I use is TI rt_03.03.00.04 SDK.

        There are two video sources, all with 1080p30 resolution.

         When two video sources are 1280 * 720p60, you can save both video sources as h264 files. Play H264 file is also normal.

         Save a single 1080p30 video source can also be saved as h264 file. But at the same time save the two 1080p30 video source will report the above error.

          What causes this phenomenon?     How can I solve this problem? 

         Test your two video sources using the command you provided, and it works fine. Play two h264 files, shown below:

         

  • Hello,

    Please, give a try with the latest PSDK 4.01 and let me know the result.
    How the both sources are connected, is it one to the USB?

    BR
    Margarita
  • Hi Andre,
    Increase CMA memory requirement in uenv.txt. By default it is 64MB. You can increase it to 128MB and try.
    Execute " cat /proc/cmdLine" to know the current CMA reservation.

    Ram