Page MenuHomePhabricator

investigate using a non-fixed bitrate for webm transcodes
Closed, ResolvedPublic

Description

Currently we use a fixed bitrate for webm (and ogg for that matter) transcodes except for webm 720p where we use a variable bit rate( -qmin 18 -qmax 18).

I just noticed there are some files, such as [[File:Hindesite_-_Lily_-_Focus_Stacking_(by).ogv]], where the 720p webm transcode is smaller (2733005 bytes) than the 360p webm transcode (2769705 bytes). This seems wrong. (Note, this is probably specific to the lily file which has a lot of still frames)

I don't know what original considerations went into using a fixed bitrate, but maybe we should just be specifying a quality level instead.

In my test of the lily file, using a quality level of 18 (like the current 720p setting) for the 480p version gave a file size of 1.5mb, compared to the current 480p settings of -qmin 1 -qmax 51 -vb '1024000' which gives a file size of 5.3mb.


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:41 AM
bzimport set Reference to bz68418.
bzimport added a subscriber: Unknown Object (MLST).

I believe the original idea was that 160p, 360p, and 480p transcodes were meant for online streaming viewing and 720p was meant for offline downloading, so the 160/360/480 have fixed nitrates designed around tiers of network speed... while the 720 has a quality setting and so is variable bitrate -- making it indeed potentially a LOT smaller on a video like this that has a low rate of visual change entropy.

Can we make the bitrate setting a _maximum_ bitrate on VBR encoding or something, rather than a fixed bitrate?

nitrates -> bitrates *damn you autocorrect*

Gilles triaged this task as Lowest priority.Nov 24 2014, 2:33 PM
Gilles subscribed.

I'm investigating variable bitrates now, in the context of smart adaptive switching being able to swap the stream resolutions as needed when bandwidth changes. Looking good so far, will publish more details later.

Change 389900 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/TimedMediaHandler@master] Use constrained quality mode for WebM VP8 and VP9

https://gerrit.wikimedia.org/r/389900

Change 389900 merged by jenkins-bot:
[mediawiki/extensions/TimedMediaHandler@master] Use constrained quality mode for WebM VP8 and VP9

https://gerrit.wikimedia.org/r/389900

brion claimed this task.

Resolving this, merged the constrained quality mode and happy with it so far.