<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Hi,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I am trying to understand mp4 file and ts demuxing/decoding and has following doubts.Please help me clarify.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Hi,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
i have the following doubts in ffmpeg.Please clarify</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">1.I am reading mp4 file using ffmpeg and after doing av_read_frame</div>
<div style="font-family:arial,sans-serif;font-size:13px">i am getting video(stream_index = 0),audio(stream_index = 1) packets</div><div style="font-family:arial,sans-serif;font-size:13px">First there is no order of coming of video/audio packets.Is it the standard case.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">2.Video pgackets are coming of various sizes from the minimum of 14 to the maximum of 21824.Please point why the video packet size varies,somewhere it</div>
<div style="font-family:arial,sans-serif;font-size:13px">is written that for video one packet means one frame,so if for video pkt->size = 14 also equals one frame of video.(pkt is of type AVPacket).</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">3.If we demux the incoming mp4 stream in Probe function while parsing it and store the info in some buffer or calling av_read_frame demuxes it.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">4.Is it possible in ffmpeg to demux the mp4 file and then assign both a/v in one stream of packets where video packet has stream_index = 1,and for audio = 0.</div>
<div style="font-family:arial,sans-serif;font-size:13px">or it has to be in separate stream.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
5.Diff between ffmpeg processing for transport stream and mp4 file.</div><div style="font-family:arial,sans-serif;font-size:13px">if both are demuxed,decoded in same way or is it different.</div><div><br></div><div>6.Please point me any example to add subtitle to the mp4 file in ffmpeg.</div>
<div><br></div><div>Regards</div><div>Mayank</div></div>