After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 521536 - YouTube videos should have a better resolution (make use of new YouTube settings like &fmt=6)
YouTube videos should have a better resolution (make use of new YouTube setti...
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: YouTube plugin
2.21.x
Other All
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 527395 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-10 10:15 UTC by antistress
Modified: 2008-10-14 07:21 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Add support for different YouTube resolutions (5.12 KB, patch)
2008-05-24 18:40 UTC, Philip Withnall
none Details | Review

Description antistress 2008-03-10 10:15:33 UTC
YouTube is ready for videos with a better resolution
There are some attributes for that 
Make use of them

normal : 320x240 22050 Hz
&fmt=6 : 448x336 44100 Hz
&fmt=18 : 480x360 MP4 (H264 et AAC)

see http://www.pcinpact.com/actu/news/42150-youtube-etfmt6-etfmt18-haute-qualite.htm
Comment 1 Bastien Nocera 2008-03-10 10:21:49 UTC
Should probably queue off the "Connection speed" setting in the preferences, to avoid reinventing another knob.
Comment 2 Philip Withnall 2008-03-10 21:05:15 UTC
Coo, I missed this. I'll get on this once I've finished the GVFS stuff. :-)
Comment 3 Philip Withnall 2008-03-13 07:24:53 UTC
See http://www.youtube.com/blog?entry=yFlR6EEySg8
Comment 5 Philip Withnall 2008-04-27 17:45:17 UTC
*** Bug 527395 has been marked as a duplicate of this bug. ***
Comment 6 Bastien Nocera 2008-05-24 15:06:58 UTC
In my rough tests, we should enable "&fmt=18", and disable the flvdemux check if speed is "1.5 MBps" or better, in the preferences.

&fmt=6 doesn't actually seem to work one bit on all the videos I tested. Most videos should be available in MP4 though, thanks to Apple's use of it.
Comment 7 Philip Withnall 2008-05-24 18:40:08 UTC
Created attachment 111473 [details] [review]
Add support for different YouTube resolutions

Here we go. This requests the H.264 format (fmt=18) video if your connection speed is >= 10 (1.5Mbps or above). As Bastien suggested, it ignores fmt=6.

It introduces a new totem.Object.get_connection_speed method to the Python bindings (and the C, actually), and there's also a fix for a compiler warning about unused variables in on_playlist_change_name.
Comment 8 Bastien Nocera 2008-05-24 18:47:10 UTC
(In reply to comment #7)
> Created an attachment (id=111473) [edit]
> Add support for different YouTube resolutions
> 
> Here we go. This requests the H.264 format (fmt=18) video if your connection
> speed is >= 10 (1.5Mbps or above). As Bastien suggested, it ignores fmt=6.
> 
> It introduces a new totem.Object.get_connection_speed method to the Python
> bindings (and the C, actually), and there's also a fix for a compiler warning
> about unused variables in on_playlist_change_name.

Couldn't you just get the connection speed from GConf?
Comment 9 Philip Withnall 2008-05-25 13:48:48 UTC
I did originally add a totem_get_gconf_client method and use that, but I couldn't get the Python bindings to play nicely with GConf. There may have been something I didn't try, however.

Shall I do that, or just use a default GConf client straight from Python?
Comment 10 Bastien Nocera 2008-05-25 13:55:29 UTC
I'd rather you used the default GConf client.

I fixed the warning about the unused variable (you can just commit this sort of housekeeping changes...).
Comment 11 Philip Withnall 2008-05-25 15:21:49 UTC
Committed a modified version of the patch which checks GConf itself.

2008-05-25  Philip Withnall  <pwithnall@svn.gnome.org>

	* src/plugins/youtube/youtube.py: Use higher-resolution YouTube
	videos when the user's connection speed is suitably high.
	(Closes: #521536)
Comment 12 Jean-François Fortin Tam 2008-05-25 15:26:53 UTC
Just for your info, with the youtube H264 plugin, I sometimes stumble upon video that do not work with it (gives an error message about not being allowed to do that or something), whereas trying to watch the same video with the non-H264 version works fine.
So, did you put any checks in place for the new official youtube plugin to "fallback" to lower quality if the high quality stream refuses to work?
Comment 13 antistress 2008-10-14 00:08:43 UTC
Do we really have to ask the user to set its connexion speed in Preferences menu ? It's not very smart from a user point of view, and hardly discoverable for a non-geek. Could we imagine a way for the system to discover connexion speed and to automatically set it in Totem ?
Does network manager provide that piece of information ? 
Comment 14 Philip Withnall 2008-10-14 06:04:29 UTC
From a brief look, I can't find such information presented in the NetworkManager API. However, if you open a new bug about adding this to Totem, it could be looked into more thoroughly.
Comment 15 antistress 2008-10-14 07:21:42 UTC
Bug 556227 – The connexion speed should be automatically set instead of asking the user to manually set it in preferences menu