0
votes

Using the Android Camera Video recorder I made a video:

It seems like seqParamSetLength always is 15 and picParamSetLength is always 4.

Is this somehow defined in Codec (MediaCodec)?

03-14 20:27:30.125   379  3343 I MPEG4Writer: parseAVCCodecSpecificData
03-14 20:27:30.125   379  3343 I MPEG4Writer: getNalUnitType: 103
03-14 20:27:30.125   379  3343 I MPEG4Writer: parseParamSet
03-14 20:27:30.125   379  3343 I MPEG4Writer: parseParamSet 67
03-14 20:27:30.125   379  3343 I MPEG4Writer: getNalUnitType: 104
03-14 20:27:30.125   379  3343 I MPEG4Writer: parseParamSet
03-14 20:27:30.125   379  3343 I MPEG4Writer: parseParamSet 68
03-14 20:27:30.125   379  3343 I MPEG4Writer: seqParamSetLength 15
03-14 20:27:30.125   379  3343 I MPEG4Writer: picParamSetLength 4

Want to do something similar like this below, but wonder how to set the values in the MediaCodec for seqParamSetLength and picParamSetLength? Are they per device? Per codec?

MediaCodec configuration for SPS and PPS H264 encoder

1

1 Answers

2
votes

It seems like seqParamSetLength always is 15 and picParamSetLength is always 4.

This is not true. The size of the SPS/PPS are different depending on the encoder and settings used. Since android typically uses hardware encoders, You will get different sizes on different devices.