lib.reviews icon indicating copy to clipboard operation
lib.reviews copied to clipboard

WebM videos don't play in Safari browser (transcode?)

Open bvibber opened this issue 7 years ago • 2 comments

Ah, the fun fun world of video formats. :)

Uploaded WebM or Ogg videos such as on https://lib.reviews/team/developers/post/b0873e50-4830-4603-a765-2f1c16ac3029 don't play as-is on Safari (or on current versions of Edge, though Edge is adding support, currently installable via plugin).

screen shot 2017-12-22 at 4 44 10 pm

There are basically two ways to handle this: transcode to MP4 on the backend (may expose larger licensing issues), or to play them in non-supporting browsers via ogv.js by dynamically swapping out the video or audio element for an OGVPlayer instance.

One potential issue with ogv.js -- currently it looks like you're using the default browser controls on the playback element, and ogv.js doesn't by default ship with control support. I can fix that though. Alternate: use something like video.js as an intermediary.

bvibber avatar Dec 23 '17 00:12 bvibber

Yeah, I figured it wouldn't work in those browsers yet - thanks for taking the time to write up the issues! My thinking right now is to do server-side transcodes of Ogg/WebM to MP4 and vice versa, and to use <source> elements to enumerate the available versions. The H.264 fees seem to kick in only for content that's pay-to-play. ogv.js is very cool though :)

eloquence avatar Dec 23 '17 01:12 eloquence

Great, transcoding is the best way if the licenses aren't an issue! :D

bvibber avatar Dec 23 '17 01:12 bvibber