Last modified: 2014-10-20 01:21:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63823, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61823 - Support ogv.js in player
Support ogv.js in player
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Michael Dale
https://github.com/brion/ogv.js/issue...
:
Depends on:
Blocks: 54063 60565
  Show dependency treegraph
 
Reported: 2014-02-23 16:11 UTC by Michael Dale
Modified: 2014-10-20 01:21 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael Dale 2014-02-23 16:11:29 UTC
Brion has built a javascript based solution for ogg video playback in browser without native support for ogg in the video tag. 

The player should be integrated into TMH, and loaded on-demand for browsers that don't support any other open formats.

Javas cortado should be deprecated.

https://brionv.com/misc/ogv.js/demo/
Comment 1 Brion Vibber 2014-02-23 21:04:12 UTC
List of upstream issues blocking production-readiness: https://github.com/brion/ogv.js/issues?milestone=2&state=open

Note that to fully deprecate Cortado we may want an all-Flash solution for old versions of IE and such. List of issues for that side of things here: https://github.com/brion/ogv.js/issues?milestone=5&state=open
Comment 2 Brion Vibber 2014-03-18 19:01:40 UTC
I've got a Flash version working in modern browsers and IE 9; should be able to tweak the JS side until it works in IE 6/7/8.

The <video>/<audio>-alike API for the player needs more polish before I'm ready to try dropping ogv.js/ogv.swf into TMH, but it's coming along very well!


Note that the JavaScript version works without Flash for current Safari/Chrome/Firefox, but does require a small Flash shim for audio output on IE 10/11; it may be simplest to just use the all-Flash version whenever Web Audio API is not present, thus:

Native <video>/<audio> available and supports Ogg/WebM?
  -> use native
  * current Chrome, Firefox, Opera

Have typed arrays and Web Audio?
  -> JavaScript ogv.js
  * Safari 6.1/7 on Mac
  * Safari on iOS 7

Have Flash?
  -> use Flash ogv.swf + JS wrapper
  * IE 6/7/8/9/10/11
  * Safari <=6 on Mac
  * other really old browsers

Else?
  -> link out to download/directions


Note also that some of my test devices have trouble playing 360p videos:
* 32-bit iOS devices (iPod Touch 5th gen, iPad 3)
* Surface RT (Tegra 3-based tablet)
* Dell Inspiron Duo (old Atom-based mini laptop/tablet)

These play audio and 160p videos acceptably.

Note that alternate iOS browsers have all the plumbing for playback but are too slow due to the JIT being disabled by Apple; may need to blacklist iOS non-Safari browsers.

Also still need to poke at iOS 6 to either get it working or blacklist it.
Comment 3 Michael Dale 2014-03-18 19:15:50 UTC
Amazing work. Lest we can do is bring in kaltura player v2 so we have clean way to integrate it :)

The kaltura player can support custom player selection logic, as well as associate player interfaces that load on-demand so we should be able to capture all this logic relatively clean.

I would probably put all this into its own mwEmbed module, include the custom player selection logic, and then load the "player interfaces" decoders on demand where needed.
Comment 4 Brion Vibber 2014-03-19 16:13:42 UTC
I've added a Cortado mode to the player demo at https://brionv.com/misc/ogv.js/demo/ to more directly compare against the current Flash version for IE usage.


Where Cortado fails:

* With latest Java 7, even the signed version of the applet from theora.org won't run unless you add a security exception in your Java configuration -- it's missing permission information in the manifest that the latest plugin demands. This should be fixable upstream.

* Java applet plugin is _horribly_ broken with regard to z-indexing in IE; you can't float other elements above it, such as say custom dynamic controls. This could make it ugly for integration into MultimediaViewer, and definitely breaks my demo page. The Flash plugin works more nicely with the browser as long as you set the right parameters.

* Java applet startup is much slower than Flash startup, and shows an annoying Java logo.

* Cortado's video output is scaled nearest-neighbor and looks pretty bad when scaled up. Flash and JS provide nice smooth scaling.


Where Cortado still wins:

* cortado.jar is less than half the size of ogv.swf (186KiB vs 454 KiB). May or may not be able to prune some more of the C library code out...

* With latest Java 7, Cortado runs at modestly lower CPU usage than the Flash version on both 32-bit and 64-bit Windows 8.1. (eg ~18% vs ~22% usage on one machine). May be able to make further improvements to Flash speed, but I'm willing to take the slight hit for the fact that it "just works".

* Cortado can seek; haven't yet rigged that up in JS or Flash. A nice to have but not a killer feature when the current player is so hard to use at all.

* Cortado has some sort of built-in subtitle support; need to check how all that integrates and if it needs to be added to the Flash side. (If we don't use that in TMH's Cortado integration then can ignore this for now...)
Comment 5 Tisza Gergő 2014-03-19 17:49:59 UTC
(In reply to Brion Vibber from comment #4)
> * Java applet plugin is _horribly_ broken with regard to z-indexing in IE;
> you can't float other elements above it, such as say custom dynamic
> controls. This could make it ugly for integration into MultimediaViewer, and
> definitely breaks my demo page. The Flash plugin works more nicely with the
> browser as long as you set the right parameters.

IIRC that can usually be solved by putting an invisible iframe on top of the plugin area. IE6 handles plugins and OS UI elements (like <select>) outside of the stacking order, but iframes are handled in some weird way that is both in and out of the stacking order so they can overlap plugins and they can be overlapped by normal elements with a higher z-index. (As long as you are careful to follow IE6's own interpretation of how z-indexing should work, which is horribly broken in an entirely different way.)
Comment 6 Gerrit Notification Bot 2014-07-12 09:06:52 UTC
Change 145756 had a related patch set uploaded by Brion VIBBER:
Work in progress: early testing of integration with ogv.js media player

https://gerrit.wikimedia.org/r/145756
Comment 7 Brion Vibber 2014-07-14 02:42:15 UTC
I have a live sample wiki running with the patch on labs: http://ogvjs-testing.wmflabs.org/

Still some more work to do, but the basics are working. :D
Comment 8 Brion Vibber 2014-07-18 06:46:53 UTC
Added support for iOS Safari and IE 9 in latest patch set. (IE 9 uses the Flash build of the decoder.)

Note TMH's JS doesn't load in MobileFrontend yet -- currently iOS playback is only in desktop view.

Some more remaining known issues outlined in the commit message on the patch set.
Comment 9 Gerrit Notification Bot 2014-10-08 13:39:35 UTC
Change 165477 had a related patch set uploaded by Brion VIBBER:
Work in progress: ogv.js media player for Safari/IE (1 of 3)

https://gerrit.wikimedia.org/r/165477
Comment 10 Gerrit Notification Bot 2014-10-08 13:39:41 UTC
Change 165478 had a related patch set uploaded by Brion VIBBER:
Work in progress: ogv.js media player for Safari/IE (2 of 3)

https://gerrit.wikimedia.org/r/165478
Comment 11 Gerrit Notification Bot 2014-10-08 13:39:46 UTC
Change 165479 had a related patch set uploaded by Brion VIBBER:
Work in progress: ogv.js media player for Safari/IE (3 of 3)

https://gerrit.wikimedia.org/r/165479
Comment 12 Gerrit Notification Bot 2014-10-08 13:40:48 UTC
Change 145756 abandoned by Brion VIBBER:
Work in progress: early testing of integration with ogv.js media player

Reason:
Split out into three changesets for easier review (and needs fixing for bitrot on mobile):
* https://gerrit.wikimedia.org/r/165477 - libs
* https://gerrit.wikimedia.org/r/165478 - desktop
* https://gerrit.wikimedia.org/r/165479 - mobile

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links