I am having trouble encoding H.264 720p video at 60fps. I'm getting only 30fps from the encoder.
The video stream is provided by an Omnivision 5640 CMOS sensor connected to the EVM, and I've verified that the capture is happening at 60fps. I wrote a small Android app that will encode the stream and save it to an mp4 file on the EMMC. However this file only shows 30fps.
Turning on some verbose debug in frameworks/av/media/libstagefright/OMXCodec.cpp, I can see that the hardware encoder is being invoked (OMX.TI.DUCATI.VIDEO.H264E), but the callbacks (FILL_BUFFER_DONE and EMPTY_BUFFER_DONE) seem to only be coming every ~32ms, which would result in about 30fps.
My app configures the MediaRecorder class to exactly what's in the media_profiles.xml file here:
<EncoderProfile quality="720p" fileFormat="mp4" duration="30"> <Video codec="h264" bitRate="12000000" width="1280" height="720" frameRate="60" /> <Audio codec="aac" bitRate="96000" sampleRate="48000" channels="1" /> </EncoderProfile>
Am I missing some configuration somewhere? Has anyone ever seen this thing do 720p (or more) at 60fps?
Thanks,
Liem