- From: Eric Carlson <eric.carlson@apple.com>
- Date: Mon, 4 Jan 2010 08:44:04 -0800
- To: Maciej Stachowiak <mjs@apple.com>
- Cc: Silvia Pfeiffer <silviapfeiffer1@gmail.com>, Anne van Kesteren <annevk@opera.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Philip Jägenstedt <philipj@opera.com>, Edward O'Connor <hober0@gmail.com>, Jeremy Keith <jeremy@adactio.com>, HTMLwg <public-html@w3.org>
On Jan 2, 2010, at 6:46 PM, Maciej Stachowiak wrote: > > On Dec 31, 2009, at 3:15 AM, Silvia Pfeiffer wrote: > >> >> I believe so. Every web page that has more than maybe 3 videos >> "embedded" - and that is video search results pages, video archive >> listings and similar things - will need to stop their videos from >> taking up unwanted bandwidth. This is a really common use - and also >> one that John Gruber's blog post mentioned. > > How much network traffic does it take to grab enough of the video to get dimensions, duration, and possibly the first frame (if there's no separate poster frame)? > It depends on the format. For some formats, such as mp3, the duration has to be calculated using the sampling rate and frame count [1]. It isn't possible to estimate the number of frames in a variable bit-rate mp3 file, so media engines typically estimate duration based on the file size and the average size of some number of frames as the data is processed. The duration of a QuickTime movie or an MPEG-4 file is calculated from the information in the movie header ('moov' atom). The header is fairly small relative to the file size but because it has tables with information about every frame of audio and video, the size is proportionally larger for small movies. For example the sizes of the 3:22 duration Avatar trailers at apple.com and their 'moov' atoms are as follows: trailer file size 'moov' atom Small: 8.8 MB 128 KB Medium: 25.8 MB 131 KB Large: 33 MB 131 KB 480p: 59.1 MB 138 KB 720p: 140 MB 138 KB 1080p: 244.9 MB 131 KB > If it's similar to or less than the cost of loading an image, than doing it 3 or even 50 times for a single page load does not seem so bad. After all, you need to load that number of images anyway to show any form of thumbnail whatsoever > Once the 'moov' atom has been loaded and parsed, the size of loading a poster frame is roughly equivalent to loading an image. eric [1] Some authoring tools put the duration in a 'TLEN' ID3v2 tag.
Received on Monday, 4 January 2010 16:44:36 UTC