|
发表于 2024-4-16 23:00:07
楼主
使用gstreamer编码器常用属性bitrate修改比特率,脚本内容改为:
self.pipeline = Gst.parse_launch('v4l2src device=/dev/video0 ! image/jpeg,width=1280,height=960,framerate=25/1 ! jpegdec ! videoconvert ! tee name=t \
t. ! queue ! mpph264enc bitrate = 1000 ! h264parse ! mpegtsmux ! hlssink target-duration=1 playlist-location=' + self.directory + '/playlist.m3u8 max-files=5 \
t. ! queue ! mpph265enc bitrate = 1000 ! h265parse config-interval=1 ! splitmuxsink name=muxer muxer=mpegtsmux location=' + self.directory + '/'+ '101_' +date_time +'segment%02d.ts max-size-time=30000000000 max-files=1000')1000为修改后的比特率,单位为kbps每秒。
|
|