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.

Linux/PROCESSOR-SDK-AM57X: 1080p encode frame rate

Part Number: PROCESSOR-SDK-AM57X
Other Parts Discussed in Thread: AM5728

Tool/software: Linux

Team,

On AM5728 EVM with latest PSDK , for 1920x1080P encode i am seeing only 5 fps.  I am using following pipeline .. Is there something i am missing ?

gst-launch-1.0 videotestsrc num-buffers=100 ! 'video/x-raw,format=(string)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! ducatih264enc level=level-51 profile=high ! queue ! h264parse ! mp4mux ! filesink location=test.mp4

One of my customers looking for 1080p60 /one channel..

Best Regards,

Shiv

  • The software team have been notified. They will respond here.
  • There are couple of issues -

    • Encoder is being used in  serial with input stream. "queue" element of gstreamer is used to decouple the elements.
    • The input to encoder is not being fed via live camera or other real time device.
    • The input/output happening on slower sdcard/nfs

    I have tried below gstreamer pipeline and I find it to meet the performance. 

    gst-launch-1.0 filesrc location=test.nv12 ! videoparse format=nv12 width=1920 height=1080 framerate=60/1 ! queue ! ducatih264enc level=level-51 profile=high  ! queue !  fakesink sync=false

    You can as well use videnctest application in omapdrmtest to profile and benchmark encoder performance outside gstreamer. 

  • Hello,

    I ran few tests on my side. Here is the results:
    For 1080p30 enc:
    gst-launch-1.0 videotestsrc num-buffers=120 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)30/1' ! ducatih264enc level=level-51 profile=baseline ! queue ! h264parse ! mp4mux ! filesink location=test.mp4
    Decoding :
    gst-launch-1.0 playbin uri=file:///home/root/test.mp4
    New clock: GstSystemClock
    Got EOS from element "playbin0".
    Execution ended after 0:00:03.998659789


    For num-buffters=120 execution time of decoding is 4 seconds which is 30 fps.

    For 1080p60enc:
    gst-launch-1.0 videotestsrc num-buffers=600 ! 'video/x-raw,format=(string)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! ducatih264enc level=level-51 profile=baseline ! queue ! h264parse ! mp4mux ! filesink location=test.mp4
    ...

    Decoding :
    gst-launch-1.0 playbin uri=file:///home/root/test.mp4

    ....
    Execution ended after 0:00:10.001695798
    So for Num-buffers=600 of the encoded file the execution is 10 second for decoding, 60 fps.
    For num-buffers=120 execution time of decoding is: Execution ended after 0:00:02.007382301.

    BR
    Margarita

  • Hi,

    There is no issue if we encode the input from videotestsrc as per following gstreamer pipeline. we are getting 58 fps from the encoded video, captured using following pipeline.

    gst-launch-1.0 videotestsrc num-buffers=100 ! 'video/x-raw,format=(string)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! ducatih264enc level=level-51 profile=high ! queue ! h264parse ! mp4mux ! filesink location=test.mp4

    The low frame rate(5-6 FPS) issue occurs, when we are using AM57xx EVM camera board using v4l2src as per following pipeline.

    gst-launch-1.0 -e v4l2src device=/dev/video1 num-buffers=500 io-mode=5 ! 'video/x-raw,format=(string)NV12,width=(int)1920,height=(int)1080,framerate=(fraction)30/1' ! ducatih264enc level=level-51 profile=high ! queue ! h264parse ! mp4mux ! filesink location=temp.mp4

    We doubt the issue at capture side.

    To calculate the fps, we used fpsdisplaysink pipeline as follows.

    gst-launch-1.0 -v -e v4l2src device=/dev/video1 num-buffers=100 io-mode=4 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080' ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080' ! queue !  fpsdisplaysink

    after running the above pipeline, output is

    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 89, dropped: 0, current: 6.61, average: 6.82

    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 93, dropped: 0, current: 6.80, average: 6.82

    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 97, dropped: 0, current: 6.61, average: 6.81

    Got EOS from element "pipeline0".

    Can we conclude that average FPS is 6~7 FPS from camera, that is the reason for low frame rate when we are encoding data from camera?

    Regards,

    Praveen

  • Hi Manisha,

    As per TI conveyed, AM57xx evm camera is capable of sending 10FPS at 1920x1080 resolution.
    But we are achieving 5FPS, after encdoing. The pipeline is as follows:

    gst-launch-1.0 -e v4l2src device=/dev/video1 num-buffers=500 ! 'video/x-raw,format=(string)NV12,width=(int)1920,height=(int)1080' ! ducatih264enc level=level-51 profile=high ! queue ! h264parse ! mp4mux ! filesink location=temp.mp4

    Since as per our information, vip & encoder both are capable to handle 1920x1080@60FPS.

    Is 5 FPS for encoding is expected behaviour? If not How to achieve 10 FPS?

    Regards,
    Praveen

  • The camera is able to stream 1080p @ 6.7 fps only. You can verify this by running Yavta application as shown below -
    #yavta -c60 -fYUYV -F/dev/null -s1920x1080 /dev/video1

    It is stand alone capture application that captures the frame and store in file specified. In above example, we have specified /dev/null and hence no file write. At steady state, Yavta prints 6.7 fps in its log. The processing limitation that you are finding in your gstreamer application is due to camera's inability to stream 1080p frame higher then 6.7 fps.

  • Thanks for your response, 

    Can we able to achieve the same frame rate(6.7fps) from the encoded store file(mp4)? Can you please suggest the possible reason for 1-2 frame drop.

    BR,

    Praveen.

  • Praveen,

    I am finding the capture alone using gst-launch is having 1-2 frame drop. Below gstreamer launch pipeline is taking 13.3 sec. Expectation is to take 10 sec. 

    # gst-launch-1.0 -e v4l2src device=/dev/video1 num-buffers=67 io-mode=4 ! 'video/x-raw,format=(string)NV12,width=(int)1920,height=(int)1080' ! fakesink sync=false

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:00:13.278984880
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    #gst-launch-1.0 -e v4l2src device=/dev/video1 num-buffers=67 io-mode=5 ! 'video/x-raw,format=(string)NV12,width=(int)1920,height=(int)1080' ! queue ! ducatih264enc level=level-51 profile=high ! queue ! h264parse ! queue ! mp4mux ! filesink location=temp.mp4

    Setting pipeline to PAUSED ...
    [240784.987582] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:00:13.300860944
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    This will need investigation. 

    Regards,

    Manisha