GStreamer 265 encoding is to call the screen display

gst-launch-1.0 -e nvarguscamerasrc ! “video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1”
! tee name=t ! videoconvert ! autovideosink t. !
nvv4l2h265enc ! h265parse ! mp4mux ! filesink location=rpi_v3_imx477_cam_2.mp4
Call the camera data through the above code, perform H265 encoding and display it on the screen in real time, but the screen shows a black screen and the encoded file size is 0

Hi,
Please try nv3dsink and check if you can see camera preview first:

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1' ! nvvidconv ! nv3dsink

can`t see the screen,there will be error :
root@dwx-desktop:/home/dwx# gst-launch-1.0 -e nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1’ ! nvvidconv ! nv3dsink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock

(gst-launch-1.0:12308): GLib-CRITICAL **: 08:48:09.248: g_array_remove_index: assertion ‘index_ < array->len’ failed

(gst-launch-1.0:12308): GStreamer-CRITICAL **: 08:48:09.248: gst_caps_remove_structure: assertion ‘idx <= gst_caps_get_size (caps)’ failed

(gst-launch-1.0:12308): GStreamer-CRITICAL **: 08:48:09.248: gst_caps_remove_structure: assertion ‘idx <= gst_caps_get_size (caps)’ failed

(gst-launch-1.0:12308): GStreamer-CRITICAL **: 08:48:09.248: gst_structure_set_parent_refcount: assertion ‘refcount != NULL’ failed

(gst-launch-1.0:12308): GStreamer-CRITICAL **: 08:48:09.248: gst_caps_features_set_parent_refcount: assertion ‘refcount != NULL’ failed
free(): invalid pointer
Aborted (core dumped)

If used:
gst-launch-1.0 nvarguscamerasrc ! “video/x-raw(memory:NVMM),width=2650,height=1080,framerate=30/1” ! nvvidconv ! “video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1” ! nvoverlaysink
can see the preview screen

Hi,
It looks like your source is 2650x1080p30, not 3840x2160p30. Please confirm what sensor modes are supported and set exact width,height,framerate to caps.

The resolution is 38402160, just to fit the display setting of 25601080

Hi,
Please try

gst-launch-1.0 -e nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1' ! fakesink

If 3840x2160p30 is a valid sensor mode, you should be able to run this command successfully.

yes,I can

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.