android - Select H264 Profile when encoding with MediaCodec and MTK Codec -


We have an Android app that encodes the video in H.264, all the previously tried Android devices, this baseline The profile I encode is what I need.

Codec Omx at Lenovo Yoga 10. MTK Video. Encoder.avc is This encodes the video as a high profile, which gives the problem for the receiving device.

I'm not using MediaCodec to see a way to use profiles.

Is there any way to do this? The codec claims to support the baseline profile but there is no way to use it. Is there any codec specific parameter for this?

Whatever you can try is the key profile in your MediaFormat , with the value of 1 ( OMX_VIDEO_AVCProfileBaseline ). If you do this, you probably have to add the key level along with your resolution to the value of a level (with the value of the OMX AVC level constant).

I 'I'm not sure if this codec really honors the requested value, but it may be worth a try.

Look for the setupAVCEncoderParameters function for an example on the setup process It appears in the input parameter for the profile key (from the media format provided by you Is copied), but if it exists then you use a level parameter, and depending on which level your resolution depends on. See for static values ​​that you can use for parameters.

But after checking the profile and level parameters, even after overriding the profile line, it looks like what was set. So either these rows have been removed from your device, or the encoder h264type.eProfile is completely ignored by the field.

If someone is found to have a source tree which is actually used, it is better to inspect the devices.

To choose an appropriate level for your resolution, take a look at x264_validate_levels as an example (but through level OMX_VIDEO_AVCLEVELTYPE constants MediaFormat needs to be passed.

Not sure that anything helps, but it is worth a try at least.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -