[FFmpeg-devel] PES packet length

Nico Sabbi Nicola.Sabbi
Mon Dec 3 10:19:30 CET 2007

Il Thursday 29 November 2007 21:23:30 Werner Altewischer ha scritto:
> 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
> - Is it possible to increase this packet_size without consequences
> and if so 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
> Regards, Werner Altewischer

if you want to reduce the overhead you can use 
$ mencoder -of mpeg -mpegopts format=pes2 ...
but be warned that the resulting files aren't
compatible with any of the video disk formats.
They are only useful for hardware decoder cards
(like pvr and full-featured dvb) and for plain
archiving if you want to hurt yourself very badly :)

More information about the ffmpeg-devel mailing list