FSA
FSA

Reputation: 97

How to set keyframe interval rpi camera with gstreamer

We are getting h264 video from rpi camera, but could not set keyframe interval. Is there a way? This is our command

libcamera-vid -t 0 --inline --bitrate 2000000 --width 1920 --height 1080 --framerate 30 --profile baseline -o - --camera 0 | gst-launch-1.0 -v fdsrc ! h264parse ! avdec_h264 ! videoconvert ! textoverlay text="cam" halignment=left valignment=bottom font-desc="Sans, 16" ! clockoverlay halignment=right valignment=top font-desc="Sans, 16" time-format="%Y-%m-%d %H:%M:%S" ! videoconvert ! x264enc bitrate=2000 speed-preset=ultrafast tune=zerolatency ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=5000

Upvotes: 0

Views: 33

Answers (1)

SeB
SeB

Reputation: 1626

You would use key-int-max property of x264enc such as:

... ! x264enc key-int-max=30 ...

for having at least a key frame each 30 frames.

Upvotes: 0

Related Questions