[Libav-user] 020509 - How can I request camera packets as TCP on old libav?

hamidi hamidi at gmail.com
Mon Jul 31 18:01:22 EEST 2023

I'm using v2.8.7 of ffmpeg (libav) libraries. Now I need to get packets
from cameras via TCP instead of UDP. In the latest version of libav, we
have rtsp.h and it contains the definition of RTSPState structure. Then
with such a change in my code:

mFormatContext = avformat_alloc_context();
RTSPState *rt = mFormatContext->priv_data;
rt->lower_transport = RTSP_LOWER_TRANSPORT_TCP;

I may request libav to get frames via TCP protocol instead of UDP with RTSP
link to the camera. But the old version of libav doesn't support this. For
some reason, we prefer not to change the libav version. The affected codes
should be changed too, and we've not much time. Is there any
straightforward way to do that?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20230731/ef561b02/attachment.htm>

More information about the Libav-user mailing list