• TI thinks resolved

Linux/AM5728: v4l2 framerate

Part Number: AM5728

Tool/software: Linux

Hello,

I have some problems with the AM572x evaboard and the TMDSEVM572x camera module attached. I use the following gstreamer pipelines:

gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=30/1' ! vpe ! fpsdisplaysink text-overlay=false -v -e

gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)NV12,width=800,height=600,framerate=30/1' ! vpe ! fpsdisplaysink text-overlay=false -v -e

The first pipeline produces a framerate of 41 fps, the second pipeline produces a framerate of 36 fps. In the filtered caps of v4l2src I selected 30fps, but that doesn't matter?

So I have the following questions:

1. Why does the framerate depend on the selected resolution? How can I set e certain framerate for v4l2 which is independent of the resolution?

2. I want to scale the framerate inside the pipeline. I tried the videorate element, but that didn't work. Can videorate element be used together with live sources?

Thank you

Marc

  • Hello,

    Could you try:
    gst-launch-1.0 videotestsrc ! videorate ! video/x-raw, framerate=25/1 ! fpsdisplaysink text-overlay=false -v

    BR
    Margarita
  • In reply to Margarita Gashova:

    Hello,

    gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=720 ! videorate ! video/x-raw, framerate=25/1 ! fpsdisplaysink text-overlay=false -v

    works fine, framerate is 25fps.

    gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=1280,height=720 ! videorate ! video/x-raw, framerate=25/1 ! fpsdisplaysink text-overlay=false -v

    also works fine.

    gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)NV12,width=1280,height=720' ! vpe ! videorate ! 'video/x-raw,framerate=25/1' ! fpsdisplaysink text-overlay=false -v

    fps=25 but video is jittering around.

    Must have something to do with v4l2 live source.

  • In reply to Marc48067:

    Hello,

    Could you try the same pipeline but switch the places of vpe and videorate element&caps. (videorate ! 'video/x-raw,framerate=25/1' ! vpe ...)
    I would also recommend you to set num-input-buffers=8 of vpe element.

    BR
    Margarita
  • In reply to Margarita Gashova:

    hello,

    I tried your advice,but it didn't work.

    so could u help me and give me some advices.

    thanks&regards

  • In reply to hsg:

    Hello,

    Please check this answer:
    e2e.ti.com/.../2328878

    Hope this helps.

    BR
    Margarita