Wiki > Streaming Audio and Video
You can easily stream audio or video from your Whatbox using the cross-platform media player VLC (or other players that support HTTP streaming).
Limitations
Streaming is not a good solution if the bitrate of the media is larger than your network connection. If it takes 3 hours to download a video but 2 hours to watch, streaming is not a good solution. You can choose to use a larger buffer when you click "More Options" in the "Open Network Stream" dialog window.
VLC
First, you will need to install VLC. Instructions for doing this will vary by operating system. VLC can be downloaded from the VideoLan website.
- Start by opening VLC.
- Click the "Media" dropdown menu and select "Open Network Stream..." (On Mac OS X, click the "File" menu and select "Open Network...")
- Obtain your file's network URL using the following instructions:
- Go to your HTTP directory listing at https://server.whatbox.ca/private/
- Log in using your username and slot password
- Navigate to the directory containing the file you want to stream
- Once you find the file, right click the file and select the option to copy the URL or address. See your browser's help for information on the specific name of the command.
- Paste the URL into the "network URL:" box.
- Click "Play"
- Enter your username and password when prompted.
The media should now start playing.
MPC-HC - Media Player Classic Homecinema
Download MPC-HC and install (Windows only).
- Start MPC-HC.
- Go to "File > Open File" or press "Ctrl-O".
- Obtain your file's network URL using the following instructions:
- Go to your HTTP directory listing at https://server.whatbox.ca/private/.
- Log in using your username and slot password
- Navigate to the directory containing the file you want to stream
- Once you find the file, right click the file and select the option to copy the URL or address. See your browser's help for information on the specific name of the command.
- Paste this URL into the "Open:" box.
- Click "Ok".
- Enter your username and password when prompted.
Your media will start buffering and playing.
MPlayer
- MPlayer (and frontends to it, like SMPlayer) has two options for buffering,
-cache
and-cache-min
.-cache
is the maximum size of cache that MPlayer will fill while playing the file.-cache-min
is the minimum amount of the cache that needs to be filled in order for playback to start. You can usemplayer -ass -cache $((`du -sk "$@" | cut -f -1` / 10)) -cache-min 25 "$@"
to cache automatically. If you're still having hiccups in playback, lower the number 10.
mpv
- Obtain your file's network URL using the following instructions:
- Go to your HTTP directory listing at https://server.whatbox.ca/private/.
- Log in using your username and slot password
- Navigate to the directory containing the file you want to stream
- Once you find the file, right click the file and select the option to copy the URL or address. See your browser's help for information on the specific name of the command.
- Modify this URL, replacing <password> like in the following command:
mpv "https://user:<password>@server.whatbox.ca/private/"
. - If you would not like your slot username and password retained in your shell history (on Linux), either prepend your command with two spaces to exclude it entirely, or use one of following command oneliners:
- Bash:
read -p "Username: " user && read -s -p "Password: " pass && mpv "https://${user}:${pass}@server.whatbox.ca/private/"
- Zsh:
read "?Username: " user && read -s "?Password: " pass && mpv "https://${user}:${pass}@server.whatbox.ca/private/"
- Bash:
The media should now start playing.
Kodi
Kodi is an open-source media center for all platforms that you can use to stream files from your server. Download it from kodi.tv. Kodi can scrape the files on your server to get film, tv and music information; but that only works if you separate each kind of content in a different folder.
- Go to Videos > Files > Add Videos > Browse > Add network location
- Enter your slot's information and the folder you want to index (/home/user/files is used in below examples).
- HTTPS
Protocol: Web server directory (HTTPS)
Server address: server.whatbox.ca
Remote path: private/files
Port: 443
Username: user
Password: <password>
- SFTP
Protocol: Secure shell (SSH/SFTP)
Server address: server.whatbox.ca
Remote path: /home/user/files
Port: 22
Username: user
Password: <password>
- FTP
Protocol: FTP Server (FTP Server)
Server address: server.whatbox.ca
Remote path: /files
Port: 21
Username: user
Password: <password>
- HTTPS
- Choose a name for this source and click OK
- Choose a content for this source and click OK
To use explicit TLS
with FTP with recent version of Kodi, edit the file ~/.kodi/userdata/mediasources.xml
and append |auth=ssl
to the URL that starts with ftp://
before adding any other sources.
Kodi will now try to scrape information about your content and add them to your library. If you separated your content in different folders, you need to repeat these steps and choose a type of content for each folder. If you're missing files with very long filenames or weird characters using HTTP(S), switch to (S)FTP.
Plex
Plex setup instructions can be found in its wiki article here.