Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NZSL - 45. Able to select mp4 or webm video and display the highest quality where possible #387

Open
louise-r-blue opened this issue Oct 2, 2018 · 6 comments

Comments

@louise-r-blue
Copy link
Contributor

This issue needs input from Dave on the Freelex database side before it can be completed but is considered high priority

Differentiation prep has already been done on mobile.

Stopgap measure for now is to upload all videos as Mp4 and display all of them by default.

@DSRU
Copy link

DSRU commented Nov 30, 2018

Update 30 Nov 2018: mp4 videos have been uploaded and are currently displayed.

@Br3nda
Copy link
Member

Br3nda commented Dec 2, 2018

Related: #106

@eoinkelly
Copy link
Contributor

@DSRU Can I clarify where we are with this?

Checking my assumptions

My understanding is that we currently have two sources of video:

  1. S3 bucket which contains a small number of help content videos. These are available in both mp4 and webm
  2. Videos hosted on http://nzsl-assets.vuw.ac.nz/dnzsl/freelex/assets/ - From my random tests, these seem to only be available in mp4 format e.g. http://nzsl-assets.vuw.ac.nz/dnzsl/freelex/assets/3841/hot_dog.3841.main_glosses.dh.r480x360.mp4 exists but http://nzsl-assets.vuw.ac.nz/dnzsl/freelex/assets/3841/hot_dog.3841.main_glosses.dh.r480x360.webm does not.

Does that sound accurate?

Question

webm files are usually (but not always) smaller than mp4 for an equivalent visual quality. However browser support for webm is still spotty (see https://caniuse.com/#feat=webm but the summary is that modern Chrome & Firefox support them, MS Edge mostly supports them and Safari not at all) so we would still need both formats.

Given that our videos are quite short, the bandwidth savings for an individual user might not be very big - are we sure the benefits are worth the work here?

Aside: It might be a useful exercise for somebody at @DSRU to convert the existing videos to webm and compare file sizes - that would give us a more concrete idea of the value of this.

If we do want to go ahead with this, the next step is for us to create a webm copy of each mp4 video and store them somewhere. We definitely don't want to be transcoding video on the fly in the app for performance reasons - this would be work we would do once when a video is published.

@DSRU
Copy link

DSRU commented Feb 18, 2019

@eoinkelly any signs with numbers higher than 6581 were given to us in webm format by the people who filmed our new entries. We became aware that they would not display on certain browsers, and so we have converted them back to mp4. For the moment, all assets therefore have mp4 videos but the later assets (above 6581) also have webm videos stored.
The intention was not to have a complete set of mp4 and webm, but to display the webm where available and if compatible with the browser (to prepare for any future content when webm may be better supported).

@eoinkelly
Copy link
Contributor

So any sign with a number higher than 6581 definitely has both formats?

If so, this story is now:

Generate <video> tag with both webm and mp4 sources if the sign number is 6581 or greater. Sign numbers less than 6581 should not generate a webm source.

@DSRU
Copy link

DSRU commented Feb 19, 2019

@eoinkelly almost definitely - there may be a few entries that are clones from earlier entries, and that therefore may not have webm videos.
The situation could arise where we replace lower entry number videos with webm when they are refilmed for correction.
Can you check how this was implemented to differentiate between screen quality and high resolution images in the assets? I think it was done by filename rather than by the image tag, and the same may be possible for videos?

@Br3nda Br3nda added this to To Do in ODNZSL/nzsl-online Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants