<div dir="ltr"><div>I know this has been talked about around a thousands times on list. And I have read most of these threads but I am still getting what I think is strange behavior.</div><div><br></div><div>Here's what I'm trying to do:</div><div><br></div><div>I want to intercept every frame of an h.264 30 fps stream (not variable rate, life is good) and get its frame number and timestamp. So as I understand the doc, that should be in the GstBuf.dts and GstBuf.offset fields. I was going down the pad probe route but found that the identity plugin as per the doc a much easier and better route:</div><div><br></div><div>So my first pipeline looked like this:</div><div><br></div><div>... ! omxh264enc bitrate=10000000 ! video/x-h264, stream-format=(string)byte-stream ! h264parse ... ! identity name=nvcamid0 ! muxer<br></div><div><br></div><div>Then I connected to the "handoff" signal for my callback and saw the following:</div><div><br></div><div>dts : offset<br></div><div>0 : 816445297<br>106961 : 839200766<br>130469 : 849786717<br>151008 : 876858645<br>165810 : 909811526</div><div><br></div><div>I don't quite understand what the offset is here? I don't see how it can be a frame number but it is increasing monotonically (but it doesn't look like a per buffer offset either). Also the offset_end  is also MAXUINT64 (essentially NONE).<br></div><div><br></div><div>Another thread with a similar request as mine can be found here:</div><div><br></div><div><a href="http://gstreamer-devel.966125.n4.nabble.com/Getting-Each-h264-Frame-td4664932.html">http://gstreamer-devel.966125.n4.nabble.com/Getting-Each-h264-Frame-td4664932.html</a></div><div><br></div><div>In this case, the pipeline was augmented to push h264parse into a raw-video with frame alignment. I tried that via:</div><div><br></div><div>... ! omxh264enc bitrate=10000000 ! video/x-h264, 
stream-format=(string)byte-stream ! h264parse ... ! tee name=tp tp. ! queue ! muxer.video_0 \<br></div><div>tp. ! queue ! video/x-h264, stream-format=avc ! identity 
name=nvcamid0 <br></div><div><br></div><div>And now of course I see no callback being called and nothing gets recorded.<br></div><div><br></div><div>Anyway, can someone kindly just explain to me what the offset means above? And do I need to throw my h264parse output back into a video raw format again to get each frame number?<br></div><div><br></div><div>Again, my goal is to capture the timestamp and frame number (and soon geotag) as a separate stream to eventually write to disk as a meta file.<br></div><div><br></div><div>Thanks!<br></div><div><br></div><div>-aps<br></div></div>