Encoding to a target size

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
videoip
Blank Cone
Blank Cone
Posts: 10
Joined: 18 Sep 2004 01:33
Location: Montevideo - Uruguay

Encoding to a target size

Postby videoip » 18 Apr 2005 21:37

Is there any way I can encode a video to get a predictable file size? I try to calculate size=length*(audiobitrate + videobitrate), but I always get a file a lot larger than calculated.
Could you at least tell me why this is? I´ve tried different muxers and codecs and that makes the file size vary, but I always find this quite unpredictable.

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 19 Apr 2005 13:10

It's because next to video and audio, there is a lot more in a file. This is called the muxing overhead. various fileformats have various amounts of overhead. Predicting this exactly is almost impossible. You just need to make an educated guess.
Don't use PMs for support questions.

videoip
Blank Cone
Blank Cone
Posts: 10
Joined: 18 Sep 2004 01:33
Location: Montevideo - Uruguay

educate me :-)

Postby videoip » 20 Apr 2005 20:17

Thanks for the info. Now, how do I "educate" myself in this? I´m trying to predict the size of a h264 video on TS. Do muxer overheads weigh less on longer files? Please tell me where I can read more on any of this.

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 21 Apr 2005 02:16

mpeg ts chops things up into little 188 byte packets. The norm in VLC is to then put 7 of these packets together into one Ethernet packet (since 7x188 < 1500 bytes, a "normal" MTU)

Do a search for ISO 13818-1 on the Web -- it gives you the definition of what is in a transport stream (a bit of a slog, admittedly).

Alternately, take a look at:
http://www.leitch.com/resources/tutoria ... ystems.pdf

see page 47 of the document, which gives you a glimpse of the kinds of TS packets.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 20 guests