Just to guess. Based on your question 18009152. I assume that you are encoding h.264 using the application bitstream format. According to the comments, you cannot tell the encoder to use the AVCC format. Therefore, you must perform this conversion manually (Appendix B will NOT work in the ISO container). You can do this by looking for start codes in your AVC stream. The start code is 3 or 4 bytes (0x000001, 0x00000001). You get the NALU length by defining the next start code or end of stream. Reset the startup code (throw it away) and in its place write the size of the NALU at the 32-bit integer large end. Then write this data to the container. To be clear, this is done on video frames that exit the encoder. Additional data is a separate step that appears to be largely determined (other than NALUSizeLength). Since we use an integer of 4 bytes to write NALU sizes, you MUST set NALUSizeLength to 4.
szatmary
source share