代码AVDictionary*pOptions=NULL;handle->pFormatContext->probesize=100*1024;handle->pFormatContext->max_analyze_duration=5*AV_TIME_BASE;if(avformat_find_stream_info(handle->pFormatContext,&pOptions)<0)说明这样设置probesize和max_analyze_d..
分类:
其他好文 时间:
2017-10-24 01:25:30
阅读次数:
118
1.设置rtsp超时 AVDictionary* opts = NULL; av_dict_set(&opts, "rtsp_transport", m_bTcp ? "tcp" : "udp", 0); //设置tcp or udp,默认一般优先tcp再尝试udp av_dict_set(&opt ...
分类:
其他好文 时间:
2017-10-19 11:06:39
阅读次数:
814
本文是我的 FFMPEG Tips 系列的第五篇文章,准备介绍下 ffmpeg 提供的一个非常好用的健值对工具:AVDictionary,特别是对于没有 map 容器的 c 代码,可以充分利用它来配置和定义播放器的参数,ffmpeg 本身也有很多 API 通过它来传递参数。 1. AVDiction ...
分类:
其他好文 时间:
2017-04-14 22:19:55
阅读次数:
197
本文的示例程序记录了FFmpeg的libavutil中几种工具函数的使用方法:AVLog:日志输出AVOption (AVClass):选项设置AVDictionary:键值对存储ParseUtil:字符串解析几个libavutil的工具AVLogAVLog是FFmpeg的日志输出工具。在FFmpeg中所有的日志输出不是通过printf()函数而是通过av_log()函数。av_log()会最终调...
分类:
其他好文 时间:
2015-07-18 17:06:41
阅读次数:
158
AVFormatContext*formatCtx=NULL;formatCtx=avformat_alloc_context();AVDictionary*options=NULL;av_dict_set(&options,"rtsp_transport","tcp",0);avformat_op...
分类:
其他好文 时间:
2015-05-25 18:38:32
阅读次数:
222
最新使用FFmpeg进行H264的编码时,发现视频编码有延迟,不是实时编码,进过一番研究发现,只要在调用avcodec_open2函数
打开编码器时,设置AVDictionary参数即可,关键代码如下:
avcodec_open2函数:
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDiction...
分类:
其他好文 时间:
2014-10-23 16:26:29
阅读次数:
648