百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

Slinger

> 编程语言
开源

重新使用没有 SlingBox 服务器的 SlingBox 硬件

197 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

重新使用没有 SlingBox 服务器的 SlingBox 硬件

Slinger

Slinger is a project that allows SlingPlayer, Slingboxes and MediaPlayers to stream content:

  • On the same LAN
  • Connecting from the Internet
  • Fully distributed (Cloud-based)

Sticking it to the Man, one slingbox at a time

Version log

  • Ver. 3.08: This now supports the 240/350/500/M1/M2/Solo/Pro and ProHD

Documentation

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:

  • SlingboxServerNetworkingGuide.pdf
  • V3.0x_ReleaseNotes.pdf
  • V3.08_release_notes.pdf
  • V3.08d_release_notes.pdf
  • V3.08e_release_notes.pdf
  • V3.08f_release_notes.pdf

Setup instructions

  1. Obtain your SlingBox admin password
  2. Edit the config.ini file:
    1. You can select what type of slingbox you have with the sbtype = entry
  3. Run slingbox_server.py

Bonus

  • The 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.

To watch your slingbox

Use a media player that supports http streaming. I've tested

  • VLC
  • OBS studio
  • Ffplayer
  • Mxplayer

Just configure:

h
http://your_ip_address_or_FQDN:your_port_number/slingbox

Your_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/slingbox

Important

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

Remote control

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/Remote

Linux/RaspberryPi Notes

You'll need a working Python3 interpreter to get going. Comes pre-installed on the Raspberry Pi distribution:

  • A minimum system is just less that 2G. So for safety sake use at least a 4G micro sd card Make a user "slingbox" with whatever password you'd like
bash
    sudo apt-get update
    sudo apt-get install python3-pip
  • You don't need the flask module if you're not using the embedded web server to server out the Remote Control page. Disable the remote in your config.ini file set enableremote=no.
bash
    sudo pip install flask
  • You don't need netifaces if you configure the slingbox ip address and port number in the config.ini file
bash
    sudo pip install netifaces
  • Copy "slingbox_server.py, config.ini and sling.service to /home/slingbox
bash
    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   
  • The default config generates a log file /tmp/sling.log to check to see what's going on....

As root, add or modify the two following lines to your /etc/sysctl.conf

python
    net.core.rmem_max = 8192000
    net.core.wmem_max = 8192000

Adding your own remote

To add your own remote, please do following:

  1. Create a new branch and follow this naming convention:

    add-remote-``

  2. Add your control in the folder named CustomRemotes, name your file:

    ModelRemote.txt

The branch will be reviewed and approved for merging if passed.

Notes for Windows users

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.

  1. Make a folder "slingbox" somewhere
  2. Copy slinbox_server.py, config.ini and RunSling.bat to the slingbox folder

If you want to have the server start automatically on boot make a shortcut to RunSling.bat in the Startup folder.

  1. You need to open the port your using in your firewall on the server box if it's enabled.
  2. The port number the server binds to is set in the config.ini file, defaults to 8080.
  3. If you want remote access add a port map on your firewall to redirect to your server box.

Security

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.

Not getting what your expecting?

Note the Slingbox does not upscale the input, See https://www.slingbox.com/help/KB/KB-2000464 for more info.

Slingbox Video Sizes

python
#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	16

Note: 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

Slingbox Command Codes

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言