Andrea Giuliano <[EMAIL PROTECTED]> wrote: > Seriously, it seems not to be so trivial as I thought. I discovered this very > evening that "-w'-700000'" could be used with transcode to get a file of > exactly 700.000 bytes, for which transcode determines the right bitrate, both > with one or two pass encoding. Unfortunately, transcode does not tell me what > actual bitrate nor bpp it used during encoding
Uh, the argument to -w *is* the target bitrate (only for the video part, I think). Later in the NOTES section of transcode, there is a little discussion about the "bits per pixel" concept, with the following formula: bitrate*1000 bpp = ---------------- width*height*fps This formula is quite logical (definietely not empirical) and can be used to calculate the bitrate you'll specify with -w for a given value of the bpp parameter (bpp is a quality indicator; maybe not the best, but easy to understand). Then, if you want to respect a particular size constraint, you'll have to adjust bpp, the target width and/or height (by means of scaling) so that: (8*bitrate/1000)*video_length + sizeof(audio) + container_overhead equals your target size in bytes, where bitrate is in kilobits/s (with kilo being 1000, not 1024), video_length is in seconds, sizeof(audio) and container_overhead in bytes. Concerning the container overhead, the MPlayer documentation says for the AVI container (ยง 14.1.12.2): For each chunk of the AVI file, 24 bytes are wasted on headers and index. This translates into a little over 5 MB per hour, or 1-2.5% overhead for a 700 MB movie. HTH. -- Florent