Stuttering videos in Webbrowsers ?

4 risposte [Ultimo contenuto]
Darksoul71
Offline
Iscritto: 01/04/2012

Hi all,

this is more a general question rather than being Trisquel specific. Driven by the recent woes about lib-ray I decided to evaluate WebM videos in HD a bit. I encoded videos in multiple resolutions (720p / 1080p) from multiple sources (HD cam, Youtube, sat streams).

The issue I experienced: The video often stutter when played back in the browser (Abibrowser, Chromium, Firefox) while they perfectly play back when using a standalone media player (e.g. VLC or Mplayer). This happens on two different systems (Trisquel 5.5 x64 with Abibrowser and Xubuntu x64 11.04 with Chromium and Firefox). I should note that on both systems the hardware load is not at maximum. So stuttering is not a result of 100% CPU usage. I verified it on both systems using top.

Has someone of you experimented with WebM lately ? What are your experiences when using Youtube HD streams in WebM ?

Thanks for any input !

- Holger

teodorescup

I am a member!

Offline
Iscritto: 01/04/2011

I use Trisquel Brigantia x64 and Abrowser 12.0; and Abrowser plays without a problem webm's from both online(http://audio-video.gnu.org/video/seq-rms-ch1-talk1-720p.webm) and local(file:///path/to/file.webm).

From what you are saying it might have to do with the encoding, I tried to encode also in both webm(ogg/VP8) and ogv/mkv(ogg/theora) but was a slow(hardwarewise) mess and eventually became not worth the trouble and gave up.

Horgeon
Offline
Iscritto: 03/29/2011

In the last 3 days I have been experimenting with both Theora and WebM. I have to say that in my results VP8 was disappointing compared to H264 and Theora. Using free codecs I got my best results in Theora using ffmpeg2theora with "-v 10 --speedlevel 0 --optimize" flags. Quality is a little beyond the topic but I will mention it anyway.

http://imagecrab.com/up/a606f3405e155bab3054c92fbde65630.jpg
http://imagecrab.com/up/09dd47ab8591bf0b51eb9e5efc611af9.jpg

At 720p the difference is more clear

http://imagecrab.com/up/249e311c95c2ff35932e8c4fac97b0f7.jpg
http://imagecrab.com/up/264c493a9bda79206adec515236c6f64.jpg

To encode, Theora unfortunately takes double the time for VP8.

About the topic, all videos play perfectly in Abrowser including 1080p. Youtube HTML5 takes more cpu than expected, though. I use ViewTube and play webm in totem.

Darksoul71
Offline
Iscritto: 01/04/2012

@teodorescup: Thanks for posting the links ! Indeed....the 720p video played back nice. Yesterday I encoded several other videos. This time I was using ffmpeg2theora to create ogg files and ffmpeg via libvpx for WebM. It seems that Transmageddon caused the stuttering issues for 720p content here. 1080p WebM created with ffmpeg still stutters in the browser on my AMD E-350 while funnily it plays fine when played back via MPlayer or any other media player.

The big question remains to me: Does the browser add a performance penalty, when playing back WebM or Ogg HD stuff ? If so, then where does this penalty come from.

Sorry, if a browser supports HTML5, which includes support for HD video in different formats (ogg, webm), then I would expect at least that this stuff performs on par with direct playback on the host.

@Horgeon: Which system do you have to run 1080p WebM stuff fine in the Abbrowser ?
Personally I see some potential for both VP8 and Theora since a fairly slow CPU seems capable of playing back 1080p stuff without hardware acceleration (in my case an AMD E-350 with 2x1.6GHz max).

Quality-wise I found both codec nice. From my rough testing I estimate that they perform above MPEG4 SP level (e.g. DivX / XVid). While I haven't checked the endoded material on my 32" TV I could not tell a big difference between the original h264 1080p stream and the theora respective VP8 counterpart. At least not at bitrates above 4-5 MBit for 1080p. Quality of course is often quite subjective. For me only real-life performance counts and not image-wise side-by-side comparison.

I would be happy if someone with deeper HTML5 / browser knowledge could outline how this stuff works. So far pretty much any website I found in regard to HTML5 and video explains pretty much the supported codecs, video element tags and such stuff but I found nothing on the modules / framework used for playback.

Horgeon
Offline
Iscritto: 03/29/2011

I use an AMD Phenom II X2 550 (3.1ghz) and Radeon HD3300(no 3d acceleration). Theora has the lowest CPU usage of all, around 35% of my CPU against 40-45 for H264 and VP8 in 1080p. Ffmpeg is the only CLI VP8 encoder available on Trisquel but it does not have helpful arguments, even -sameq produces lower quality video for me. I then prefer Arista (with custom parameters) or OggConvert for this task.

The killer feature of the ogg container however is the Kate subtitles. Having multiple subtitles inside the video without having to re-encode it again seems amazing. You can do this in VP8 but you need the ogg container.

And I do not know much about browser playback.