Hello Community,
I am working on encoding and saving camera stream on my imx8mp evk board.
I have custom built yocto image flashed on the evk. I am using gstreamer and hardware accelerated based H264 encoding. My command line is as follows;
gst-launch-1.0 -e v4l2src device=/dev/video3 ! videoconvert ! "video/x-raw, width=1280, height=720" ! vpuenc_h264 bitrate=10000 ! h264parse ! splitmuxsink location=video%0d.mp4 max-files=10 max-time=3000000000
This works as video is saved in the current folder.
However, when i try to check the properties of the saved video, the bitrate field is 0 as shown below
Analyzing file:///home/root/video0.mp4
====== AIUR: 4.6.2 build on Aug 27 2021 07:05:03. ======
Core: MPEG4PARSER_06.17.18 build on Apr 14 2021 02:39:48
file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm_elinux.so.3.2
------------------------
Track 00 [video_0] Enabled
Duration: 0:00:18.053666000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)avc, width=(int)1280, height=(int)720, framerate=(fraction)1500/49, codec_data=(buffer)0142e00affe100182742e00a898d502802dd3640000003004000000f03c5896e01000528ce025c80
------------------------
====== V4L2DEC: 1.18.0 build on Aug 6 2021 09:27:51. ======
Done discovering file:///home/root/video0.mp4
Properties:
Duration: 0:00:18.053668000
Seekable: yes
Live: no
container: Quicktime
video: H.264 (Constrained Baseline Profile)
Stream ID: 9d2db7c1762a154a4867c0ea5c49bd5b2adb6a2e95c54d44551f432e6b93a155/0
Width: 1280
Height: 720
Depth: 24
Frame rate: 1500/49
Pixel aspect ratio: 1/1
Interlaced: false
Bitrate: 0
Max bitrate: 0
As I suspect that the vpuenc_h264 element is not setting the bitrate. Just to cross verify, I ran similar command on ubuntu by replacing vpuenc_h264 with x264enc element and the output video has the bitrate property set.
Could anyone guide me on this issue, if I am missing out something or the process I am following is wrong.
Thanks