MediaCodecReader 720p plackback performance issue.

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
4 years ago
4 years ago

People

(Reporter: bechen, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Enable MediaCodec:
pref("media.omx.async.enabled", true);

HTTP streaming:
http://10.247.24.86/H264_720p_HP_L3.1_2Mbps_30fps_AAC_hinted.mp4

When I try to enable MediaCodec, the playback performance is bad if we play a http 720p video.
(Reporter)

Updated

4 years ago
Depends on: 1033903
(Reporter)

Updated

4 years ago
Depends on: 1091992
About http video playback's performance, one big problem exist. MediaCache's size is only 4MB on b2g. It is a fixed value. If we want to do 720P video playback smoothly, we want at least about 20MB.
http://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#321

One ides about this problem is that just extending MediaCache size. But media cache uses "/data/local/tmp/" area, it is a flash rom area. We should not set MediaCache size too big compared to "/data/local/tmp/" area's size.

Another idea is to use RAM as MediaCache if the device have enough amount of RAM. Bug 963938 is for it.

The following diagram is around MediaCache, but it is a bit old.
https://github.com/sotaroikeda/firefox-diagrams/blob/master/media/content_media_ChannelMediaResource_FirefoxOS_1_01.pdf?raw=true
On OMXCodec, it tries to get new input data when a input buffer becomes free. But on MediaCodec, data input is not provided until client side provide it. Its different seems to cause performance problem.
(Reporter)

Comment 3

4 years ago
(In reply to Sotaro Ikeda [:sotaro] from comment #1)
> About http video playback's performance, one big problem exist. MediaCache's
> size is only 4MB on b2g. It is a fixed value. If we want to do 720P video
> playback smoothly, we want at least about 20MB.
> http://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#321
> 
> One ides about this problem is that just extending MediaCache size. But
> media cache uses "/data/local/tmp/" area, it is a flash rom area. We should
> not set MediaCache size too big compared to "/data/local/tmp/" area's size.
> 
> Another idea is to use RAM as MediaCache if the device have enough amount of
> RAM. Bug 963938 is for it.
> 
> The following diagram is around MediaCache, but it is a bit old.
> https://github.com/sotaroikeda/firefox-diagrams/blob/master/media/
> content_media_ChannelMediaResource_FirefoxOS_1_01.pdf?raw=true

I guess the MediaCache is not the major problem here because the same http stream plays well on OMXCodec.

(In reply to Sotaro Ikeda [:sotaro] from comment #2)
> On OMXCodec, it tries to get new input data when a input buffer becomes
> free. But on MediaCodec, data input is not provided until client side
> provide it. Its different seems to cause performance problem.

Thanks for the advice, I'll check it.
(Reporter)

Updated

4 years ago
Depends on: 1033913
(Reporter)

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.