许多桌面软件(VLC、MPC)都有“放大”、“裁剪黑条”或裁剪为特定宽高比的选项。我们如何在 Youtube 或其他 Flash 视频网站上全屏显示这些内容?
我是观看者,而不是视频的创建者/发布者。
iOS 可以做到这一点(双击缩放,消除黑条,缩放深度不可配置)。
据我所知,台式电脑(和安卓设备)无法即时做到这一点。我发现的唯一“解决方法”是按 F11 并缩放整个网页 - 基本上是一个假全屏并将网页缩放到屏幕尺寸之外。
用例:在宽屏显示器上观看来自网络的 4:3 Flash 视频。
寻找一切有创意的解决方案(如有必要,可使用非浏览器访问 YouTube 来实现缩放)
答案1
在 Firefox 中观看 - 安装 Greasemonkey 并添加此脚本. 它允许您在比例(4:3 和 16:9)之间切换
代码如下从此更新(适用于 Firefox 和 Chrome)
// ==UserScript==
// @name Youtube Aspect Remake
// @description Adds buttons to toggle 4:3 and 16:9 aspect ratios on youtube, probs to the great work of scupizzaboy who mades this script. I've just changed the buttons to make them more adapt at the new youtube design. Original Script: http://userscripts.org/scripts/show/101165
// @namespace NoXPhasma
// @include http://youtube.*/*
// @include http://*.youtube.*/*
// @include https://youtube.*/*
// @include https://*.youtube.*/*
// @version 9
// @date 2012-15-03
// ==/UserScript==
function setAspectWide()
{
document = unsafeWindow.document;
var player = document.getElementById('movie_player');
var flashvars = player.getAttribute('flashvars').split('&');
for (var i = 0; i < flashvars.length; i++)
{
if (flashvars[i].indexOf('keywords') == 0)
{
var keywords = flashvars[i].split('=')[1].split(',');
var found = false;
for (var j = 0; j < keywords.length; j++)
{
if (decodeURIComponent(keywords[j]) == 'yt:stretch=4:3')
{
keywords[j] = encodeURIComponent('yt:stretch=16:9');
found = true;
}
}
if (found == false)
{
keywords.push(encodeURIComponent('yt:stretch=16:9'));
}
flashvars[i] = 'keywords=' + keywords.join(',');
}
}
player.setAttribute('flashvars', flashvars.join('&'));
player.src += "";
}
function setAspectNarrow()
{
document = unsafeWindow.document;
var player = document.getElementById('movie_player');
var flashvars = player.getAttribute('flashvars').split('&');
for (var i = 0; i < flashvars.length; i++)
{
if (flashvars[i].indexOf('keywords') == 0)
{
var keywords = flashvars[i].split('=')[1].split(',');
var found = false;
for (var j = 0; j < keywords.length; j++)
{
if (decodeURIComponent(keywords[j]) == 'yt:stretch=16:9')
{
keywords[j] = encodeURIComponent('yt:stretch=4:3');
found = true;
}
}
if (found == false)
{
keywords.push(encodeURIComponent('yt:stretch=4:3'));
}
flashvars[i] = 'keywords=' + keywords.join(',');
}
}
player.setAttribute('flashvars', flashvars.join('&'));
player.src += "";
}
function fixWindowBox()
{
document = unsafeWindow.document;
var player = document.getElementById('movie_player');
var flashvars = player.getAttribute('flashvars').split('&');
for (var i = 0; i < flashvars.length; i++)
{
if (flashvars[i].indexOf('keywords') == 0)
{
var keywords = flashvars[i].split('=')[1].split(',');
var found = false;
for (var j = 0; j < keywords.length; j++)
{
if (decodeURIComponent(keywords[j]) == 'yt:crop=16:9')
{
found = true;
}
}
if (found == false)
{
keywords.push(encodeURIComponent('yt:crop=16:9'));
}
flashvars[i] = 'keywords=' + keywords.join(',');
}
}
player.setAttribute('flashvars', flashvars.join('&'));
player.src += "";
}
var target = document.getElementById('watch-actions');
var group = document.createElement('span');
group.setAttribute("class", "yt-uix-button-group");
target.appendChild(group);
var button = document.createElement('input');
button.setAttribute("class", "start yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip");
button.setAttribute("style", 'width:17px;height:2.77em;padding:0px 6px');
button.setAttribute("value", '4:3');
button.setAttribute("title", "Stretch to 4:3");
button.addEventListener('click', setAspectNarrow, false);
group.appendChild(button);
var button = document.createElement('input');
button.setAttribute("class", "middle yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip");
button.setAttribute("style", 'width:24px;height:2.77em;padding:0px 6px');
button.setAttribute("value", '16:9');
button.setAttribute("title", "Stretch to 16:9");
button.addEventListener('click', setAspectWide, false);
group.appendChild(button);
var button = document.createElement('input');
button.setAttribute("class", "end yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip");
button.setAttribute("style", 'width:24px;height:2.77em;padding:0px 6px');
button.setAttribute("value", 'Zoom');
button.setAttribute("title", "Fix Windowboxing");
button.addEventListener('click', fixWindowBox, false);
group.appendChild(button);
答案2
// Youtube has made some changes and old code does not work. This update fixes that. //
// Youtube Aspect GreaseMonkey JavaScript; updated: 19-SEP-2014 (ACS) //
// ==UserScript==
// @name Youtube Aspect
// @description Adds buttons to toggle 4:3 and 16:9 aspect ratios on youtube
// @namespace scupizzaboy - "fixed" by Kocayine
// @include http://youtube.*/*
// @include http://*.youtube.*/*
// @include https://youtube.*/*
// @include https://*.youtube.*/*
// @grant none
// ==/UserScript==
function setAspectWide()
{
var player = document.getElementById('movie_player');
var flashvars = player.getAttribute('flashvars').split('&');
for (var i = 0; i < flashvars.length; i++)
{
if (flashvars[i].indexOf('keywords') == 0)
{
var keywords = flashvars[i].split('=')[1].split(',');
var found = false;
for (var j = 0; j < keywords.length; j++)
{
if (decodeURIComponent(keywords[j]) == 'yt:stretch=4:3')
{
keywords[j] = encodeURIComponent('yt:stretch=16:9');
found = true;
}
}
if (found == false)
{
keywords.push(encodeURIComponent('yt:stretch=16:9'));
}
flashvars[i] = 'keywords=' + keywords.join(',');
}
}
player.setAttribute('flashvars', flashvars.join('&'));
player.parentNode.innerHTML = player.parentNode.innerHTML;
}
function setAspectNarrow()
{
var player = document.getElementById('movie_player');
var flashvars = player.getAttribute('flashvars').split('&');
for (var i = 0; i < flashvars.length; i++)
{
if (flashvars[i].indexOf('keywords') == 0)
{
var keywords = flashvars[i].split('=')[1].split(',');
var found = false;
for (var j = 0; j < keywords.length; j++)
{
if (decodeURIComponent(keywords[j]) == 'yt:stretch=16:9')
{
keywords[j] = encodeURIComponent('yt:stretch=4:3');
found = true;
}
}
if (found == false)
{
keywords.push(encodeURIComponent('yt:stretch=4:3'));
}
flashvars[i] = 'keywords=' + keywords.join(',');
}
}
player.setAttribute('flashvars', flashvars.join('&'));
player.parentNode.innerHTML = player.parentNode.innerHTML;
}
var target = document.getElementById('watch8-secondary-actions');
var button = document.createElement('input');
button.name = 'setAspectNarrow';
button.setAttribute("class", "start yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip");
button.type = 'button';
button.value = '4:3';
button.addEventListener('click', setAspectNarrow, false);
if (target != null) target.appendChild(button);
var button = document.createElement('input');
button.name = 'setAspectWide';
button.setAttribute("class", "start yt-uix-tooltip-reverse yt-uix-button yt-uix-button-default yt-uix-tooltip");
button.type = 'button';
button.value = '16:9';
button.addEventListener('click', setAspectWide, false);
if (target != null) target.appendChild(button);