Reuse SlingBox hardware without SlingBox Servers
Slinger is a project that allows SlingPlayer, Slingboxes and MediaPlayers to stream content:
Sticking it to the Man, one slingbox at a time
It is highly recommended to review the following documents located in this repo as they provide more information to help you with you own setup:
config.ini file:sbtype = entryslingbox_server.pyThe HTTP streaming server can server out mutliple simultaneous streams so more than one person can see the Sling content at once.
The web-based remote control is yet another huge hack to get something working quickly. Uses "Flask", definately can be made prettier. You can tweek the look in the [REMOTE] section of the config.ini file. You can insert any valid HTML between the buttons and change the button and text style.
Use a media player that supports http streaming. I've tested
Just configure:
http://your_ip_address_or_FQDN:your_port_number/slingboxYour_port_number defaults to 8080 but you can override that with the port = entry in the SERVER section of config.ini file. I.e.:
http://192.168.1.10:8080/slingboxTHIS IS THE NUMBER ONE MISTAKE PEOPLE MAKE SETTING THIS UP. THE IP ADDRESS IS FOR THE HOST RUNNING THE SERVER CODE NOT THE SLINGBOX. DO NOT USE THE SLINGBOX IP ADDRESS, IT WILL NOT WORK.
YOU CONNECT TO THE SERVER TO STREAM VIDEO NOT THE SLINGBOX. IT'S THE SERVER THAT TALKS TO THE SLINGBOX AND FORWARDS THE VIDEO TO YOU. THE URL IS CASE SENSITIVE.
DO NOT USE 'Slingbox' OR ANYTHING ELSE EXCEPT 'slingbox'. "slingbox" is the default. It is now possible to change this.
Read the Release notes pdf document located in this repo.
THE [SERVER] port number is configured in the config.ini file. IT DEFAULTS TO 8080.
Some people feel compelled to change this to the same port number as the slingbox and I don't know why. It only seems to add confusion to what is happening.
To access the Remote control functionality, use the same IP address and port number but replace "slingbox" with Remote into any ol' web browser.i.e.
http://192.168.1.10:8080/RemoteYou'll need a working Python3 interpreter to get going. Comes pre-installed on the Raspberry Pi distribution:
sudo apt-get update
sudo apt-get install python3-pip sudo pip install flask sudo pip install netifaces sudo chmod +x /home/slingbox/slingbox_server.py
sudo cp sling.service /etc/systemd/system/.
# enable it
sudo systemctl daemon-reload
sudo systemctl enable sling.service
sudo systemctl start sling.service
sudo systemctl stop sling.service # to shut it down As root, add or modify the two following lines to your /etc/sysctl.conf
net.core.rmem_max = 8192000
net.core.wmem_max = 8192000To add your own remote, please do following:
Create a new branch and follow this naming convention:
add-remote-``
Add your control in the folder named CustomRemotes, name your file:
ModelRemote.txt
The branch will be reviewed and approved for merging if passed.
There is a windows executable now available so you don't need to do a python install but your welcome to run the python code directly if you want.
I used cygwin Python on my Windows box but any windows python program should work.
You'll need flask and netifaces module for python. See note about netifaces and flask above.
slinbox_server.py, config.ini and RunSling.bat to the slingbox folderIf you want to have the server start automatically on boot make a shortcut to RunSling.bat in the Startup folder.
Windows Defender may think there are two viruses in the slingbox_server.exe file. This is not the case. Add an exception on your system for slingbox_server.exe
PC Settings/Update & Security/Windows Security/Virus & Threat Protection/Virus & Thread protection Settings/Add or Remove Exclusions/Add an exclusion:
Enter the path to slingbox_server.exe
Apparently there is a way around this by changing the source code and then signing the executable but I haven't tested it yet.Note the Slingbox does not upscale the input, See https://www.slingbox.com/help/KB/KB-2000464 for more info.
#define SBVS_320x240 1
#define SBVS_160x120 2
#define SBVS_352x240 3
#define SBVS_176x120 4
#define SBVS_640x480 5
#define SBVS_640x240 6
#define SBVS_320x480 7
#define SBVS_128x96 8
#define SBVS_224x176 9
#define SBVS_448x240 10
#define SBVS_256x192 11
#define SBVS_1280x720 12
#define SBVS_1440x544 13
#define SBVS_1680x544 14
#define SBVS_1920x544 15
#define SBVS_1920x1080 16Note: Resolution = 0, is AudioOnly mode.
#Key Codes : For my Motorola DCX3400M PVR. 1,4,5,9,10,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,53,54,55,56,57,58,59,60
…No open issues yet, or sync has not completed.