Not sure you can get 30 fps with 4K on Nano with nvivafilter.
Maybe you don’t need all these queues, especially for NVMM buffers.
My only suggestion may be to process in NV12 format rather than RGBA. It would save the NV12 to RGBA conversion in nvivalfilter, and the RGBA to NV12 later with nvvidconv.
You would keep full resolution maps for Y, and create half resolution maps for UV.
Check this example for processing NV12 in nvivafilter.