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 window to select the preferred video definition and container.

Play/Stop
Use these buttons to play/stop the video playback. Clicking the video thumbnail will also start the video playback.

Download
Click this button to get the video stream link. If the download doesn't start, click "Link". The browser will show the open popup window. Some browsers don't have this feature and will open/play the video, 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 the videos menu as "Video Only" and "Audio Only". Enable DASH playback support in the options window and the videos menu will show new videos as "Video With Audio". You can play these using the browser player, a plugin or an external player, read below for more details.

Widesize
Click these buttons to enter/exit widesize mode.

Fullsize
Click these buttons to enter/exit fullsize mode.

Options
Click the vertical dots to open the options window.

Embed (Video, Object, Embed, Protocol)
Select which type of embed option to use when playing the videos.

Media (Auto, MP4, VLC etc.)
Select which type of media or plugin to use when embeding the video.

Definition (SD, HD etc)
Select the default (highest) video definition.

Container (MP4, WebM etc)
Select the default video container.

Autoplay
Enable/disable video autoplay. 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 is shown.

DASH
Enable/disable DASH streams (video with audio) playback. Available options are "HTML5/Video" and "Embed+VLC". The default option is "HTML5/Video". Select "Embed" and "VLC" in the embed and media menus to use VLC instead. This is experimental and it may not work as expected. An external player can also be used.

DVL
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.



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 'Protocol' in the embed menu from the options window


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 'Protocol' in the embed menu from the options window


Mac
On Mac platform the options for video playback are:

1. the browser video player (HTML5)

2. video plugins (NPAPI): Quicktime and VLC