New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 625311 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

video playback doesn't start until an insanely big chunk is downloaded

Reported by teo8...@gmail.com, Jul 1 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36

Example URL:
http://output.jsbin.com/niwelo

Steps to reproduce the problem:
1. visit http://output.jsbin.com/niwelo
2. click on the play button of the video

What is the expected behavior?
Should start playing almost immediately. (my ADSL's real speed tested at http://www.speedtest.net/ is about 14Mbps)

The video bitrate is not very high, and 1MB or less should be enough to fill a reasonable buffer. You shouldn't need to wait to download much more than that in order to start playing

What went wrong?
Playback does not start until about 4Mb are downloaded, which is about 30 seconds worth of video, and it takes several seconds.

Note that the seekbar shows the portion of video already downloaded while playing, and you can see that once playback starts, it remains the same for a very long time. That is, it doesn't download an additional chunk of video until you get pretty close to the end of the already downloaded portion. This is expected, but it proves that the buffer is already full long before playback starts, so there is no valid reason for waiting that much to start playing.

By inspecting the Network tab in DevTools, it appears that the chunk that "has to" be downloaded before playback start is exactly the one that is requested with the first request. I don't know why you request such a big chunk on the first request, but regardless of that, there's absolutely no need to wait for the first request to complete to start playback.

It's unbelievable that something so trivial as video playback is so broken.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes 

Chrome version: 51.0.2704.106  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 22.0 r0

Note that Firefox does it right.
 

Comment 1 by w...@chromium.org, Jul 2 2016

Cc: w...@chromium.org
It's true that Firefox does a better job on this file. avformat_find_stream_info is taking a long time to complete because it's looking for the stream info for a 3rd mjpeg track. Maybe there's a way we can select streams between avformat_open_context and avformat_find_stream_info to tell FFmpeg to ignore some of them.

There are two workarounds you can use to make this faster in both chrome and firefox.

1) Remove the mjpeg track and leave the h264 track.
2) Reorder the MP4 for progressive download. Have a look at this article for more info: http://www.adobe.com/devnet/video/articles/mp4_movie_atom.html
Status: WontFix (was: Unconfirmed)
as per #1, this is as is behavior. workarounds are also provided in #1.

Comment 3 by teo8...@gmail.com, Jul 13 2016

@2 you seem to be ignoring this:

> It's true that Firefox does a better job 

If a better job can be done, it must be done. Moreover, if even Firefox does it, it means it can't be that difficult.


Sign in to add a comment