Insert metadata in the stream

How can I insert the st3d Metadata in a h264 stream?

Reference to definition/metadata

This looks to be additional metadata in container level(.mp4 or .mkv). If you use gstreamer, the containers are open source and you can check qtmux(.mp4) or matroskamux(.mkv). The source code is in
If it does not have implementation of the additional metadata, you would need to do customization.

In jetson_multimedia_api, we have samples to demonstrate hardware functions. The sample 01_video_encode is to get h264 stream. There is no container and you have to implement it.

Does this apply to the flvmux as well ?

As I understand the rtmpsink only takes flvmux as an input

The document does not contain flv, so it may not work in rtmpsink.