i.MX 8M: I can't play 4K video on Android.

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

i.MX 8M: I can't play 4K video on Android.

Jump to solution
1,035 Views
gabper3x
Contributor II

Hi, I'm trying to make an application which has the function play HEVC encoded 4K 60fps video stream on Android system.
But it becomes as below.

4K 24fps -> success
4K 60fps -> fail

Logcat told some frame droppings.
I tried to increase heap size of the system, but got same result.
It seems the problem is not a memory allocation.
I found a case which FFmpeg does not work correctly against V4L2 M2M option (specify hardware decoding) in 64-bit Raspberry Pi 4.
Could my case same to that?

CPU: i.MX 8M(Quad)
SoM: DART-MX8M
Media Player: LibVLC.Android 3.5.1
OS: Android 11

Best Regards,

0 Kudos
Reply
1 Solution
713 Views
joanxie
NXP TechSupport
NXP TechSupport

I have tested this with my download HEVC 4k@60fps on android 11_2.6.0 successfully, I want to test kernel 5.4.47 kernel (android 11_1.2.0), but refer to the release note, this version is only for i.MX 8M Plus (Silicon Revision A1) EVK Board and Platform, so I suggest that you can upgrade your android to the newer version

View solution in original post

0 Kudos
Reply
10 Replies
992 Views
joanxie
NXP TechSupport
NXP TechSupport

what kind of fail do you get?  pls test on the linux firstly, android 11 uses 5.10.52 as kernel, and did you try other media files to playback? all of them are failed or just this one?

0 Kudos
Reply
980 Views
gabper3x
Contributor II

I try to play HEVC videos which are as below.

video namesizefpsdynamic rangeprofile
A4K24SDRMain
B4K60HDRMain10

 

results on Yocto 3.0(kernel=5.4.24 using Gstreamer)

  • A = Success
  • B = Success

Gstreamer option:

gst-launch-1.0 -v filesrc location=<File Path> ! tsdemux ! h265parse ! vpudec ! autovideosink

 

results on Android 11(kernel=5.4.47 using VLC)

  • A = Success
  • B = Fail

VLC option:

:codec=mediacodec_ndk,mediacodec_jni,all

 

Other video codec(H.264) is no problem.

Error logs of video B on Android is shown in the attachement.

I think It's something matter of during from the instruction of hardware decoding to the actual VPU behavior.

Regards,

0 Kudos
Reply
714 Views
joanxie
NXP TechSupport
NXP TechSupport

I have tested this with my download HEVC 4k@60fps on android 11_2.6.0 successfully, I want to test kernel 5.4.47 kernel (android 11_1.2.0), but refer to the release note, this version is only for i.MX 8M Plus (Silicon Revision A1) EVK Board and Platform, so I suggest that you can upgrade your android to the newer version

0 Kudos
Reply
697 Views
gabper3x
Contributor II

It's very interesting. My EVK is not NXP's so the vendor may customize some settings for kernel 5.4.47.
Actually I already know a solution which can play this video by VPU. But this knowledge is very important that make my system more better.
Thank you for supporting.

 

0 Kudos
Reply
954 Views
joanxie
NXP TechSupport
NXP TechSupport

did you try other player on android? pls share your video here

0 Kudos
Reply
952 Views
gabper3x
Contributor II

Q. did you try other player on android?

It was failed on Cactus Player and Gstreamer.

But I tried two another Android devices(on VLC). All of them succeeded to play.

 

Q.  pls share your video here

It is difficult because uploading is prohibited by the broadcasting law.

I'll find alternative videos which occurs the same problem.

0 Kudos
Reply
942 Views
gabper3x
Contributor II

I found a similar video. the same problem occurs with this file.

https://4kmedia.org/travelxp-4k-hdr-hlg-sample/

 

0 Kudos
Reply
803 Views
joanxie
NXP TechSupport
NXP TechSupport

I was blocked by this link, do you mind sharing again? 

0 Kudos
Reply
775 Views
gabper3x
Contributor II

sorry but this is not mine. could you ask anyone to visit this site to get purposed video? 

0 Kudos
Reply
729 Views
joanxie
NXP TechSupport
NXP TechSupport

I still was blocked by the link even I changed another network, I will try to download one to test for you, pls wait

0 Kudos
Reply