ffmpge升级指南2 ffmpeg的编解码

解码

解码步骤
1 查找解码器(avcodec_find_decoder)
2 打开解码器(avcodec_open2)
3 解码(avcodec_decode_video2)

#include <libavcodec/avcodec.h>  // 加入编解码的库
AVCodec  编解码结构体
AVCodecContext  编码器上下文
AVFrame  解码后的帧

av_frame_alloc/av_frame_free()  // AVFrame 的分配与释放
avcodec_alloc_context3()/avcodec_free_context()  // 创建与释放编解码器的上下文

H264编码

1 查找编码器( avcodec_find_encoder_by_name )
2 设置编码参数 并打开编码器( avcodec_open2 )
3 编码( avcodec_encode_video2 )

 

解码

// An highlighted block
var foo = 'bar';

解码

// An highlighted block
var foo = 'bar';

解码

// An highlighted block
var foo = 'bar';

解码

// An highlighted block
var foo = 'bar';

解码

// An highlighted block
var foo = 'bar';
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值