[Libav-user] Writing AVCC extra data in header

Michael IV explomaster at gmail.com
Fri Nov 17 16:43:16 EET 2017


Hi. I am trying to understand something regarding AVCC info when muxing
elementary h264 stream into mp4.SO far
I was adding extra data which is SPS and PPS that I retrieve from h264
encoder. But when I analized the mp4 file I found that all the AVC stuff
like
AVC profile
AVC level
AVC NALU length size
AVC SPS
AVC PPS

are not set. (used mp4info tool). I started to dig into ffmpeg to see how
to set those extra fields and
found  this:

https://www.ffmpeg.org/doxygen/2.6/avc_8c_source.html#l00106

with the function  ff_isom_write_avcc
<https://www.ffmpeg.org/doxygen/2.6/avc_8c.html#a3c387fceac914c5eeffe9e1d58572f22>
which exactly does what I need. But I don' understand why the libav doesn't
write it automatically when muxing the stream.
I set  outstream->codecpar->codec_tag = MKTAG('a', 'v', 'c', '1');

But nothing changes.Do I have to create AVCC header buffer manually?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171117/e741fe8d/attachment.html>


More information about the Libav-user mailing list