Ametys offers several options for adding a video to a page:
Streaming platforms are best suited to viewing video online, via a browser.
The web is constantly evolving, including video, and this information is valid at the time this article was written.
Ametys uses the video tag to indicate to the browser that there is a video to play(https://www.w3schools.com/tags/tag_video.asp). We add buttons on top to allow the user to send actions to the browser. Playback is performed by the browser. We therefore need to adapt the video format to the capabilities of the browsers used by users and to network capabilities.
When you broadcast a video from the video tag, it's up to you to optimize the video for the end user, unlike streaming platforms like youtube which receive the video and convert it into multiple formats, the format is then selected by the streaming server according to the user (fiber, adsl, desktop pc, 4G phone, 3G, ...) so that playback is adapted.
You'll find many resources on the Internet on the subject of "video format for the web", "optimizing a video for the web", ..., these are just a few examples of keywords you can use to increase your knowledge and optimize your chances of having a video read by the greatest number of people.
There are many parameters to consider:
In summary, for an "optimized" video (to be adapted to your needs): MP4, codec x264, resolution 480p=854 x 480pixels (or 720p), frequency 15 frames per second and a maximum bit rate of 1000kbs.
A video without a streaming tool must be downloadable by the user. A heavy video, e.g. 500M, is likely to be complicated for a user to download, whether on a fixed PC in the office, at home or on a telephone. Weight is the result of the combination of all parameters (codec, resolution, bitrate, frequency).
Information | Original video | Compressed video | Difference / Reason |
Bitrate | 148Mb/s | 0.559Mb/s | 99% |
Resolution | 1920x1080 | 1280x720 | 33% |
Ratio | 16/9 | 16/9 | Retained |
Frequency (FPS or IPS) | 30 | 15 | 50% |
Final weight | 355Mo | 0.68Mo | 99.81% |
This example shows that, depending on requirements but above all on the parameters chosen, we can make playback optimized and accessible to a larger number of users. At the same time, this optimizes storage space, backups, user bandwidth and, by the same token, thecarbon footprint.
It is possible to optimize video duration and eliminate the "slowest" parts.
Another example on a 55-second video
|
Codec |
Resolution |
Frames per second |
Flow |
Weight |
1 |
x264 |
480p |
25 |
700kbs |
4,3Mo |
2 |
x264 |
480p |
25 |
1000kbs |
4,4Mo |
3 |
x264 |
720p |
16 |
700kbs |
6,5Mo |
4 |
x264 |
720p |
16 |
1000kbs |
6,9Mo |
5 |
x264 |
720p |
25 |
700kbs |
7,4Mo |
6 |
x264 |
720p |
25 |
1000kbs |
7,8Mo |
7 |
x264 |
1080p |
29.9 |
4000kbs |
27Mo |
Here's video n°3:
To take things a step further, it's possible to have your own streaming server, either through paid solutions (there are all prices) or through free solutions. A google search for "youtube alternatives" or "youtube alternative self hosted" is a good start.