About
ViewTube is a JavaScript application for watching videos from video websites with a video plugin, an external video player or the HTML5 video player. A download option is also available. Below are all supported sites. There is an extra script that adds support for more sites.


Sites
The main video sharing web sites on which you can watch videos using ViewTube.



Installation
Installation
Read the following information on how to install the script in different browsers.


Firefox
To work in Firefox based browsers the script has to be installed with one of Greasemonkey, Tampermonkey or Violentmonkey add-ons from Mozilla Add-ons. Or install the ViewTube add-on from Mozilla Add-ons or manually download and install it from here.

Chromium
To work in Chromium based browsers the script has to be downloaded and dragged and dropped in the extensions page or installed with the Tampermonkey or Violentmonkey extension from Chrome Web Store. Or use the ViewTube extension from Chrome Web Store or manually download and install it from here.

Epiphany
To work in Epiphany (Gnome Web) it is required to install the Greasemonkey extension from Epiphany extensions.

Midori
To work in Midori it is required to enable the User Addons extension.

Falkon
To work in Falkon (QupZilla) it is required to enable the GreaseMonkey extension.

Opera
To work in Opera the script has to be downloaded and dragged and dropped in the extensions page or installed with the Tampermonkey or Violentmonkey extension from Opera Add-ons. Or manually download and install the ViewTube extension from here.

Maxthon
To work in Maxthon it is require to install the ViewTube extension or to install the script in the Violentmonkey extension.

Safari
To work in Safari it is required to install one of GreaseKit, NinjaKit or Tampermonkey.



Usage
Usage
Read the following information on how to use the script.

Select the video from the menu or use the options buttons to select the preferred video definition and container.

Play
Select the preferred way of video playback in the second menu. Select 'HTML5' for newer versions of browsers. Read below for available ways of video playback.

Download
Click the 'Get' button, then 'Link'. The browser will show the open popup window. Some browsers don't have this feature and will open the video in the current window, for these right click 'Link' and 'Save link as'.

DASH
Some sites use DASH streams, which are audio only and video only. These are shown in brown in the videos menu. Click 'MD' to enable DASH playback support (video and audio) and the videos menu will show new videos in red. You can play these using the browser player, a plugin or an external player, read below for more details.

Options

Autoplay
Click 'AP' button to turn autoplay on/off. If it's on, the video starts to play when the video page is loaded or when a new video format is selected. If it's off, a video thumbnail and a 'Play' button are shown.

Definition (SD, HD etc)
Click this button to change the default video definition.

Container (MP4, WebM etc)
Click this button to change the default video container.

MPEG-DASH (MD)
Click this button to enable/disable MPEG-DASH streams (video with audio) playback. Available options are 'HTML5' and 'VLC'. The default option is 'HTML5'. Select "VLC" in the plugins menu to use it instead. This is experimental and it may not work as expected. An external player can also be used.

Direct Video Link (DVL)
Click to enable/disable auto selection of DVL as the default option in the videos menu. With DVL only the video link is embedded so the video streams are fetched by the video plugin, directly or using an external application. The plugins that support this are MPV (mozplugger + mpv + youtube-dl) and VLC.

Widesize (>|<)
Click the right arrow button to enter widesize. Click the left arrow button to go back to normal size.

Fullsize (+|-)
Click the plus button to enter fullsize. Click the minus button to go back to normal size.



Linux
On Linux and BSD platforms the options for video playback are:

1. the browser video player (HTML5)

2. video plugins (NPAPI): VLC, Gecko-mediaplayer, Totem (Gnome Videos), Mozplugger

3. external video player through a protocol

3.1 Create the viewtube script, bash example using mpv or vlc for video playback

viewtube.sh
#! /bin/bash

s="$(echo "$1" | sed -e "s/viewtube://")"
v="$(echo "$s" | awk -F 'SEPARATOR' '{print $1}')"
a="$(echo "$s" | awk -F 'SEPARATOR' '{print $2}')"
if [ "$a" = "" ]; then
   mpv --osc --fs --ytdl=yes "$v"
   #cvlc -f "$v"
else
   mpv --osc --fs --ytdl=yes --audio-file "$a" "$v"
   #cvlc -f --input-slave "$a" "$v"
fi


3.2 Create the viewtube protocol file in ~/.local/share/applications

viewtube.desktop
[Desktop Entry]
Name=ViewTube Protocol
Exec=/path/to/viewtube.sh %u
Type=Application
Terminal=false
MimeType=x-scheme-handler/viewtube


Enable protocol:
xdg-mime default viewtube.desktop x-scheme-handler/viewtube


Test:
xdg-open viewtube:http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4


3.3 Activate the protocol

Click here to associate the script to the protocol

3.4 Select 'VTP' in the second menu


Windows
On Windows platform the options for video playback are:

1. the browser video player (HTML5)

2. video plugins (NPAPI): Windows Media Player, Quicktime and VLC

3. external video player through a protocol

3.1 Create the viewtube script, batch example using vlc for video playback

viewtube.bat
set video=%1
set video=%video:viewtube:=%
"C:\Program Files\VideoLAN\VLC\vlc.exe" %video%


3.2 Create the viewtube registry file, change the script path and execute it

viewtube.reg
REGEDIT4

[HKEY_CLASSES_ROOT\viewtube]
@="URL:viewtube Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\viewtube\shell]

[HKEY_CLASSES_ROOT\viewtube\shell\open]

[HKEY_CLASSES_ROOT\viewtube\shell\open\command]
@="\"D:\\Scripts\\viewtube.bat\" \"%1\""


3.3 Activate the protocol

Click here to associate the script to the protocol

3.4 Select 'VTP' in the second menu


Mac
On Mac platform the options for video playback are:

1. the browser video player (HTML5)

2. video plugins (NPAPI): Quicktime and VLC