[FFmpeg-devel] PES packet length

Måns Rullgård mans
Sun Dec 2 22:15:06 CET 2007

"Werner Altewischer" <werner.altewischer at gmail.com> writes:

> I notice that muxing an MPEG program stream sometimes gives a large overhead
> (up to 5% of total stream size). I looked in the mpegenc.c file and it uses
> a constant packet_size of 2048 bytes for any kind of stream. I assume that
> increasing the packet size would lower this overhead.
> - Is this assumption true

It's maths.

> - Is it possible to increase this packet_size without consequences and if so

It depends.  Such files would not be DVD-compatible, and could very
well cause trouble for hardware decoders with small buffers.

> what would be the maximum value?


> - Is it a good idea to distinguish between audio and video: make the
> packet_size larger for video packets than for audio packets

Probably not.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list