Possibly similar to “nvvidconv plugin and v4l2 camera problem” @ https://devtalk.nvidia.com/default/topic/932320/jetson-tx1/nvvidconv-plugin-and-v4l2-camera-problem-/
I find the H.265 encoding works great when I use a videotestsrc as the video source:
gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! omxh265enc ! 'video/x-h265, stream-format=(string)byte-stream' ! filesink location=test.mp4
But when I switch to a filesrc:
gst-launch-1.0 filesrc location=720P60.yuv ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! omxh265enc ! 'video/x-h265, stream-format=(string)byte-stream' ! filesink location=test.mp4
I get a long stream of error messages
NVMAP_IOC_WRITE failed: Bad address
NVMAP_IOC_WRITE failed: Bad address
. . .
as long as the stream is running, and no output from the filesink. Naturally, I suspected the input file, so I generated a fresh one via:
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)I420, framerate=(fraction)60/1' ! nvvidconv ! 'video/x-raw, format=(string)I420, framerate=(fraction)60/1' ! filesink location='camera.yuv' -e
and tried to compress this similarly:
gst-launch-1.0 filesrc location=camera.yuv ! 'video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! omxh265enc ! 'video/x-h265, stream-format=(string)byte-stream' ! filesink location=camera.mp4 -e
And still get the stream of errors. The messages seem to come from nvvidconv, because this stream doesn’t yield them:
gst-launch-1.0 filesrc location=CH2_COMPONENT_720P60.yuv ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! filesink location=test.mp4
but this stream (which adds nvvidconv) does:
gst-launch-1.0 filesrc location=CH2_COMPONENT_720P60.yuv ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! filesink location=test.mp4
The results are the same whether the stream is constructed with gst-launch-1.0 or with C code (the later being my real goal… a simple C program to drive H265 compression.)
Suggestions? Work-arounds? Source? AdvTHANKSance ← Thanks in advance