I am a heavy online video service user and a while ago I noticed that I had more and more trouble getting smooth video playback on Youtube, Vimeo and other streaming media services.
Don't get me wrong, the video is decoded nicely, my computer doesn't suffer from dropped frames, artifacts or any of the such.
It just lacks smoothness, i.e. not every frame has the same duration. Thus, movement seems jerky; video "stutters".
First, I want to point out that I noticed the issue on several machines running different hardware. My main PC is a desktop computer with AMD X4 955 CPU, 8 GiB DDR3, AMD HD5850 GPU and Windows 7 64 bits OS. I also tested on my laptop which is running a Core i7 3520m CPU, 6 GiB DDR3 and integrated HD4000 graphics. All runs on latest stable drivers of course.
Same jerkiness issue is present on both machines.
Then I tried using different web browsers. Firefox (26.0), Chrome (32) or IE (11.0.96) all demonstrated the same issue when playing back the same youtube video on all three browsers. Only left common denominator was Flash Player.
So I tested opening the videos (WebM/H264 MP4 bitstream) outside of the browser, using a more conventional media player. Opening the files in VLC showed very good results with extremely smooth playback (as initially expected from a 30 fps video). The results were expectedly as good in MPC-HC using EVR for rendering and more surprisingly also as good when opening the file in Firefox and letting the browser itself decode it with its own implementations of the decoders.
So basically, playing back the youtube video is an issue ONLY when doing it through Flash Player. Same phenomenon happens on other Flash-based video streaming sites such as Vimeo.
To be perfectly sure it wasn't my mind tricking me into the perceived jerkiness, I installed the FRAPS software in order to do some benchmarks on the rendering. I then plotted the amount of time each frame of the video is displayed, as measured by FRAPS
The test video was running at 25 frames per second which means that "optimum" playback displays each frame during exactly 40 milliseconds. To keep sync with the 60hz screen, it is not possible to display 40ms frames, so I would expect to see optimal as a perfect 2:2:3:2:3 pulldown meaning for "smooth video":
- frame 0 mod 5 of the video is displayed during 2/60 sec (33.333 ms)
- frame 1 mod 5 : 2/60 sec (33.333 ms)
- frame 2 mod 5 : 3/60 sec (50 ms)
- frame 3 mod 5 : 2/60 sec (33.333 ms)
- frame 4 mod 5 : 3/60 sec (50 ms)
This is what most v-synched video players (MPC-HC for instance) clearly do, and it gives a smooth playback.
Here is the result from the benchmark (Using Flash Player 18.104.22.168 and Chrome 32).
Y axis is the time each frame is displayed in milliseconds and X axis is the # of the frame
As you can see there is something clearly wrong in this pattern. It doesn't follow proper pulldown pattern; some frames are displayed for as less as 1 ms and some other are displayed for 60 ms which should never happen in optimal conditions. This, along with eye observation, further proves that video playback is not smooth.
Here is the result for the same video played in VLC media player without any vertical synchronization (bare decoding and rendering) :
As expected, silk-smooth 40 ms displaying time for each frame. Resulting video displayed is perfectly smooth.
Out of curiosity, I tried downgrading to former versions of Flash Player, because I remembered that I didn't seem to have this issue in the past.
Here's the result with Flash 11.7
Wow! What a surprise. The video feels smoother with an older version of Flash?! It's still far from perfect playback but the sole fact that going to a less advanced version means better playback is mesmerizing.
What happens if I go even further back in time? Let's try with flash 11.4 from August 2012 (gosh that's old)
Whaaat??? Almost judder-free pulldown? With this anciant version of Flash? What is going on?
Compare that chart with the first one, the difference going back one and a half years makes is absolutely astonishing.
Here's a zoom on the teeth to better see the effect of the pulldown
As you can notice, it's not perfect "33.3ms - 33.3ms - 50 ms - 33.3 ms - 50 ms" pulldown but it's pretty damn close.
I think I went deep enough into the demonstration, and despite all the warnings of "outdated version", Flash 11.4 does a better job at playing back youtube videos than 11.7... and a LOT BETTER than 12.0! What is going on?
Something definitely needs to be issued there. It seems very well that Flash Player has actually gotten worse and worse since 11.4.
Thanks for reading.
PS : I tried with both hardware acceleration on and off on all decoders including Flash Player, with similar end results (other than CPU % occupancy)
PS2 : I intentionnaly ignored Youtube HTML5 player for decoding as it is not a final product and it has nothing to do with the discussion on Flash Player.