Gstreamer create a file from camera stream

tried to create a file from the on board camera with
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=2592, height=1458, framerate=30/1, format=NV12' ! videoparse ! videoconvert ! x264enc ! flvmux streamable=true ! queue ! filesink location=output.flv
but gstreamer always freezes in “Redistribute latency…”,
other options and combinations didn’t accomplish the expectations as well.
What am I missing?

Please refer to gstreamer user guide:

You may try something like :

gst-launch-1.0  nvcamerasrc ! omxh264enc ! flvmux ! filesink location=output.flv

This uses HW encoder.
However, not sure flvmux provides good video length…with Ubuntu Videos player, time looks weird (-24:00:00), but I’ve no experience with this container.
[EDIT: This is because I had missed ‘-e’. Seems ok with:

gst-launch-1.0 -e nvcamerasrc ! omxh264enc ! flvmux ! filesink location=output.flv

Also note that this won’t stop until you send Ctrl-C in the terminal where you’ve launched gst-launch. Note that this may soon fill the eMMC, I’d advise to record on external storage. If you want to record a given amount of time, you may specify frames number as num-buffers option of plugin nvcamerasrc.]