Hardware h264 test video encoding in linux


I am tying to encode a test 264 video using hardware encoder.
I am using dragonbord410c with kernel 20.02.

For that I am using following command:
timeout 10s gst-launch-1.0 -v videotestsrc ! video/x-raw, framerate=30/1, width=1280, height=960 ! videoconvert ! v4l2h264enc ! filesink location=out1.264

And I get following output:
Pipeline is PREROLLING …
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to NULL …
Freeing pipeline …

And if I remove framerate option from the command it works successfully however it makes video file of same size which runs only for 1-2 seconds regardless of timeout value.

Can anyone help me with this?
Thanks in advance.

Yes there is a known issue with framerate, not sure if it has been fixed at the end, but you can give a try to the following patch: https://lore.kernel.org/linux-media/50eb3902-fe10-5952-8bdf-9b6b9ac37c62@linaro.org/T/

Or downgrade to previous release.

@svarbanov, any info about that?

It worked for me.

Thanks a lot.