Reputation: 381
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.
Upvotes: 5
Views: 3628
Reputation: 162
You will need to depacketize by putting in the parameter sets and the correct nalu header. This is relatively simple bar little documentation and i cannot share my code for this but i can share my hardware android decoder stuff which is in a previous post:
MediaCodec crash on high quality stream
This is all you need to do to decode h.264 in realtime android does the rest.
Upvotes: 1
Reputation: 11
You need to depacketize the RTP packets from UDP and pass each frame to MediaCodec if you set a videoview for your MediaCodec you will have render what you get, This is what I will try to do will update you with the results
Upvotes: 0