[Libav-user] I want to pass side data in RTSP stream

Anton Sviridenko anton at corp.bluecherry.net
Wed May 24 12:44:14 EEST 2017

and I am searching for most effective ways to do that.

There is a DVR server that sends video stream in realtime from
security cameras and there
are clients that receive and display that stream.
DVR server performs motion detection and info about frames where
motion is detected needs to be passed somehow to clients as a side
data. 1 bit per video frame/group of frames should be enough.

I think about adding additional substream with AVMEDIA_TYPE_DATA type or
AVMEDIA_TYPE_ATTACHMENT (which one is better?),
but if this 1 bit of data can be added to existing video packets that
would be perfect.
Video is almost always encoded in H264. Server does not do encoding
itself, it just receives
streams from other sources (IP cams or hardware capture cards) and
muxes them in RTSP streams for clients.

Is there some code sample that shows working with AVMEDIA_TYPE_DATA streams?
Do I need some codecs in this case or I have to just put AVPacket-s
with my custom data
and get them on receiving side?

More information about the Libav-user mailing list