I’ve got some questions about hardware video encoding.
So I need to encode input video (MIPI Khadas cam), using only gstreamer it works (really works!) like:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=60/1,format=RGB ! videoconvert ! x264enc ! filesink location=/tmp/test.avi
But now the question: How can I use hardware accelerated encoding? Like things described there, for example. Two years ago you wrote such a pipeline:
gst-launch-1.0 v4l2src device=/dev/video0 ! amlvdec ! amlvsink sync=false
Its output (errors) looks like:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.001708664
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
If I use it like I wrote above (standart gstreamer pipeline):
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=60/1,format=RGB ! videoconvert ! amlvdec ! amlvsink sync=false ! filesink location=/tmp/test.avi
I get warnings and nothing good like:
WARNING: erroneous pipeline: could not link videoconvert0 to amlvdec0
or
WARNING: erroneous pipeline: could not link v4l2src0 to amlvdec0, amlvdec0 can't handle caps video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)RGB
And can you please tell, what hardware is used by gstreamer (above) to encode?
Best regards,
Maxim