Streaming video from IM477 sensor on Nano is slow?

I have an Arducam camera with an IM477 sensor. I’m trying to stream video of resolution 4032 x 3040 onto an external SSD drive. I’m using H265 encoding via GSTREAMER but I’m only getting 4 fps. Has anyone been able to get a better fps at 4032 x 3040 pixels?
I get the same performance when streaming onto the microSD as well.

The GSTREAMER string I use to source images from the IM477 is:

‘nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)4032, height=(int)3040, format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)4032, height=(int)3040, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink’

I have a little bit of python code between the source and destination streams that counts the frames.

The GSTREAMER code used to stream to a file is:
gst_str = ‘appsrc ! videoconvert ! omxh265enc bitrate=8000000000 ! h265parse ! qtmux ! filesink location=/media/7612248312244B07/Test_265_v5.mp4’

return cv2.VideoWriter(gst_str, cv2.CAP_GSTREAMER, 0, 30, (4032, 3040))

Since you convert the buffers to BGR format through software converter. This takes significant CPU loading. Hardware engines on Jetson platforms do not support BGR format. You may check this commit:

So for better performance, we would suggest run pure gstreamer pipeline. Please refer to
Jetson 4k Encoding -> Decoding Pipeline and latency - #11 by DaneLLL

Jetson Nano FAQ
Q: Is there any example of running RTSP streaming?