<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><span style="font-weight: bold; text-decoration: underline;">Question</span> - What is the format in which audio / video ES data is stored in (<span id="misspell-0" class="mark">AVPacket</span>*) pkt->data? I am trying to <span id="misspell-1" class="mark">demux</span> and decode AV data from a MP4 file using <span id="misspell-2" class="mark">libavformat</span> and <span id="misspell-3" class="mark">libavcodec</span>.</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span
style="font-weight: bold; text-decoration: underline;">More details</span></div><ol><li><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; background-color: transparent;">Using the sample application <span id="misspell-4" class="mark">demuxing</span>.c (</span><a href="http://www.ffmpeg.org/doxygen/trunk/demuxing_8c_source.html" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; background-color: transparent;">http://www.ffmpeg.org/doxygen/trunk/demuxing_8c_source.html</a><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; background-color: transparent;">) I tried <span id="misspell-5" class="mark">demuxing</span> and decoding a MP4 file containing H.264 video and <span id="misspell-6" class="mark">AAC</span> audio. </span></li><li><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;
font-size: 13px; background-color: transparent;">While the sample application worked fine, I wasn't able to interpret the content in the pkt.data buffer (line #66 in the above file). Since the video was H.264 I was hoping to see familiar "<span id="misspell-7" class="mark">nal</span>_unit_type" but I don't think I saw that for the stream I was trying to decode. If I remember the data correctly the first 4 bytes in the pkt.data buffer were "0x00 0x00 0x02 0x72"</span></li></ol><div><span style="background-color: transparent; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px;">I haven't spent much time figuring this out yet but searching on the Internet / forum didn't help. I intend to dig deeper tomorrow, but just wanted to check if indeed ES was being passed in the pkt.data buffers in a special way.</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family:
'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px;"><br></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px;">Appreciate any points that you can provide.<br></span><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;">Best regards</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;">Arvind</div><div style="background-color: transparent; color: rgb(0, 0, 0);
font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-style: normal;"><br></div></div></body></html>