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.
We’re having a problem with the gstreamer “vpe” element on an AM5728 board when attempting to capture video and encode it in H.264 format. We can capture raw video in NV12 format to a file using the “v4l2src” element without any problems, but when we attempt to link it to vpe and ducatih264enc, it fails.
The gstreamer pipeline is this:
gst-launch-1.0 -v -e --gst-debug=2 v4l2src device=/dev/video1 num-buffers=100 io-mode=4 \ ! 'video/x-raw,format=(string)NV12,framerate=(fraction)30/1,width=(int)1920,height=(int)1080' \ ! vpe num-input-buffers=8\ ! queue\ ! ducatih264enc\ ! filesink location=/test.h264
During the failure, the following lines are output to the kernel log and can be seen using the dmesg command:
[ 52.994007] rpmsg_rpc rpmsg-dce: error from rproc_pa_to_da, rproc = edb7bc00, pa = 0x00000000fd600000 ret = -22 [ 53.004219] rpmsg_rpc rpmsg-dce: unwinding UVA to RDA translations! translation = 0 [ 53.014114] rpmsg_rpc rpmsg-dce: failed to translate all pointers for remote core!
The output from gstreamer is:
Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1" Setting pipeline to PLAYING ... /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" New clock: GstSystemClock /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)30/1" 0:00:00.126678455 _[334m 1017_[00m 0x157e90 _[33;01mWARN _[00m _[00m v4l2bufferpool gstv4l2bufferpool.c:749:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src>_[00m Uncertain or not enough buffers, enabling copy threshold /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)4" /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)4" 0:00:00.223960116 _[334m 1017_[00m 0x142a90 _[33;01mWARN _[00m _[00m ducati gstducatividenc.c:847:gst_ducati_videnc_handle_frame:<ducatih264enc0>_[00m process failed: err=-5, extendedError=00000000 0:00:00.224258772 _[334m 1017_[00m 0x142a90 _[33;01mWARN _[00m _[00m ducati gstducatividenc.c:856:gst_ducati_videnc_handle_frame:<ducatih264enc0>_[00m XDM_GETSTATUS: err=0, extendedError=00000000 0:00:00.255390244 _[334m 1017_[00m 0x157e90 _[33;01mWARN _[00m _[00m basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0>_[00m error: Internal data flow error. 0:00:00.255441810 _[334m 1017_[00m 0x157e90 _[33;01mWARN _[00m _[00m basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0>_[00m error: streaming task paused, reason error (-5) 0:00:00.255610495 _[334m 1017_[00m 0x157e90 _[33;01mWARN _[00m _[00m queue gstqueue.c:968:gst_queue_handle_sink_event:<queue0>_[00m error: Internal data flow error. 0:00:00.255652626 _[334m 1017_[00m 0x157e90 _[33;01mWARN _[00m _[00m queue gstqueue.c:968:gst_queue_handle_sink_event:<queue0>_[00m error: streaming task paused, reason error (-5) ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error. Additional debug info: ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: streaming task paused, reason error (-5) MmRpc_call: Error: write failed ../git/libdce.c:965: process ERROR: Failed eError == DCE_EOK error val -5EOS on shutdown enabled -- waiting for EOS after Error Waiting for EOS... ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data flow error. Additional debug info: ../../../gstreamer-1.6.3/plugins/elements/gstqueue.c(968): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0: streaming task paused, reason error (-5) handling interrupt. Interrupt: Stopping pipeline ... Interrupt while waiting for EOS - stopping pipeline... Execution ended after 0:00:12.068756108 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Any advice would be much appreciated.
Thanks
Hello,
The enc supports 1080p.
Could you try the same pipeline but without the vpe like in the guide(change the resolution).
gst-launch-1.0 -e v4l2src device=/dev/video1 num-buffers=1000 io-mode=5 ! 'video/x-raw, \
format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! ducatimpeg4enc bitrate=4000 ! \
queue ! mpeg4videoparse ! qtmux ! filesink location=x.mp4
Let me know the result.
BR
Margarita