关于 ffmpeg 中av_rescale_rnd 和avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, 的含义
来源:互联网 发布:mysql insert into 慢 编辑:程序博客网 时间:2024/05/17 01:33
int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, enum AVRounding) av_const;
这个函数在ffmpeg中主要是将编码视频的pts等由原来的容器中规定的转化为现在容器规定的大小,总的来说是这样的:
a*bq/cq;
本人在代码中是这样用的:
npkt.pts=av_rescale_q_rnd(npkt.pts,instream->time_base,outstream->time_base,AV_ROUND_NEAR_INF);
其中time_base结构是这样的:
den,num;
den是分母,num是分子,num/den是1/帧率;
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,const AVFrame *frame, int *got_packet_ptr);
是将帧frame编码为avpkt遵照AVCodecContext 格式。
0 0
- 关于 ffmpeg 中av_rescale_rnd 和avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, 的含义
- ffmpeg 中av_rescale_rnd 的含义
- ffmpeg 中av_rescale_rnd 的含义
- ffmpeg 中av_rescale_rnd 的含义
- ffmpeg 中av_rescale_rnd 的含义
- ffmpeg 中av_rescale_rnd 的含义
- ffmpeg 中av_rescale_rnd 的含义
- ffmpeg 中av_rescale_rnd 的含义
- FFmpeg 中AVPacket的使用
- FFmpeg 中AVPacket的使用
- FFmpeg中AVPacket和AVFrame关系
- FFmpeg中AVPacket处理函数av_free_packet()和av_packet_free()的区别以及用法
- 关于ffmpeg的avpacket里的pts问题
- AVFormatContext,AVStream,AVCodecContext,AVPacket,AVFrame之间的关系分析
- FFMPEG AVPacket
- FFMPEG AVPacket
- AVCodecContext结构的 frame_size 字段含义
- FFMPEG的编码延时,avcodec_encode_video2出帧慢,实时编码
- 静态局部变量求n的阶乘
- java基础知识
- CentOS 6.6安装gcc4.8.2
- ACM竞赛,java编程总结
- RESTClient调试RESTful Webservice
- 关于 ffmpeg 中av_rescale_rnd 和avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, 的含义
- JAVASCRIPT的基本知识
- Android初体验之Monkey和MonkeyRunner
- python list使用
- C语言 typedef总结
- IOS项目打包上传 遇到的问题
- POJ1276 Cash Machine(动态规划)
- 二叉树的深度和宽度
- RBF网络