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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,036 次查看
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 项奖励
回复
1 解答
714 次查看
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 项奖励
回复
10 回复数
993 次查看
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 项奖励
回复
981 次查看
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 项奖励
回复
715 次查看
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 项奖励
回复
698 次查看
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 项奖励
回复
955 次查看
joanxie
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
953 次查看
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 项奖励
回复
943 次查看
gabper3x
Contributor II

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

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

 

0 项奖励
回复
804 次查看
joanxie
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
776 次查看
gabper3x
Contributor II

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

0 项奖励
回复
730 次查看
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 项奖励
回复