omxh264enc not sps/pps with first I frame

1.use this command : gst-launch-1.0 videotestsrc num-buffers=100 ! ‘video/x-raw, width=1920, height=1080, framerate=60/1, format=UYVY’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1’ ! omxh264enc control-rate=2 bitrate=1000000 preset-level=3 SliceIntraRefreshEnable=true SliceIntraRefreshInterval=30 insert-sps-pps=1 ! ‘video/x-h264, stream-format=(string)byte-stream’ ! filesink location= b.h264

  1. hexedit b.h264 , it is 00 00 00 01 65…, not have sps and pps. file size is 222K

3.if use this command, gst-launch-1.0 videotestsrc num-buffers=100 ! ‘video/x-raw, width=1920, height=1080, framerate=60/1, format=UYVY’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1’ ! omxh264enc control-rate=2 bitrate=1000000 preset-level=3 SliceIntraRefreshEnable=true SliceIntraRefreshInterval=30 ! h264parse ! ‘video/x-h264, stream-format=(string)byte-stream’ ! filesink location= b.h264

  1. hexedit b.h264 , it is 00 00 00 01 09 F0 00 00 00 01 67 …, It have sps and pps. but file size is 159K

so, I found the first I frame not have sps/pps, how can i add sps/pps with first I frame ?

Hi,
Please add h264parse and try again:

gst-launch-1.0 videotestsrc num-buffers=100 ! 'video/x-raw, width=1920, height=1080, framerate=60/1, format=UYVY' ! nvvidconv ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1' ! omxh264enc control-rate=2 bitrate=1000000 preset-level=3 SliceIntraRefreshEnable=true SliceIntraRefreshInterval=30 insert-sps-pps=1 ! <b>h264parse</b> ! 'video/x-h264, stream-format=(string)byte-stream' ! filesink location= b.h264

I have try it。it with 00 00 00 01 67 started,but file size is 159K。so
I think it lost first I frame and P frame with it。
It’s not resolved。

Hi,
Please be more specific on what the issue is. We have inspected the stream via jm decoder and it can be well decoded. Also h264parse is very reliable 3rdparty plugin.