Closed Bug 1091989 Opened 10 years ago Closed 9 years ago

MediaCodecReader 720p plackback performance issue.

Categories

(Core :: Audio/Video, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bechen, Unassigned)

References

Details

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.
Depends on: 1033903
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.
(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.
Depends on: 1033913
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.