谁有调用ffmpeg中h264的例子发一个

jingzhonga 2011-02-18 02:57:04
加精
如题目
...全文
3050 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
zzl6220 2011-07-21
  • 打赏
  • 举报
回复
mark
macrojj 2011-05-10
  • 打赏
  • 举报
回复
初始化 注册 选择解码器 也可以输入文件名 遍历找出解码器 然后video decode 检查返回 和 buf

buf的格式为之前设置的格式

看看 ffmpeg的tutorial 有完整的例子

ffplay.c 可能太长了些。 里面还有些播放控制的功能。
许文君 2011-04-22
  • 打赏
  • 举报
回复
上chinavideo吧,上面有h264板块,
http://bbs.chinavideo.org/viewthread.php?tid=4165&extra=page%3D1
bugluo 2011-04-21
  • 打赏
  • 举报
回复
是不是这个代码就可以读这个编码的视频了?
lindianhao 2011-04-20
  • 打赏
  • 举报
回复
效果怎么样?
buhuiwan1361 2011-04-19
  • 打赏
  • 举报
回复
有开源的ffmpeg,可以下载一个研究一下。
lmc158 2011-04-18
  • 打赏
  • 举报
回复
解码器http://www.bairuitech.com/html/ruanjianxiazai/20080727/101.html
张见 2011-04-18
  • 打赏
  • 举报
回复
看起来很强大
BullWeiHaiDong 2011-04-18
  • 打赏
  • 举报
回复
正找呢,谢谢LZ
gwemail2003 2011-04-17
  • 打赏
  • 举报
回复
学习而来。。。。
syp413165531 2011-04-16
  • 打赏
  • 举报
回复
解码器。。。
sun768 2011-04-16
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 netlib 的回复:]

AVCodec h264_decoder = {
"h264",
CODEC_TYPE_VIDEO,
CODEC_ID_H264,
sizeof(H264Context),
decode_init,
NULL,
decode_end,
decode_frame,
CODEC_CAP_DR1 | CODEC……
[/Quote]



虽然自己不会写,学习了~~~
lovelyapple912912 2011-04-16
  • 打赏
  • 举报
回复
飘过,不过不是很懂,就是赚点积分
hehijttgeg 2011-04-16
  • 打赏
  • 举报
回复
呵呵,二楼正解,你也可以参考ffmpeg中的ffplay.c中的代码,调用流程是一样的
CyberLogix 2011-04-07
  • 打赏
  • 举报
回复
呵呵,二楼正解,你也可以参考ffmpeg中的ffplay.c中的代码,调用流程是一样的
念茜 2011-04-07
  • 打赏
  • 举报
回复
解码器很不错
漁_夫 2011-03-29
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 crystal28 的回复:]

解码器http://www.bairuitech.com/html/ruanjianxiazai/20080727/101.html
[/Quote]

Good
bcj00000 2011-03-29
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 crystal28 的回复:]

解码器http://www.bairuitech.com/html/ruanjianxiazai/20080727/101.html
[/Quote]
good
netlib 2011-02-18
  • 打赏
  • 举报
回复
AVCodec h264_decoder = {
"h264",
CODEC_TYPE_VIDEO,
CODEC_ID_H264,
sizeof(H264Context),
decode_init,
NULL,
decode_end,
decode_frame,
CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
// flush_dpb,
// NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10")
};

m_codec = &h264_decoder;
m_c = NULL;
m_picture = NULL;
m_picture = NULL;

avcodec_init();

m_c= avcodec_alloc_context();
m_picture= avcodec_alloc_frame();

if(m_codec->capabilities&CODEC_CAP_TRUNCATED)
m_c->flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */

if (avcodec_open(m_c, m_codec) < 0) {
return /*false*/;
}

H264Context *h = (H264Context *)m_c->priv_data;
MpegEncContext *s = &h->s;
s->dsp.idct_permutation_type =1;


dsputil_init(&s->dsp, m_c);

got_picture = 0;

希望有所帮助

3,120

社区成员

发帖
与我相关
我的任务
社区描述
塞班系统(Symbian系统)是塞班公司为手机而设计的操作系统,它的前身是英国宝意昂公司的 EP ( Electronic Piece of cheese)操作系统。
社区管理员
  • Symbian社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧