Closed Bug 464272 Opened 16 years ago Closed 15 years ago

video file (ogg) is downloaded even when not playing (yet)

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: jo.hermans, Unassigned)

References

()

Details

(Whiteboard: [fixed by bug 479863])

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081111 Minefield/3.1b2pre

When loading Planet Mozilla this week, I've also seen that ogg file on <http://www.rumblingedge.com/2008/11/09/mark-surman-interview-in-sept-08/> that accidentally had autoplay set, so it started playing for everyone. Today that is fixed, but now I noticed that the file was still being loaded (several MBs), even though I never started to play it.

In the attachment, an ethereal trace that I made like this :
1. clean the history & cache
2. start capturing all traffic
3. load <http://www.rumblingedge.com/2008/11/09/mark-surman-interview-in-sept-08/>
4. wait until everything is downloaded, by checking a network utility to see when it stops, since the throbber doesn't indicate the download the the ogg file (I don't know if that's a bug in itself, it's not done for plugins either)
5. stop capturing

I can understand the need to download the first frame, but not the entire file, which might be very large. This is different from other players.

Waldo pointed me to bug 463999 comment 3. It might be related, or it might be fixed by that bug.
Well, the file is too big to be attached (6.43 MB), even after compression.

PS : I never saw the file in the about:cache, neither in the memory or the disk cache. Is it stored in the image cache perhaps ?
It was implemented this way because feedback from people who use youtube a lot was that they wanted them to download so when it is played it's mostly buffered.

It's probably worth changing though.
Maybe we should have a pref to enable auto-downloading of <video>, and another for auto downloading of <audio>?

It be particularly useful on mobile, where bandwidth can be expensive, and for accessibility.
maybe only download the first megabytes or so ...

Anyway, if you look at <http://planet.mozilla.org/ currently, you always load
about 6 megabytes, because there's an .ogg file present in the middle. Note
that it's not cached (I think I read about it in another bug somewhere).
Maybe buffer up until the point canplaythrough fires (or slightly after), and if the video hasn't started playback cancel the download? That would roughly imply that enough data has been buffered that when/if the user does click play, the rest of the video could be resumed and transferred without interruption. Unconditionally grabbing up to X megabytes might effectively be just as good, though.

I think it's highly desirable to buffer at least *some* data, so that when the user clicks play there's instant gratification. But I'd agree that for large videos it could be a waste of bandwidth and slow down loading other things.
The spec has added an autobuffer attribute and change to suggest that the download be suspended once metadata, etc. is available.  Bug 479863 is where the work for changing our behaviour is going on.
Depends on: 479863
Today I assessed
http://www.rumblingedge.com/2009/04/14/nus-cs3108-final-presentations-on-video/
and realized that the use of my office 1 Mbps ADSL link goes to 100%, after some
research discovered that was the videos tags in the page. 
This behavior can easily "eat" all the bandwidth  of my office and the
user is not alerted about this.
In my opinion the auto-downloading must be disabled by default, to preserve bandwidth resources.
It's already a lot better in the latest nightlies (3.5b4pre) : it currently uses 114MB when only that page was loaded, while a regular 3.1b3 uses 245MB. I think this is due to Robert's caching work that got checked roughly a week ago.
Fixed by checkin for bug 479863.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Verified fixed on trunk with following build:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090519 Minefield/3.6a1pre ID:20090519032945
Status: RESOLVED → VERIFIED
Whiteboard: [fixed by bug 479863]
Target Milestone: --- → mozilla1.9.2a1
Roc, while playing around with the debug mode on Linux I have seen that we are still downloading the whole video file (testcase on bug (bug 494316) at least on Linux. See attachment 379542 [details] for the debug output. Does it mean it is not fixed completely?
If you mean the tinyvid.tv testcase, I use autobuffer on tinyvid.tv so it will download the entire file even if not playing.
Oh, nevermind. I forgot that I've already filed bug 493860.
You need to log in before you can comment on or make changes to this bug.