Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#11092 closed Patch - Feature (fixed)

Update MythNetVision YouTube player to use iframe embed (HTML5 video)

Reported by: Alex Halovanic <halovanic@…> Owned by: Jonatan Lindblad
Priority: minor Milestone: 0.28
Component: Plugin - MythNetvision Version: Master Head
Severity: low Keywords: youtube iframe html5
Cc: Ticket locked: no

Description

Google now recommends embedding YouTube? videos is via an iframe instead of loading a Flash object, as MythNetVision? currently does.

This shouldn't have much of an impact to most users, but does allow YouTube? to autoselect Flash or HTML5 players. Flash is preferred if installed unless you use the internal web browser to join the HTML5 opt in trial each time you start mythfrontend. There's no other ways to prefer one or the other at this point.

Attachments (3)

youtube-iframe.patch (3.2 KB) - added by Alex Halovanic <halovanic@…> 7 years ago.
Update youtube HTML page to use iframe
youtube-iframe-0.2.patch (4.0 KB) - added by Achim Hofmann <info@…> 6 years ago.
removed obsolete functions and set the default playback quality to 'hd720'
youtube.html (3.2 KB) - added by Achim Hofmann <info@…> 6 years ago.
See comment from 28. May 2013

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by Alex Halovanic <halovanic@…>

Attachment: youtube-iframe.patch added

Update youtube HTML page to use iframe

comment:1 Changed 7 years ago by Alex Halovanic <halovanic@…>

For what it's worth, libwebkit 4.8 does seem to work reasonably well with HTML5 videos for me here, given enough gstreamer dependencies installed: I don't have any audio yet, and a mild amount of tearing and the occasional crash, but that's not very far off from the Flash player.

comment:2 in reply to:  1 Changed 6 years ago by Achim Hofmann <info@…>

Alex: Do you know what gstreamer plugins are essentially needed to enable mythbrowser to play videos on youtube using html5? I have your patch installed but unfortunately I always get a "this video is currently not available" message on youtube, while playing them on my notebook with KDE desktop and Firefox works fine using html5. Even the testvideo refered within the API documentation won't play on my Gentoo based myth machine. Which verbosity level/settings for mythfrontend would you recommend to get these information?

This is what I currently have installed:

mythtv@mediacenterpc ~ $ equery l -i qtwebkit */gst*
 * Searching for qtwebkit ...
[IP-] [  ] dev-qt/qtwebkit-4.8.4:4

 * Searching for gst* in * ...
[IP-] [  ] media-libs/gst-plugins-bad-0.10.23-r1:0.10
[IP-] [  ] media-libs/gst-plugins-base-0.10.36:0.10
[IP-] [  ] media-libs/gstreamer-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-ffmpeg-0.10.13-r2:0.10
[IP-] [  ] media-plugins/gst-plugins-vp8-0.10.23-r1:0.10

Thanks a lot!

comment:3 Changed 6 years ago by Achim Hofmann <info@…>

Got it working! I now have the following plugins installed, where the ffmpeg plugin can be omitted I think.

mythtv@mediacenterpc ~ $ equery l -i qtwebkit */gst*
 * Searching for qtwebkit ...
[IP-] [  ] dev-qt/qtwebkit-4.8.4:4

 * Searching for gst* in * ...
[IP-] [  ] media-libs/gst-plugins-bad-0.10.23-r1:0.10
[IP-] [  ] media-libs/gst-plugins-base-0.10.36:0.10
[IP-] [  ] media-libs/gst-plugins-good-0.10.31:0.10
[IP-] [  ] media-libs/gstreamer-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-alsa-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-ffmpeg-0.10.13-r2:0.10
[IP-] [  ] media-plugins/gst-plugins-vorbis-0.10.36:0.10
[IP-] [  ] media-plugins/gst-plugins-vp8-0.10.23-r1:0.10

comment:4 Changed 6 years ago by Achim Hofmann <info@…>

Advice: If the playback is choppy you can reduce the quality level using function player.setPlaybackQuality(suggestedQuality:String):Void of the Google Player API.

https://developers.google.com/youtube/iframe_api_reference#Playback_quality

Please find attached an updated version of Alex' youtube html page (youtube-iframe-0.2.patch) where I set the default playback quality level to 'hd720'. Available values are 'small', 'medium', 'large', 'hd720', 'hd1080' and 'highres'.

Changed 6 years ago by Achim Hofmann <info@…>

Attachment: youtube-iframe-0.2.patch added

removed obsolete functions and set the default playback quality to 'hd720'

comment:5 Changed 6 years ago by Alex Halovanic <halovanic@…>

Hi Achim,

Glad you were able to get this working. But I believe those functions you removed were used by the remote control.

-Alex

comment:6 Changed 6 years ago by Achim Hofmann <info@…>

Hi Alex,

of course, you are right. So please find attached the corrected version with all functions included. One other improvement of this new version is that it disables this annoying annotations (text-box overlays). This is done by setting player parameter iv_load_policy to 3.

https://developers.google.com/youtube/player_parameters#iv_load_policy

Changed 6 years ago by Achim Hofmann <info@…>

Attachment: youtube.html added

See comment from 28. May 2013

comment:7 Changed 4 years ago by Jonatan Lindblad

Owner: set to Jonatan Lindblad
Status: newassigned

comment:8 Changed 4 years ago by Jonatan Lindblad <jlindblad@…>

Resolution: fixed
Status: assignedclosed

In 36717b5a597602bb6da088b2e5954924d0d52b2b/mythtv:

Internet Content: Use the YouTube? iframe API

The old API is deprecated and uses Flash even if HTML5 playback is possible.
Unfortunately the scaling in the Qt-based browser is rather poor so use the
support for external browsers if you want better quality.

HTML5 playback requires some GStreamer libraries which should be provided by the
gstreamer1.0-libav and gstreamer1.0-plugins-good packages on Debian.

Based on patch by Alex Halovanic <halovanic@…>.

Fixes #11092

comment:9 Changed 4 years ago by Jonatan Lindblad

Milestone: unknown0.28
Note: See TracTickets for help on using tickets.