AnsweredAssumed Answered

i.MX53 Android cannot play smoothly when video is H.264 encoded, MP4 formatted, and in a HTTP server.

Question asked by yokai.yang on May 5, 2014
Latest reply on Nov 19, 2014 by Daiane Angolini

Hi, experts,

We have an i.MX53 SABRE tablet and run Android r10.4 downloaded from freescale. We have noticed that while playing Youtube videos, there is an occasional hiccup in audio.

After testing about that, the occasional hiccup happens when all of these conditions below :

  1. videos are formatted to MP4.
  2. videos are encoded to H.264(AVC).
  3. vidoes are in a HTTP server.


This issue doesn't exist when playing locally or other kinds of encodings.

The result of logcat shows nothing about it.


I think there were some problem when OMXPlayer parses MP4 from HTTP server ?

Maybe the buffer is too small to play smoothly ? But where do we modify the size of buffer ?

Where can we get the source code of OMXPlayer for Android 2.3.7 ?


Please help us about this issue. Thank you so much in advance.


** Update **

I am sorry about my poor English. Please feel free to ask me, if there was anything wrong with my wording or expressing.


And here are the video format we have tried.

 

File FormatVideo Encoding TypeAudio Encoding TypeVidoes in a HTTP server in LANVideos in an USB disk
MP4H.264AAChiccupno problem
MP4H.264MP3hiccupno problem
MP4H.264No audiohiccupno problem
MP4MPEG-4AACno problemno problem
AVIH.264MP3no problemno problem
3GPH.263AACno problemno problem
MKVH.264AACno problemno problem


** Update **

It is not a Browser issue. We modified ApiDemos (R10.4/development/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java) and test. The "hiccups" exists.

 

** Update **

I tried to make VPU buffer size larger, but not sure where to do that.

Modification in mxc_vpu_data may not affect OMXPlayer. New tests are listed below:

1. .iram_enable = true, and set .iram_size from 0x14000 to 0x20000. The iram driver failed while probing. Boot log:

In fsh_shw_smalloc (km): partition_base:d09b0000 partition_base_phys: 07000000

writing UMID and MAP to secure the partition

------------[ cut here ]------------

WARNING: at arch/arm/plat-mxc/iram.c:41 iram_alloc+0x50/0x88()

Modules linked in:

[<c013258c>] (unwind_backtrace+0x0/0xf0) from [<c0154584>] (warn_slowpath_common+0x4c/0x64)

[<c0154584>] (warn_slowpath_common+0x4c/0x64) from [<c01545b4>] (warn_slowpath_null+0x18/0x1c)

[<c01545b4>] (warn_slowpath_null+0x18/0x1c) from [<c0140470>] (iram_alloc+0x50/0x88)

[<c0140470>] (iram_alloc+0x50/0x88) from [<c03d5880>] (vpu_dev_probe+0x48/0x288)

[<c03d5880>] (vpu_dev_probe+0x48/0x288) from [<c030cb7c>] (platform_drv_probe+0x18/0x1c)

[<c030cb7c>] (platform_drv_probe+0x18/0x1c) from [<c030bce8>] (driver_probe_device+0xc8/0x184)

[<c030bce8>] (driver_probe_device+0xc8/0x184) from [<c030be04>] (__driver_attach+0x60/0x84)

[<c030be04>] (__driver_attach+0x60/0x84) from [<c030b4f8>] (bus_for_each_dev+0x48/0x84)

android_usb gadget: high speed config #1: android

[<c030b4f8>] (bus_for_each_dev+0x48/0x84) from [<c030ae34>] (bus_add_driver+0x98/0x214)

[<c030ae34>] (bus_add_driver+0x98/0x214) from [<c030c0f0>] (driver_register+0xa8/0x138)

[<c030c0f0>] (driver_register+0xa8/0x138) from [<c001eb88>] (vpu_init+0xc/0x2c)

unwind: Unknown symbol address c001eb88

unwind: Index not found c001eb88

---[ end trace 4ea59c5953f42cbe ]---

usb 2-1.1: new full speed USB device using fsl-ehci and address 3

VPU initialized

The OMXPlayer still can work, but the issue still exists. Nothing changes.

2. .iram_enable = true, and set .iram_size from 0x14000 to 0xA000. Nothing changes. The OMXPlayer issue still exists, but the frequency of "hiccups" doesn't increase.

3. .iram_enable = false. Nothing change. The OMXPlayer issue still exists, but the frequency of "hiccups" doesn't increase.

 

** Update **

Alternately I changed the MP4 file from 640x360 to 432x240 pixels and test again. The "hiccups" still happend.

 

** Update **

I have changed CONFIG_DMA_ZONE_SIZE from 96 to 118 or higher in Linux kernel source code.

Nothing changed.

 

** Update **

I'd tried to increase VPU DMA memory size to 8M by modifing vm_end in drivers/mxc/vpu/mxc_vpu.c.

git diff drivers/mxc/vpu/mxc_vpu.c

diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c

index fb6e1cf..aa25d25 100644

--- a/drivers/mxc/vpu/mxc_vpu.c

+++ b/drivers/mxc/vpu/mxc_vpu.c

@@ -590,10 +595,16 @@ static int vpu_mmap(struct file *fp, struct vm_area_struct *vm)

        if (vm->vm_pgoff && (vm->vm_pgoff == offset))

                return vpu_map_vshare_mem(fp, vm);

        else if (vm->vm_pgoff)

+{

+       vm->vm_end = vm->vm_start + SZ_8M;

                return vpu_map_dma_mem(fp, vm);

+}

        else

+{

+       vm->vm_end = vm->vm_start + SZ_8M;

                return vpu_map_hwregs(fp, vm);

}

+}

 

But I still could hear the hiccups.

 

** Update **

 

We've tried to modify gpumem/gpu_memory to 128M, 192M, 256M, and 512M in the bootargs, but it still hiccupped.

 

** Update **

 

After replace with the pre-cache library and test again, the hiccups still remain.

Might this issue cause by OMXPlayer or its decoding libraries ?

 

訊息由此人編輯:Yokai Yang

Outcomes