📜 ⬆️ ⬇️

HTML5, Theora and everything all everything ... (practice)

I saw a lot of articles here about HTML5, Theora and the video tag, but for the most part they revolve around theory. Recently on my site MJV-ART.ORG - Anime Wallpaper I opened the section JV-Video which is a small video hosting ala Youtube on anime theme based on HTML5 / Theora. Actually, I now want to talk about the problems that I have.

Browsers


Although the main browsers seem to support HTML5 and Theora, but usually with a fair amount of curvature. The most normal browser is still FireFox, but it also has enough glitches and oddities and therefore we will start with it.

Firefox



Chrome

I will say right away, everything is fine in Chrome3 under Windows, in any case we didn’t find any problems, but we didn’t test it so much. All the main claims are against Chromium from 4 branches which is now available for all major OS.

')
Safari

Theora turns on only after you install the QuickTime plugin, but after that everything works perfectly, this is the most problematic browser, although Theora is not built into it. Fullscreen is not present and as usual JS helps.

Opera

All stable versions do not see the video tag, but before alpha version 0.50_pre6177 (linux) already plays a video but with its own problems:


QtWebkit

Browsers based on QtWebkit can play audio poorly (without video) if Gstreamer is enabled in Phonone under Linux, everything is bad enough with Xine.

Gtkwebkit

Did not check if anyone can then share! Very interesting.

Coding


I did not go very far and used ffmpeg2theora. After quite a long experiment, we found the most appropriate encoding parameters that produced no worse quality than youtube: ffmpeg2theora --speedlevel 0 --optimize -S 0 -v 6 -a 3 -x 480 -H 44100 .
For coding purposes, Gstreamer could still be used, but I plan to perform such experiments in the future.
So what were the problems with this:


Web server.


As it turned out, not every bundle allows you to normally provide video for viewing. At first, I used lighttpd-scgi-python / Pylons and the video was practically not played (there were jerks, artifacts, etc.) as a result I rendered all static files into a separate domain and implemented access directly through lighttpd. Here with Lighttpd (which also uses Youtube) directly everything turned out as it should. In addition, there is still the possibility that ogv, oga, ogg are not in mime-types of lighttpd - then they need to be added there.

It seems I have not forgotten anything :) and I hope this article will help you navigate the current problems of HTML5-video / Theora.

Source: https://habr.com/ru/post/82376/


All Articles