Closed Bug 1860492 Opened 6 months ago Closed 23 days ago

Investigate removing Theora support

Categories

(Core :: Audio/Video: Playback, task)

task

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: padenot, Assigned: padenot, NeedInfo)

References

(Regressed 1 open bug)

Details

Attachments

(13 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

The Theora codec served us well, but isn't really used any more. When it's used, it's also not uncommon that it's higher in the <source> list compared to more modern codec, and it ends up picked instead of a codec that offers better compression or hardware acceleration (there never was a Theora hardware decoder shipped in Firefox). Sandboxing of Theora is quite good (via the RDD, it can never run in content processes), but the less code the better.

Theora currently accounts for ~0.09% of media resource loads in Firefox. Big services that had lots of Theora content (e.g. Wikipedia) have switched away from it and now use more modern codecs.

Chromium plans to remove entirely Theora from their implementation in version 123, there is some more information in https://chromestatus.com/feature/5158654475239424. This releases in March 2024, according to their release calendar. Chrome on Android and Safari never supported Theora. https://github.com/brion/ogv.js/ can be used to play Theora videos on the web if need be (this library is already in used on some websites).

The plan on our side is as follows:

  • disable Theora in Firefox Nightly, fix lots of tests that rely on Theora, by converting the test vectors to e.g. vp9 when it makes sense, or removing the test otherwise. Removing Theora means that there is no video codec in OGG anymore in Firefox, and simplifies also the OGG demuxer. Historically, there's been more than one problem in our demuxers, so this is also good.
  • add a bit of telemetry that pings back in the following situations:
    • media load failed -- the only source was a media containing a Theora track
    • media load succeeded, but the HTMLMediaElement had multiple <source> and a Theora source was higher than the list that the source that was eventually picked (we could check what codec was picked instead, but since all codecs are better than Theora I don't think it's super useful in practice, just for curiosity maybe)
  • wait a couple cycles, maybe extend this to "early beta", which is something like the first 3 or 4 beta of a beta cycle (to account for the population skews in nightly vs. beta vs. release of course)
  • if all is fine (and it's probably going to be just fine), deprecate on the same timeline as Chromium's stable release

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
Severity: -- → S3
Flags: needinfo?(jmathies)

FYI - Early spring target for shipping this to release.

Attachment #9390198 - Attachment description: Bug 1860492 - Remove Theora files in used in dom/media/test/manifest.js. r?#media-playback-reviewers → Bug 1860492 - Remove Theora files from the tree. r?#media-playback-reviewers
Attachment #9390198 - Attachment description: Bug 1860492 - Remove Theora files from the tree. r?#media-playback-reviewers → Bug 1860492 - Remove theora usage from dom/media. r?#media-playback-reviewers

OGG can only contain the theora video codec, and theora is being removed from
the Web. All of this have WebM versions in a directory alongside this (that I
converted from the OGG tests a while back).

The OGG Theora files have been replaced with functionally equivalent WebM
containing VP9.

Files containing theora have been modified to use VP9 in WebM, which is
equivalent for those tests, that only require a video with or without sound.

Files containing theora have been modified to use VP9 in WebM, which is
equivalent for those tests, that only require a video with or without sound.

Files containing theora have been modified to use VP9 in WebM, which is
equivalent for those tests, that only require a video with or without sound.

Switched to using a functionally equivalent video.

Switch to using a functionally equivalent videos using the VP9 codec in WebM
container.

Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8b6c53698f5
Add a pref to disable Theora playback, disable it on Nightly. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/a6d22d73c8a5
Remove theora usage from dom/media. r=media-playback-reviewers,jgilbert,alwu
https://hg.mozilla.org/integration/autoland/rev/fb667be5932d
Fix OGG specific tests. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/45d137c795f1
Remove layout/reftests/ogg-video. r=emilio
https://hg.mozilla.org/integration/autoland/rev/b34aacf0e966
Stop using theora in browser/base/content/test. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/cf1230802d5c
Stop using theora files in toolkit/. r=mossop,anti-tracking-reviewers,timhuang
https://hg.mozilla.org/integration/autoland/rev/eeec1917ab49
Stop using theora files in mobile/android/geckoview/src/androidTest/. r=geckoview-reviewers,m_kato
https://hg.mozilla.org/integration/autoland/rev/40cee82fa090
Stop using theora files in tests in browser/. r=mossop,anti-tracking-reviewers,timhuang
https://hg.mozilla.org/integration/autoland/rev/d6a999866f19
Stop using theora files in tests in dom/html. r=smaug
https://hg.mozilla.org/integration/autoland/rev/cbcb811ca382
Stop using theora files in dom/security. r=freddyb
https://hg.mozilla.org/integration/autoland/rev/a5b2e4d12e44
Adjust docs. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/22a3235fe2dc
Stop using Theora files in WPT. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/1b6bef229ce4
Stop using Theora files in WPT (Mozilla tests). r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45277 for changes under testing/web-platform/tests

Backed out for causing multiple failures

  • Backout link

  • Push with failures - mochitests failures

  • Failure Log

  • Failure line: TEST-UNEXPECTED-FAIL | browser/base/content/test/contextMenu/browser_contextmenu.js | Uncaught exception in test bound test_setup_html - at chrome://mochitests/content/browser/browser/base/content/test/contextMenu/browser_contextmenu.js:140 - TypeError: can't access property "loop", video is null





Flags: needinfo?(padenot)
Upstream PR was closed without merging
Attachment #9390198 - Attachment description: Bug 1860492 - Remove theora usage from dom/media. r?#media-playback-reviewers → Bug 1860492 - Remove theora usage from dom/media and dom/canvas. r?#media-playback-reviewers
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/024863677345
Add a pref to disable Theora playback, disable it on Nightly. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/7d823668fba7
Remove theora usage from dom/media and dom/canvas. r=media-playback-reviewers,jgilbert,alwu
https://hg.mozilla.org/integration/autoland/rev/22dd17861e80
Fix OGG specific tests. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/d1d98783c88d
Remove layout/reftests/ogg-video. r=emilio
https://hg.mozilla.org/integration/autoland/rev/b9286e049dea
Stop using theora in browser/base/content/test. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/9983c1ddee85
Stop using theora files in toolkit/. r=mossop,anti-tracking-reviewers,timhuang
https://hg.mozilla.org/integration/autoland/rev/c2c11ee3f79f
Stop using theora files in mobile/android/geckoview/src/androidTest/. r=geckoview-reviewers,m_kato,frontend-codestyle-reviewers
https://hg.mozilla.org/integration/autoland/rev/24a1fb93d4a8
Stop using theora files in tests in browser/. r=mossop,anti-tracking-reviewers,timhuang
https://hg.mozilla.org/integration/autoland/rev/0038d6d54690
Stop using theora files in tests in dom/html. r=smaug
https://hg.mozilla.org/integration/autoland/rev/f5e2a92235f1
Stop using theora files in dom/security. r=freddyb
https://hg.mozilla.org/integration/autoland/rev/f8cbb9933469
Adjust docs. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/93086bc64d37
Stop using Theora files in WPT. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/08603e5ea8a0
Stop using Theora files in WPT (Mozilla tests). r=jgraham
Pushed by smolnar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9b8435c1c982
Change file name in test @ toolkit/components/antitracking/test/browser/file_saveAsPageInfo.html CLOSED TREE
Regressions: 1889507
Upstream PR was closed without merging
Regressions: 1889515
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/97298991b864
Add a pref to disable Theora playback, disable it on Nightly. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/17ea9bd7979d
Remove theora usage from dom/media and dom/canvas. r=media-playback-reviewers,jgilbert,alwu
https://hg.mozilla.org/integration/autoland/rev/783875421564
Fix OGG specific tests. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/e56f721a11a5
Remove layout/reftests/ogg-video. r=emilio
https://hg.mozilla.org/integration/autoland/rev/370c3d3941bd
Stop using theora in browser/base/content/test. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/76d69c25320d
Stop using theora files in toolkit/. r=mossop,anti-tracking-reviewers,timhuang
https://hg.mozilla.org/integration/autoland/rev/5b301ec4e01f
Stop using theora files in mobile/android/geckoview/src/androidTest/. r=geckoview-reviewers,m_kato,frontend-codestyle-reviewers
https://hg.mozilla.org/integration/autoland/rev/bfb9b0e704f2
Stop using theora files in tests in browser/. r=mossop,anti-tracking-reviewers,timhuang
https://hg.mozilla.org/integration/autoland/rev/e68e06324af5
Stop using theora files in tests in dom/html. r=smaug
https://hg.mozilla.org/integration/autoland/rev/8b4762de8fd0
Stop using theora files in dom/security. r=freddyb
https://hg.mozilla.org/integration/autoland/rev/f7fcc884e8e2
Adjust docs. r=media-playback-reviewers,alwu
https://hg.mozilla.org/integration/autoland/rev/91467fac1e6a
Stop using Theora files in WPT. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/98d171e8ce25
Stop using Theora files in WPT (Mozilla tests). r=jgraham
Upstream PR merged by moz-wptsync-bot
See Also: → 1889830
Type: defect → task
Regressions: 1889921
Regressions: 1889375
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: