H264/265 encoder gstreamer plugin

Hi all
I’m trying to use hw-accelerated video encoding with gstreamer. It seems that I need to use amlvenc plugin which is a part of Khadas’s Ubuntu Focal (kernel 4.9).
I have tested this pipeline:

gst-launch-1.0 videotestsrc is-live=true ! videoconvert ! video/x-raw,width=640,height=480,framerate=20/1,format=RGB ! amlvenc ! video/x-h264,profile=main ! fakesink -v

But it always rises errors like this:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-1.0:6892): GStreamer-CRITICAL **: 19:47:04.824: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(gst-launch-1.0:6892): GStreamer-CRITICAL **: 19:47:04.824: gst_mini_object_ref: assertion 'mini_object != NULL' failed
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)I420, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.008062964
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Did somebody tried to run this gstreamer plugin ?

1 Like

Hi Khadas team,

I am also facing the same issue, kindly respond to this thread.

1 Like

I am trying to do the same thing. Help is needed. Thanks.