如何使用的ffmpeg / libav codeC / libstagefright [英] how to use ffmpeg/libavcodec/libstagefright

查看:178
本文介绍了如何使用的ffmpeg / libav codeC / libstagefright的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是有一个关于如何使用的问题的ffmpeg / libav codeC / libstagfright.cpp :我尝试 AV codec_open2(ST-> codeC,codeC)时,我有使用的ffmpeg设置 codeC-> ID codeC_ID_H264,codeC->名称 libstagefright_h264 ,这意味着我将打开 AV codeC ff_libstagefright_h264_de codeR

I just have a question about how to use ffmpeg/libavcodec/libstagfright.cpp: I try to avcodec_open2(st->codec, codec) when I have use ffmpeg to set codec->id as CODEC_ID_H264,codec->name as libstagefright_h264,that means I will open AVCodec ff_libstagefright_h264_decoder.

Stagefright_init-> OMX codeC :: Create->配置codeC-> initOutputFormat(元),这个过程只需要退出!它是一个bazinga!

but when Stagefright_init->OMXCodec::Create->configureCodec-> initOutputFormat(meta), the process just Quit ! It is a bazinga !

我知道元是元数据,其数据来源于 codeC->而额外,而在这里,它意味着SPS和PPS,对吗?

I knew that meta is Metadata, its data comes from codec->extradata, and in here, it means sps and pps, am I right?

我如何使用 libstagefright 成功地在ffmpeg的?有人可以给我一个例子?

How can I use libstagefright sucessfully in ffmpeg? Can somebody give me an example?

推荐答案

我其实工作提供stagefright我在Android上的ffmpeg库。我做了一些修改,从FFMPEG / libav原libstagefright.cpp,但仍不稳定。稳定后,我将创建的ffmpeg / libav队拉请求。你可以看看周围我的项目:在hwaccel的分支

Im actually working on providing stagefright to my ffmpeg library on Android. I made some changes to original libstagefright.cpp from ffmpeg/libav but it is still not stable. After stabilizing it I will create pull request for ffmpeg/libav team. You can look around on my project: in "hwaccel" branch.

它可在 AndroidFFmpeg / FFmpegLibrary / JNI / ffstagefright.cpp 的目录。

要使用这个库,你必须调用标准的ffmpeg的方法和标准的H264 codeC libstagefright_h264 codeC开insteed:

To use this library you have call standard ffmpeg methods and open insteed of standard h264 codec libstagefright_h264 codec:

AVCodec *codec = avcodec_find_decoder_by_name("libstagefright_h264");

这篇关于如何使用的ffmpeg / libav codeC / libstagefright的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆