AVDictionary* options = NULL;
av_dict_set(&options, "buffer_size", "1024000", 0);
av_dict_set(&options, "stimeout", "10000000", 0); //设置超时断开连接时间
av_dict_set(&m_opts, "rtsp_transport", "tcp", 0); // 解决FFmpeg警告'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
if(avformat_open_input(&pFormatCtx,url.c_str(),NULL,&options)!=0){
printf("Couldn't open input stream.\n");
return false;
}
[FFmpeg] 播放RTSP的一些常用配置选项
最新推荐文章于 2024-08-19 13:40:21 发布