AVFormatContext *formatCtx = NULL;
formatCtx = avformat_alloc_context();
AVDictionary* options = NULL;
av_dict_set(&options, "rtsp_transport", "tcp", 0);
avformat_open_input(&formatCtx, pszURLPath, NULL, &options) < 0);ffmepg 指定网络连接模式UDP还是TCP
最新推荐文章于 2024-04-06 22:06:50 发布
本文介绍了如何使用FFmpeg库中的API配置RTSP流通过TCP进行传输。具体步骤包括分配AVFormatContext结构体、设置传输选项为TCP并打开输入上下文。

1万+

被折叠的 条评论
为什么被折叠?



