[FFmpeg-devel] Request for comment: Tutorial
Tue May 22 11:23:54 CEST 2007
On Tue, May 22, 2007 at 05:21:01PM +0900, Stephen Dranger wrote:
> > Message: 1
> > Date: Tue, 22 May 2007 15:16:36 +1000
> > From: "mark cox" <markcox at email.com>
> > Subject: Re: [FFmpeg-devel] Request for comment: Tutorial
> > To: "FFmpeg development discussions and patches"
> > <ffmpeg-devel at mplayerhq.hu>
> > Message-ID:
> > <e2c9b5730705212216v3440f5a1q67bbb70d28457d79 at mail.gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> > On 5/22/07, Stephen Dranger <dranger at gmail.com> wrote:
> > >
> > > I have written a rather lengthy ffmpeg tutorial that starts by going
> > > over Martin Bohme's old tutorial, then proceeding to recreate
> > > ffplay.c, teaching about how ffmpeg, SDL, and video in general works.
> > >
> > > Here's the link:
> > > http://dranger.com/ffmpeg/ffmpeg.html
> > >From http://dranger.com/ffmpeg/tutorial01.html
> > "Packets are pieces of data that can contain complete frames..."
> > Packets do not always contain complete frames. Frames can be spread across
> > packets.
> > mark
> I thought so too until I read this in the doxygen docs:
> "For video, the packet contains exactly one frame. For audio, it
> contains an integer number of frames if each frame has a known fixed
> size (e.g. PCM or ADPCM data). If the audio frames have a variable
> size (e.g. MPEG audio), then it contains one frame."
you are all half correct ...
AVPackets (yeah precisse terminology as theres a lot you could call packet)
when they are output from a demuxer can contain random parts of a stream
multiple frames, partial frames, ...
but such random AVPackets are always passed through a parser automatically
and that ensures that 1 AVPacket == 1 Frame on its output side, with
the exception of very small and constantly sized frames in which case
an integral number of frames can be placed in an AVPacket. Such small
frames are (AD)PCM for example, it would be kinda ineffective to have 1
AVPacket per byte ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel