I'm developing a JAVA RTP Streaming App for a company project, which should be capable of joining the Multicast Server and receive the RTP Packets.Later I use the H264 Depacketizer to recreate the a complete frame from the NAL FU (Keep append the data until End Bit & Marker Bit set )
I want to decode and display a raw h264 video byte stream in Android and therefore I'm currently using the MediaCodec classes with Hardware Decoder configured.
The Application is Up and running for the Jeallybean (API 17). Various Resolutions which I need to decodes are :
480P at 30/60 FPS
720P/I at 30/60 FPS
1080P/I at 30/60 FPS
Recently, Due to System Upgrade we are porting the App to Android L Version 5.0.2. My App is not capable of playing the high resolutions videos like 720p@60fps and 1080p@60fps.
For the debugging purpose I started feeding the Elementary H264 Frames with size from the dump file to MediaCodec and found out the Video is Lagging.
There are timestamps on the sample video I used and it seems the actual time taken to proceed by 1 sec in Rendered Video is more
Below is my sample code and links to sample video
h264 video https://www.dropbox.com/s/cocjhhovihm8q25/dump60fps.h264?dl=0
h264 framesize https://www.dropbox.com/s/r146d5zederrne1/dump60fps.size?dl=0
The content of sampledecodeApp.7z package.
The code is similar to the CTS Test code. In short it reads the size of frame line by line from dump60fps.size file and frame size of data from dump60fps.h264 file.
H264 Sample Video Detail
Resolution – 1920x1080p
FPS – 60 framesPerSecond
Bitrate – 25MBPS average
Steps to Install the Application
Note: Before Installing and Launching the app, We need to push the dumps into /data/loca/tmp directories
The Prebuild apk is available in path sampledecodeApp\bin\sampledecode.apk
Original Attachment has been moved to: sampledecode.apk.zip
Original Attachment has been moved to: sampledecodeApp.7z.zip
I have verified the playback of h264 stream reading from the file.
Comparing side by side with two SabreSD board running Jeallybean 4.2.2_1.0.0ga and Lollipop L5.0.0_1.0.0-ga and above Android App.
I see that Both the Video start at same time, but on Lollipop Video Slows Down and by the time the video is about to end, We have Video 5-10 Seconds of Lag
I am not considering of playing this on network. Even though I check and there is no network delay and packets are received as expected.
I remember you from Android jb4.2.2_1.1.0-GA source code thread and you helped me on getting the BSP.
Thanks for you help. I am looking forward for the solution or some suggestions to the above Issue which I reported.
Can I ask How long it will take for someone to verify the same?
Welcome to our community again.About the questions you ask I am so sorry I am not good at it. But we engineers will give you reply in 48hours.
Have a nice day