[FFmpeg-devel] Doubts in ffmpeg

Stefano Sabatini stefasab at gmail.com
Mon Jan 13 13:15:29 CET 2014

On date Monday 2014-01-13 16:28:21 +0530, Mayank Agarwal encoded:
> Hi,
> I am trying to understand mp4 file and ts demuxing/decoding and has
> following doubts.Please help me clarify.

This list is for FFmpeg development, not for questions regarding
development *with* FFmpeg. libav-user is the correct mailing list
where to ask.
> 1.I am reading mp4 file using ffmpeg and after doing av_read_frame
> i am getting video(stream_index = 0),audio(stream_index = 1) packets
> First there is no order of coming of video/audio packets.Is it the standard
> case.


> 2.Video packets 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
> 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).

A small packet size may be due to a video frame equal to the previous
one (for example in case of several sequential black frames).

> 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.
> 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.
> or it has to be in separate stream.
> 5.Diff between ffmpeg processing for transport stream and mp4 file.
> if both are demuxed,decoded in same way or is it different.

All these questions are rather obscure. Anyway repost the mail to
FFmpeg = Free Faithful MultiPurpose EnGraver

More information about the ffmpeg-devel mailing list