Log in

View Full Version : making the player's job easier - lightweight encoding


florinandrei
24th May 2016, 06:03
I shot a few sequences with an iPhone, in 1080p60. I've edited the whole content in Sony Vegas, and generated the video track with x264vfw. The settings are pretty much default:

preset medium
tuning none
profile auto
level auto
single-pass
rate factor 23.0

The x264vfw version is a few months old.

The result can be seen here:

https://www.youtube.com/watch?v=VGLFPCY_fA8

If you wait until it switches to 1080p60, YouTube will serve you the exact video track that I've uploaded - it doesn't do any re-encoding if you play it at 1080p60.

But there's a problem. When playing a track like this in a browser (Chrome), it seems like the browser is working pretty hard to play the content. On a cheap laptop it cannot keep up at all; there are lots of dropped frames and a lot of stuttering. On a MacBook it's a little better but it still drops some frames. On my main PC it's almost perfect but I still get a frame dropped here and there.

I suspect the default parameters encode the stream in such a way that the player needs to do quite a bit of processing to render the stream. Hence, on slower machines, the content doesn't play well.

I've played 1080p60 videos from YouTube on these machines, from other authors, and there are no dropped frames. So it's quite clearly possible to encode in such a way to make the job easier for the player/browser.

What would be some recommendations for settings that would lighten the load on the browser when playing such content? I don't mind if compression becomes less efficient, I just want the video to play well on most machines.

vivan
24th May 2016, 06:54
If you wait until it switches to 1080p60, YouTube will serve you the exact video track that I've uploaded - it doesn't do any re-encoding if you play it at 1080p60.Of course it does, it reencodes everything.

But there's a problem. When playing a track like this in a browser (Chrome)Check what it's playing (right click player, stats). Chrome is probably using vp9 which is not h/w accelerated on your machines, so try firefox (it should use H.264, which is h/w accelerated everywhere)

sneaker_ger
24th May 2016, 08:32
Also check resolution. Not all "1080p" videos are actually 1920x1080 pixels. Some have only 1920x800, for example.

huhn
28th May 2016, 20:33
every browser i tried was using VP9

Leo 69
2nd June 2016, 16:00
every browser i tried was using VP9

You don't have Adobe Flash Player installed.

huhn
2nd June 2016, 21:08
it is installed but that doesn't matter no modern browser is using flash these days on youtube.

kuchikirukia
7th June 2016, 18:37
youtube-dl the h264 stream if you want h264.