The document you refer to is the one I have been working from.
With your example I get:
Setting pipeline to PAUSED ...
====== VPUDEC: 4.4.5 build on Aug 13 2019 14:09:44. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Jun 3 2019 09:53:37)
vpulib: 1.1.1
firmware: 1.1.1.0
====== VPUENC: 4.4.5 build on Aug 13 2019 14:09:44. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Jun 3 2019 09:53:37)
vpulib: 1.1.1
firmware: 1.1.1.65535
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data st
ream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipe
line:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
so I tried:
gst-launch-1.0 -e v4l2src ! video/x-raw,format=NV12,width=1920,height=1080 ! queue max-size-time=0 ! vpuenc_h264 ! h264parse ! vpudec ! queue max-size-time=0 ! filesink location=camera2x.mp4
and
gst-launch-1.0 -e v4l2src ! video/x-raw,format=NV12,width=1920,height=1080 ! queue max-size-time=0 ! vpuenc_h264 ! h264parse ! mp4mux ! filesink location=camera2x.mp4
and various other combinations and all fail for some reason or another.
This appears to be close:
gst-launch-1.0 -e v4l2src ! videoconvert ! queue ! vpuenc_h264 ! h264parse ! mp4mux ! filesink location=camera.mp4
but after I cancel the file size is always zero.