Monday, August 30, 2010

[android-developers] Froyo: MediaRecorder.setVideoFrameRate sets IDR ratio instead of frame rate

Hello,

I'm using the H264 encoder on a Froyo HTC Desire. Parsing the
generated 3GP stream allows to identify individual frames, and their
timing.

Now it turns out that:

(1) MediaRecorder.setVideoFrameRate() doesn't affect the average
frame rate, which is always close to 17fps, regardless of the asked
rate from 4 to 30 fps.

(2) In the logs I get contradictory messages (example for an asked
rate of 15 fps):

08-30 16:07:48.198 E/VENC_ENC( 68): VENC_ERROR
update_param_port_def::1651 Frame rate is for input port (refer to OMX
IL spec)
but also:
08-30 16:07:48.602 E/VENC_ENC( 68): ven_print_config::348 config
frame_numerator=15, fps_denominator=1, bitrate=420000

(3) By parsing the H264 NALU types, I do see the effect of varied
MediaRecorder.setVideoFrameRate() values: they affect the IDR relative
rate (~GOP size):

- asked value 4: one IDR frame for 3 non-IDR frames
- asked value 15: one IDR frame for 14 non-IDR frames
- asked value 30: one IDR frame for 29 non-IDR frames


All this smells like there is a bug while crossing all the API layers,
passing one parameter for another.
Of course I cannot say before Froyo, because in 2.1 the H264 encoder
on the Desire was broken/missing.

Any insight on this ? Workaround ?

-Alex

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate