Hyphen-ated / DJBot

twitch songrequest irc bot
GNU General Public License v2.0
18 stars 9 forks source link

Choose automatically the best video quality (and audio quality) #20

Closed Gol-D-Ace closed 9 years ago

Gol-D-Ace commented 9 years ago

Currently the youtube player does choose auto (which is 360p in most cases).

Could you please make it so it uses the highest quality? (improving the audio quality)

Hyphen-ated commented 9 years ago

Hmm, apparently you can't make a youtube embed play at high quality unless the embed is sized big enough for the full resolution of the hd video, and I don't really want to make it that big. Do you know a good way around this?

Hyphen-ated commented 9 years ago

Thanks for those bug reports btw!

Gol-D-Ace commented 9 years ago

I like your project so I try to contribute to it (well not actual code ;) )

Unfortunately I don't know directly a way to do this.

Gol-D-Ace commented 9 years ago
<iframe title="YouTube video player" width="650" height="390" src="http://www.youtube.com/embed/P211w1HuEK4?version=3&vq=hd1080" frameborder="0" allowfullscreen></iframe>

?version=3&vq=hd1080 should do the trick behind the embed url. Will also work for videos that don't have 1080p.

Hyphen-ated commented 9 years ago

When I try that it doesn't work. Does it work for you? Is this a browser issue maybe

Gol-D-Ace commented 9 years ago

This only seems to work with the youtube flash player. The html5 player doesn't like it.

Hyphen-ated commented 9 years ago

The bot does embed the flash player. But in my tests just now, adding those version and vq parameters only succeeds at making it go into high quality if the size of the embed is big enough for the full video

Hyphen-ated commented 9 years ago

This guy claims that changing the video quality doesn't affect the audio anymore: http://www.h3xed.com/web-and-internet/youtube-audio-quality-bitrate-240p-360p-480p-720p-1080p

so if true, we don't need to do anything here anyway

Gol-D-Ace commented 9 years ago

Apparently this is true. Just tested one of my own videos uploaded in 2011 and I can't notice a difference in audio quality anymore.