ffmpeg解码降低延迟记录

前言

无论是ffmpeg.exe还是libffmpeg等,均有可有效优化延迟的参数,现在列出部分实际工作中使用的记录。

操作记录

libffmpeg

	AVDictionary *options = NULL;
	av_dict_set(&options, "fflags", "nobuffer", 0); //无缓存,解码时有效
	//av_dict_set(&options, "timeout", "10", 0);
	if (avformat_open_input(&m_pFormatContext, filename, NULL, &options) != 0)
	{
    
    
		log_print(LOG_ERR, "avformat_open_input failed, %s\r\n", filename);
		return FALSE;
	}
	//减低延迟操作:减少探测的时间
	m_pFormatContext->probesize = 100 * 1024;
	m_pFormatContext->max_analyze_duration = 5*AV_TIME_BASE;

	avformat_find_stream_info(m_pFormatContext, NULL);

技术交流


GB28181、35114、安防、WebRTC、互联网直播交流Q群:1033175645

猜你喜欢

转载自blog.csdn.net/jiuaiwo1314/article/details/108374930
今日推荐