h264 synchronization

Nicolas Dufresne nicolas at ndufresne.ca
Mon Apr 29 12:09:39 UTC 2019


Le lun. 29 avr. 2019 04 h 55, Andressio <www.andreabertolaso at gmail.com> a
écrit :

> Dear all I have a camera which emits a h264 stream via rtsp. This stream
> follows two paths: the firts stores the stream as raw h264 (this in handled
> by an external application) and the second one performs some real-time
> video analysis operations. The second path generates some events (like
> moving objecs) which should be stored in a database and later displayed in
> onverlay on the recorded videos coming from path one. As the recording and
> the video analysis might be sligthly shifted in time (let's say that a
> random number of frames are dropped before the external application starts
> recording) I cannot rely on the frame number. Also I would like to avoid to
> rely on a NTP to sync the timestamps because even a difference of a bounch
> of milliseconds might lead to a bad user experience in terms of ovelayed
> info. I am not that expert in h264 and since now I've used opencv to decode
> frames, but I've read that h264 streams are packed into NAL unit. Are these
> units numbered in some way? and if so, can these info be extracted using
> gstreamer? If a


Not really. In general you should avoid storing raw h264 for this purpose.
Instead use a container, like streamable matroska or Mpeg ts.

counter was naturally embedded in the h264 stream and it could be reached I
> think that would be the best synchronization option. Before I start editing
> opencv's source code or change the video analysis application to use pure
> gstreamer I need to know if this can be achieved in some way. Thanks in
> advance for your help!
> ------------------------------
> Sent from the GStreamer-devel mailing list archive
> <http://gstreamer-devel.966125.n4.nabble.com/> at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190429/1080f0a1/attachment-0001.html>


More information about the gstreamer-devel mailing list