Slow H264 1080P@60fps Decoding on Android Lollipop 5.0.2 SabreSD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Slow H264 1080P@60fps Decoding on Android Lollipop 5.0.2 SabreSD

4,578 Views
gurtajs4
Contributor II

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.

  1. sampledecodeApp – This is the Android Player source code which reads the size of H264 data from one file and H264 Elementary stream from another file.

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

  1. With the help of adb utility , adb push the dump60fps.h264 & dump60fps.size file into the /data/local/tmp directory onto the running system
  2. Import the sampledecodeApp  project into Eclipse or Android Studio and Clean build the Package.
  3. Run the Application from the IDE .

 

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

0 Kudos
5 Replies

1,547 Views
joanxie
NXP TechSupport
NXP TechSupport

when you play local file with these solution, do you have any problem? just for rtsp? pls check if your network is ok.

0 Kudos

1,547 Views
gurtajs4
Contributor II

Hi Guanqiong,

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.

Regards,

Gurtaj

0 Kudos

1,547 Views
gurtajs4
Contributor II

Hi Dan,

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?

Regards,

Gurtaj

0 Kudos

1,547 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Gurtaj,

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

Best Regards

Dan

0 Kudos

1,547 Views
gurtajs4
Contributor II

Ok Dan,

I will wait for the response from your engineer.

Regards,

Gurtaj

0 Kudos