Your framerate seems excessively low… Did you mean 30/1 for 30 fps ?
ffmpeg or VLC are CPU implementations that may be far too slow with this high resolution (may work for much lower resolutions). Gstreamer would leverage HW decoding.
The following works:
# videotestsrc is CPU-based, better boost clocks:
sudo jetson_clocks
# and use a lower resolution (ex 640x480) and scale with nvvidconv
# Record for 10 seconds:
gst-launch-1.0 -ev videotestsrc pattern=snow num-buffers=300 ! video/x-raw,width=640,height=480,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=3840,height=2160,format=NV12' ! nvv4l2av1enc enable-headers=1 bitrate=1000000 ! filesink location=test.ivf
# Read the file, decode and display into X
gst-launch-1.0 filesrc location=test.ivf ! video/x-av1,width=3840,height=2160,framerate=30/1 ! decodebin ! nvvidconv ! xvimagesink