omxh264enc fails on jetson nano

I am launching command from this manual: https://developer.download.nvidia.com/embedded/L4T/r24_Release_v2.1/Docs/Accelerated_GStreamer_User_Guide_Release_24.2.1.pdf:

gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)I420,
width=(int)640, height=(int)480' ! omxh264enc ! 'video/x-h264, streamformat=(string)byte-stream' ! h264parse ! qtmux ! filesink
location=test.mp4 -e

mentioned in section H.264 Encode (NVIDIA accelerated encode). But it fails:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 100, Level = 40 
ERROR: from element /GstPipeline:pipeline0/GstQTMux:qtmux0: Downstream is not seekable - will not be able to create a playable file
Additional debug info:
gstqtmux.c(2780): gst_qt_mux_start_file (): /GstPipeline:pipeline0/GstQTMux:qtmux0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

file is not created. How do I fix it?

Hi,
I run same command and don’t hit any issue. FYI.

$ gst-launch-1.0 videotestsrc num-buffers=300 ! 'video/x-raw, format=(string)I420,width=(int)640, height=(int)480' ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=a.mp4

I have managed to resolve this by clearing cache. Should I clear it each time I start my application?

Hi,
Per our experience, after flashing the system via sdkmanager, it should be required in the very first time. It seems strange if you have to do it in every application run.