<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">Le mar. 23 oct. 2018 09 h 27, nucleus_wind <<a href="mailto:felixjojo199@gmail.com">felixjojo199@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
My setup a raspberry pi 3 with pi camera module listed here:<br>
<a href="https://www.amazon.com/Raspberry-Pi-Camera-Module-Megapixel/dp/B01ER2SKFS/ref=sr_1_3?ie=UTF8&qid=1540276869&sr=8-3&keywords=raspberry+pi+camera+module&dpID=41ocSRel7eL&preST=_SY300_QL70_&dpSrc=srch" rel="noreferrer noreferrer" target="_blank">https://www.amazon.com/Raspberry-Pi-Camera-Module-Megapixel/dp/B01ER2SKFS/ref=sr_1_3?ie=UTF8&qid=1540276869&sr=8-3&keywords=raspberry+pi+camera+module&dpID=41ocSRel7eL&preST=_SY300_QL70_&dpSrc=srch</a><br>
<br>
My pipeline looks like following:<br>
`gst-launch-1.0 v4l2src do-timestamp=TRUE device="/dev/video0"<br>
extra-controls="foo,h264_profile=0" !<br>
video/x-h264,stream-format=byte-stream,alignment=au,width=640,height=480 !<br>
h264parse ! video/x-h264,stream-format=avc,alignment=au,profile=baseline !<br>
appsink`<br>
But I coded it up as a gstreamer application so that I can print out the dts<br>
and pts for every frame.</blockquote></div></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The following is the output from my gstreamer application:<br>
<br>
<br>
I set the "is header" and "isKey" base on GST_BUFFER_FLAG_IS_SET(buffer,<br>
GST_BUFFER_FLAG_HEADER) and  !GST_BUFFER_FLAG_IS_SET(buffer,<br>
GST_BUFFER_FLAG_DELTA_UNIT) for each frame buffer.<br>
<br>
My questions are:<br>
- why are the dts greater than pts? It seems to be the effect of<br>
do-timestamp=TRUE. If I remove do-timestamp=TRUE, the dts seems to come<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br><span style="font-family:sans-serif">Using do-timestamp with v4l2src will result in invalid (dts > pts). You should leave the default, which will derive the hw timestamp to pts and leave the dts to none.</span><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
straight from the driver. The dts starts at 0 and increments by 33333333 for<br>
every frame. The pts still get synced but pts are greater than dts for all<br>
frames.<br>
- why aren't pts == dts for key frames? </blockquote></div></div><div dir="auto"><br></div><div dir="auto">There should be no dts from v4l2src because it's not supported by drivers. For H264, be aware that pts == dts on B frames (not I frames), when B-Frames are enabled.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">They dont equal each other whether I<br>
set do-timestamp=TRUE or not. I think I have disabled B frames by setting<br>
h264 profile to baseline which should enforce pts == dts for key frames.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">v4l2src does not implement h264 profile negotiation. If this driver supports it now, then contributions are welcome of course.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'm new to gstreamer and I'm trying to get an understanding of what is going<br>
on here. Any help is really appreciated.<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>