ffmpeg问题及解答
2015-07-28 09:06
141 查看
1、编码器打开失败
这是少配置了x264需要的编码参数吧
你把AVCOdecContext的qmin,qmax设置一下
用别的编码器就不一定要设置。
2、avformt_find_stream_info,解决卡住的问题(ffmpeg,
demux)
.............
if(avformat_open_input(&(handle->pFormatContext), "",
handle->pInputFormat, NULL) <0) {
av_free(handle->inputBuffer);
*errorCode = -4;
return FALSE;
}
(handle->fpState)(handle, 51);
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) {
.........
return FALSE;
}
...............
3、av_read_frame解出来的pkt对应的pts都是0
pts为零有可能是你printf的打印格式出错了,是long
long 格式 要用%lld
还是不对 得到的pts貌似是对应帧序列号x1000
嗯,你看一下time_base
v4l2_buffer的头文件是什么
doublepts = pkt->pts * av_q2d(is->video_st->time_base);
1、编码器打开失败
这是少配置了x264需要的编码参数吧
你把AVCOdecContext的qmin,qmax设置一下
用别的编码器就不一定要设置。
2、avformt_find_stream_info,解决卡住的问题(ffmpeg,
demux)
.............
if(avformat_open_input(&(handle->pFormatContext), "",
handle->pInputFormat, NULL) <0) {
av_free(handle->inputBuffer);
*errorCode = -4;
return FALSE;
}
(handle->fpState)(handle, 51);
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) {
.........
return FALSE;
}
...............
3、av_read_frame解出来的pkt对应的pts都是0
pts为零有可能是你printf的打印格式出错了,是long
long 格式 要用%lld
还是不对 得到的pts貌似是对应帧序列号x1000
嗯,你看一下time_base
v4l2_buffer的头文件是什么
doublepts = pkt->pts * av_q2d(is->video_st->time_base);
相关文章推荐
- 华为笔试题
- 谷歌面试题
- HDU 2846 Repository (Trie·统计子串)
- MapReducer中的多次归约处理
- HttpClient工具类
- jQuery实现隔行变色
- 关于iOS 7.1后下itms-services在线app
- Leetcode Q8 : String to Integer (atoi)
- java的jdbc简单封装方法
- mina2源码浅析——服务端的启动
- 高精度问题之大数相乘
- c++ primer 练习题 Section 2.8
- jQuery基本选择器
- 新的征程
- 黑马程序员 4000 ——Java基础---网络编程
- Nosql、NewSQL
- 多益网络笔试题
- 企业实施SAP项目的得与失
- matlab中有关cell的详细讲解
- hdu 5307 He is Flying [FFT]