5

Am doing a project on live video broadcasting.

On sender side, am capturing the video using an android phone, getting the H264 frames and packetising them into RTP packets following the respective RFCs ->RFC 3984. The sending side has no issues. the stream is received and played by VLC.

On the receiver side, again an android mobile. i got the RTP packets successfulyy. its a RTP stream that contains H264 Dynamic Payload. i want to unpack this stream and decode it and render it on the receiver side using android mediacodec API. Somebody please guide me on how to realise this.

thank you.

4

2 回答 2

1

您需要通过输入参数集和正确的 nalu 标头来解包。这是一个相对简单的小文档,我不能为此分享我的代码,但我可以分享我的硬件 android 解码器内容,这些内容在上一篇文章中:

MediaCodec 在高质量流上崩溃

这就是实时解码 h.264 所需要做的一切,剩下的就交给 android 了。

于 2015-09-29T15:43:50.917 回答
0

如果您为 MediaCodec 设置了视频视图,您需要从 UDP 解包 RTP 数据包并将每个帧传递给 MediaCodec,您将渲染您得到的内容,这就是我将尝试做的事情,将向您更新结果

于 2014-05-14T06:37:02.777 回答