raspberry pi
Valve’s Steam Machines aim to bring your Steam game library right into your living room (but at a rather steep premium). Today we’ll show you how to bring your Steam library (plus all your other computer games) to your living room for a fraction of the price with a Raspberry Pi.
Valve的Steam Machines旨在将您的Steam游戏库带入您的客厅(但价格较高)。 今天,我们将向您展示如何使用Raspberry Pi将Steam库(以及所有其他计算机游戏)带到您的客厅,而价格却只是其中的一小部分。
我为什么要这样做? (Why Do I Want To Do This?)
Hands down the most versatile gaming experience is the one you have on your Windows computer. Whether you’re playing new cutting edge releases or emulating 20+ year old games, you can simply play more games on your PC than anywhere else.
传承最通用的游戏体验就是您在Windows计算机上拥有的那种体验。 无论您是玩新的发行版游戏还是模拟20多年的老游戏,您都可以在PC上玩比其他地方更多的游戏。
Problematically, however, most of us keep our PCs in our home offices, dens, spare bedrooms, and anywhere but the where comfiest seat in the house with the biggest screen is: the living room. If you’re like us you’d love to play your favorite titles on your living room HDTV but you’re not about to either 1) build a whole new computer with a high end GPU to do that or 2) unplug everything and haul your entire computer down and gear down to the living room just to play.
然而,问题我们大多数人保持我们的电脑在我们的家庭办公室,窝点,备用卧室,和任何地方,但在最大屏幕的房子在那里comfiest座位:客厅。 如果您像我们一样,希望在客厅的高清电视上播放自己喜欢的标题,但您不想这样做:1)用高端GPU建造一台全新计算机来做到这一点,或者2)拔掉所有东西并拖拉您可以将整个计算机放下来,然后放到客厅玩。
Wouldn’t it be nice if you could just stream what’s on your PC right to your HDTV set without bringing the whole computer along for the ride? Fortunately for you, us, and everyone else who wants to pipe the powerful gaming goodness of their PC to another screen in their house, there’s a way to leverage the GameStream protocol built into NVIDIA’s mid-to-high-end GPUs to bring your gaming to your living room without breaking the bank.
如果您只需要将PC上的内容直接传输到HDTV电视机而无需携带整个计算机就可以了,那不是很好吗? 对于您,我们以及希望将PC的强大游戏优势传递到房屋中其他屏幕的每个人来说,都非常幸运,有一种方法可以利用NVIDIA中高端GPU内置的GameStream协议来带来您的游戏到您的客厅而不必花很多钱。
Let’s dig into the specifics of what you need and then show you how to configure your PC, Raspberry Pi, and game collection to get things up and running.
让我们深入研究您需要的细节,然后向您展示如何配置PC,Raspberry Pi和游戏集合以启动并运行它们。
它是如何工作的,我需要什么? (How Does It Work And What Do I Need?)
NVIDIA designed the GameStream protocol so that they could get a slice of the living room/mobile gaming pie by streaming the games from your PC to your HDTV (via an auxiliary device or box that serves as a client).
NVIDIA设计了GameStream协议,以便他们可以将游戏从PC传输到HDTV(通过充当客户端的辅助设备或盒子)中,从而获得客厅/移动游戏市场的份额。
We really, really, want to stress that last bit to clear up any confusion. This entire system hinges on you having a PC capable of playing the game and does not, in anyway, give you a computer attached to your TV capable of playing the games independently. The device attached to your TV is significantly less powerful than your actual PC and merely serves to display the game stream from your computer.
我们确实非常想强调最后一点,以消除任何混乱。 整个系统取决于您有一台能够玩游戏的PC,但无论如何都不会给您连接到电视上的能够独立玩游戏的计算机。 与电视连接的设备的功能远不如实际的PC,仅用于显示计算机上的游戏流。
You can buy NVIDIA products, from the NVIDIA Shield lineup, ranging from tablets to full-blown $200 game boxes running Android intended to go right under your TV next to your other media gear, to accomplish that end. But you don’t need to buy one of those NVIDIA products to access GameStream though!
您可以从NVIDIA Shield系列中购买NVIDIA产品,从平板电脑到运行Android的功能齐全的价值200美元的游戏机,目的是将电视直接放在电视下,与其他媒体设备相邻,以达到这一目的。 但是,您无需购买这些NVIDIA产品之一即可访问GameStream!
Thanks to the creative folks at the open-source Moonlight project, who put together a reverse engineered and open source client software package for GameStream, we can receive and display GameStream streams on PCs, mobile devices, and embedded devices like the Raspberry Pi.
感谢开源Moonlight项目的创新者,他们为GameStream集成了反向工程和开源客户端软件包,我们可以在PC,移动设备和Raspberry Pi等嵌入式设备上接收和显示GameStream流。
A project this cool definitely isn’t free but it is definitely cheaper than either buying an off-the-shelf solution, building a second gaming PC, or waiting and shelling out big bucks for an official Steam Machine. If fate is on your side (and you already have the hardware) then this project is free. Even if you needed to purchase everything from scratch, PC aside, you’d still end up with a project cheaper than buying a dedicated machine. Let’s take a look at the gear you need.
一个如此酷的项目绝对不是免费的,但绝对比购买现成的解决方案,构建第二台游戏PC或等待并为官方的Steam Machine掏出大笔钱便宜。 如果命运在您身边(并且您已经拥有硬件),那么该项目是免费的。 即使您需要从头开始购买所有东西,除了PC,您仍然会获得比购买专用机器更便宜的项目。 让我们来看看您需要的装备。
支持GameStream的GPU和计算机 (A GPU And Computer That Supports GameStream)
GameStream is a proprietary protocol built into select NVIDIA GeForce graphics cards. Desktop users will find GameStream support in the GeForce GTX 650 and above. Laptop users will find GameStream support in select GTX 600M GPUs as well as all GTX 700M and 800M models.
GameStream是某些NVIDIA GeForce显卡内置的专有协议。 台式机用户将在GeForce GTX 650及更高版本中找到GameStream支持。 笔记本电脑用户可以在某些GTX 600M GPU以及所有GTX 700M和800M型号中找到GameStream支持。
Additionally you’ll need either Windows 7 or above as well as hardware than can support the streaming process. The GameStream requirements, outlined here, indicate you should use at least an i3-2100 processor or higher with 4GB of RAM or higher. We cannot comment as to whether or not those are true requirements or recommendations couched as requirements because our test machine exceeded the requirements.
此外,您将需要Windows 7或更高版本以及需要支持流传输过程的硬件。 此处概述的GameStream要求表明您应至少使用i3-2100处理器或更高版本以及4GB或更高的RAM。 由于我们的测试机器超出了要求,因此我们无法评论这些要求是否为真实要求或建议。
Finally, beyond just the hardware on your PC you’ll also need the GeForce Experience software. This is independent of the actual GPU drivers and unless you went out of your way to install it you likely don’t have it on your PC at the moment (we didn’t before undertaking this project).
最后,除了PC上的硬件之外,您还需要GeForce Experience软件。 这与实际的GPU驱动程序无关,除非您不费力气地安装它,否则您可能目前不在PC上安装它(我们在进行此项目之前没有这样做)。
Raspberry Pi微型计算机 (A Raspberry Pi Microcomputer)
There are several iterations of the Raspberry Pi microcomputer by now. For this project you’ll, ideally, want a new Raspberry Pi 2 (which sports a beefier processor than its predecessors). That’s the unit we used for this tutorial and that’s the unit we can report very positive experiences with.
到目前为止,Raspberry Pi微型计算机已经进行了多次迭代。 对于这个项目,理想情况下,您需要一个新的Raspberry Pi 2(它比以前的处理器具有更强大的处理器)。 这是我们用于本教程的单元,也是可以报告非常积极的经验的单元。
You can also use the Raspberry Pi B+ model; although we didn’t use that one for this tutorial in our reading on the matter many users reported using the Pi B+ with success.
您也可以使用Raspberry Pi B +模型; 尽管我们在阅读本教程时并未使用该软件,但许多用户表示使用Pi B +成功。
This tutorial will not walk you through the initial setup of your Raspberry Pi unit as we have previously covered the Raspberry Pi extensively. If you’re new to using the Pi and need to catch up to this point please take a peek at The HTG Guide to Getting Started with Raspberry Pi for an overview of important topics like selecting a good power source and then check out How to Enjoy Dead Simple Raspberry Pi Setup with NOOBS for help installing Raspbian.
由于我们之前已经广泛介绍了Raspberry Pi,因此本教程不会引导您完成Raspberry Pi单元的初始设置。 如果您不熟悉Pi ,请赶快阅读《 HTG Raspberry Pi入门指南》,了解重要主题的概述,例如选择优质的电源,然后查看如何享受。带有NOOBS的Dead Simple Raspberry Pi安装程序,可帮助您安装Raspbian。
嵌入式月光 (Moonlight Embedded)
We’ll install this directly from the Raspberry Pi later in the tutorial, but we’re listing it here as it’s such a critical component we’re making note of it here (and hoping you find uses for such a great open-source project on other devices).
我们将在本教程的后面部分直接从Raspberry Pi安装它,但是我们在这里列出它,因为它是一个非常关键的组件,我们在这里记下了它(希望您能发现这样一个伟大的开源项目的用途)在其他设备上)。
You can read more about the Moonlight project here.
您可以在此处阅读有关Moonlight项目的更多信息。
远程外围设备 (Remote Peripherals)
The Pi, Moonlight, and GameStream all support the traditional gaming combo of mice/keyboards and you can plug gaming peripherals into the USB ports like wired Xbox controllers or use wireless controllers with an appropriate adapter.
Pi,Moonlight和GameStream均支持鼠标/键盘的传统游戏组合,您可以将游戏外围设备插入USB端口(如有线Xbox控制器),或将无线控制器与适当的适配器配合使用。
We used both a wired mouse and keyboard plugged into the Raspberry Pi as well as an Xbox controller hooked up, wirelessly, to the source PC. (For tips on hooking up a wireless Xbox controller to your PC see this tutorial.
我们既使用插入Raspberry Pi的有线鼠标和键盘,也使用无线连接到源PC的Xbox控制器。 (有关将无线Xbox控制器连接到PC的提示,请参阅本教程。
The range of the wireless adapter was so great there was no need to add the controller to the Pi unit at the end of the streaming tunnel; we could use the controller right off the source PC because, remember, the whole system is streaming the content from the PC (not actually generating it on the Pi).
无线适配器的范围如此之大,无需在流媒体隧道的末端将控制器添加到Pi单元中; 我们可以直接在源PC上使用控制器,因为请记住,整个系统正在从PC流式传输内容(实际上不是在Pi上生成内容)。
蒸汽 (Steam)
If you check out the GeForce Experience documentation you’ll find a list of supported games. That’s great and all, but despite the list’s length it’s not very comprehensive. In fact in the introduction of the article we promised you a Steam Machine for your living room that could play any of the games your gaming PC could.
如果您查看GeForce Experience文档,则会找到支持的游戏列表。 太好了,但尽管列表很长,但不是很全面。 实际上,在本文的引言中,我们向您保证了在您的客厅使用蒸汽机,可以玩您的游戏PC可以玩的任何游戏。
Although it’s not listed on the game list, because it’s not a game, you can launch the actual Steam app from the remote client and then boom you’ve got total access to not just your Steam Library of games but any games or emulators you’ve added to Steam too.
尽管它不在游戏列表中,但因为它不是游戏,所以您可以从远程客户端启动实际的Steam应用程序,然后蓬勃发展,您不仅可以完全访问Steam的游戏库,还可以完全访问您所使用的任何游戏或模拟器我也加入了Steam 。
We were able to launch any native Steam game as well as old PC games, like the old god-simulation game Black & White (2001) without any issues.
我们能够启动任何本机Steam游戏以及旧版PC游戏,例如旧版的上帝模拟游戏《黑与白》 (2001),没有任何问题。
配置电脑 (Configuring Your PC)
On the PC side of things setup is really simple. Your PC is already up and running, you already have a GeForce card installed, and, if you already installed the GeForce Experience when you installed your GPU, then you actually have nothing left to do!
在PC方面,设置非常简单。 您的PC已经启动并且正在运行,您已经安装了GeForce卡,并且,如果在安装GPU时已经安装了GeForce Experience,那么您实际上无事可做!
If you do need the GeForce Experience software, and remember its not the same as your GPU drivers but an extra software suite layered over top, head over to the download page here to grab a copy for your PC.
如果您确实需要GeForce Experience软件,并且记住它与GPU驱动程序不一样,而是上面有一个额外的软件套件,请转到此处的下载页面以获取PC的副本。
When installing the software fresh, you really do need to reboot your PC. We know, we know. Most of the time that’s just a suggestion often ignored, but this time around you’ll need to actually reboot before the GameStream protocol is active. Trust us. We spent way too much time troubleshooting during this tutorial because we ignored the restart prompt.
重新安装软件时,确实需要重新启动PC。 我们知道,我们知道。 在大多数情况下,这只是一个建议,经常被忽略,但是这一次您需要在GameStream协议激活之前实际重新启动。 相信我们。 在本教程中,我们花了太多时间进行故障排除,因为我们忽略了重新启动提示。
Once you’ve installed it and rebooted, run the software, select the “Preferences” tab, and check that “GameStream” appears in the list of navigation options on the lefthand side. Select “GameStream” and switch the streaming on by selecting “On my network”. At this point you’ve completed the configuration process on the PC. Let’s go configure the Pi and then get down to playing some games.
安装并重新启动后,运行软件,选择“首选项”选项卡,并检查“ GameStream”是否出现在左侧的导航选项列表中。 选择“ GameStream”,然后选择“在我的网络上”以打开流媒体。 至此,您已经在PC上完成了配置过程。 让我们配置Pi,然后开始玩一些游戏。
配置您的Raspberry Pi (Configuring Your Raspberry Pi)
This tutorial assumes you have already installed Rasbian on your Raspberry Pi and you can boot it and access the command line (either directly if you configured it as such or by exiting the desktop to return to the command line). If you haven’t done so, please return to the early portions of the article and check out the links on configuring your Pi.
本教程假定您已经在Raspberry Pi上安装了Rasbian,并且可以启动它并访问命令行(如果直接配置了Rasbian,或者直接退出桌面返回命令行)。 如果您还没有这样做,请返回本文的开头部分,并查看有关配置Pi的链接。
Once Raspbian is up and running we have only a few minor things to attend to before we can start playing our games. Before we dive into all the commands we would strongly encourage you to configure your Pi to accept an SSH connection so that you can enter all of these commands from the comfort of your main computer (and with the comfort of cut and paste at that).
一旦Raspbian启动并运行,我们就可以开始玩游戏了。 在深入研究所有命令之前,我们强烈建议您将Pi配置为接受SSH连接,以便您可以在舒适的主机上输入所有这些命令(并在其中进行剪切和粘贴)。
The first step is to add Moonlight to your Pi’s repository list so we can use the apt-get command to pull down the packages instead of fussing with getting the full file URLs from the Moonlight GitHub repository and manually installing it.
第一步是将Moonlight添加到您的Pi的存储库列表中,以便我们可以使用apt-get命令下拉包,而不必大惊小怪地从Moonlight GitHub存储库中获取完整的文件URL并手动安装它。
Enter the following command while logged in as the root user on your Pi (the default is username “pi” password “raspberry”).
以您的Pi上的root用户身份登录时输入以下命令(默认为用户名“ pi”密码“ raspberry”)。
sudo nano /etc/apt/sources.list
sudo nano /etc/apt/sources.list
This will open up your repository sources list. Add the following line to the list.
这将打开您的存储库源列表。 将以下行添加到列表中。
deb http://archive.itimmer.nl/raspbian/moonlight wheezy main
deb http://archive.itimmer.nl/raspbian/moonlight wheezy main
Exit nano by pressing CTRL+X, save the document when prompted. Next, we’ll install Moonlight. Enter the following commands.
通过按CTRL + X退出nano,在出现提示时保存文档。 接下来,我们将安装Moonlight。 输入以下命令。
apt-get update
apt-get install moonlight-embedded
apt-get update
apt-get install moonlight-embedded
When prompted answer all the questions “Y” to install all the necessary files.
出现提示时,回答所有问题“是”以安装所有必需的文件。
This is the process we used and it should work for the vast majority of users. If for any reason you wish to manually install the Moonlight software and dependencies, please refer to the readme file for the Moonlight Embedded at GitHub here for additional information.
这是我们使用的过程,应该对绝大多数用户有效。 如果出于任何原因您希望手动安装Moonlight软件及其依赖项,请参阅GitHub上Moonlight Embedded的自述文件,以获取更多信息。
The final step is to pair your gaming PC to the Pi. Again at the command prompt on the Pi, enter the following command where X.X.X.X is the local network IP address of the gaming PC.
最后一步是将游戏PC与Pi配对。 再次在Pi上的命令提示符处,输入以下命令,其中XXXX是游戏PC的本地IP地址。
moonlight pair X.X.X.X
moonlight pair XXXX
The command will generate a certificate and a four digit PIN. On your computer screen you’ll see a popup like so.
该命令将生成一个证书和一个四位数的PIN。 在计算机屏幕上,您会看到一个类似的弹出窗口。
Enter the PIN to complete the pairing process and authorize the Moonlight/Pi unit to access your game stream.
输入PIN以完成配对过程,并授权Moonlight / Pi单元访问您的游戏流。
在客厅玩游戏 (Playing Your Games From Your Living Room)
You’ve installed GeForce Experience on your PC, you’ve installed Moonlight on your Raspberry Pi, now it’s time to hook up the Pi to your TV (if it isn’t already hooked up) and use a simple command to link the Pi to your PC and enjoy your games.
您已经在PC上安装了GeForce Experience,已经在Raspberry Pi上安装了Moonlight,现在是时候将该Pi连接到电视了(如果尚未连接)并使用一个简单的命令来链接该Pi到您的PC并享受您的游戏。
The format for the moonlight streaming command is as follows, where again X.X.X.X is the IP of the gaming PC.
月光流命令的格式如下,其中XXXX还是游戏PC的IP。
moonlight streaming [options] X.X.X.X
moonlight streaming [options] XXXX
What goes in the [options] section? While you can leave it empty and let everything run in the default settings there are a few reasons you may wish to tinker with the switches. Here are all the available command switches you can use in the options section.
[选项]部分中有什么内容? 虽然您可以将其保留为空,并让所有内容均在默认设置下运行,但您可能有一些理由希望修改这些开关。 这是您可以在选项部分中使用的所有可用命令开关。
-720 Use 1280x720 resolution [default]
-1080 Use 1920x1080 resolution
-width Horizontal resolution (default 1280)
-height Vertical resolution (default 720)
-30fps Use 30fps
-60fps Use 60fps [default]
-bitrate Specify the bitrate in Kbps
-packetsize Specify the maximum packetsize in bytes
-app Name of app to stream
-nosops Don't allow GFE to modify game settings
-input Use as input. Can be used multiple times
-mapping Use as gamepad mapping configuration file (use before -input)
-audio Use as ALSA audio output device (default sysdefault)
-localaudio Play audio locally
-720 Use 1280x720 resolution [default]
-1080 Use 1920x1080 resolution
-width Horizontal resolution (default 1280)
-height Vertical resolution (default 720)
-30fps Use 30fps
-60fps Use 60fps [default]
-bitrate Specify the bitrate in Kbps
-packetsize Specify the maximum packetsize in bytes
-app Name of app to stream
-nosops Don't allow GFE to modify game settings
-input Use as input. Can be used multiple times
-mapping Use as gamepad mapping configuration file (use before -input)
-audio Use as ALSA audio output device (default sysdefault)
-localaudio Play audio locally
If you’re having issues when using the defaults you can use the command switches to make adjustments. For example it should default to using Steam as the default app but if it doesn’t you can use the following command to force Steam to run.
如果使用默认值时遇到问题,可以使用命令开关进行调整。 例如,它应该默认使用Steam作为默认应用程序,但是如果没有使用默认应用程序,则可以使用以下命令强制Steam运行。
moonlight streaming -app Steam X.X.X.X
moonlight streaming -app Steam XXXX
As another example, let’s say your computer doesn’t do well with the default 60fps setting and you always forget to turn off the speakers on your computer before firing up Moonlight. You could downshift to 30fps and instruct the GameStream protocol to turn off the audio on your computer and only play the audio in the living room with the following command.
再举一个例子,假设您的计算机在默认的60fps设置下效果不佳,并且您总是忘记在启动Moonlight之前关闭计算机上的扬声器。 您可以降级到30fps,并指示GameStream协议关闭计算机上的音频,仅使用以下命令在客厅中播放音频。
moonlight streaming -30fps -localaudio X.X.X.X
moonlight streaming -30fps -localaudio XXXX
Once you execute the command Moonlight will automatically connect to your PC, launch Steam in Big Picture Mode, and within seconds you’ll see the Big Picture Mode dashboard on your living room TV just like you would if you were sitting in your home office playing on the computer (and, in fact, if you were to go into your home office and look at the PC you’d see the screens were mirrored).
执行命令后,Moonlight将自动连接到PC,以“大图片模式”启动Steam,几秒钟之内,您将在客厅电视上看到“大图片模式”仪表板,就像坐在家庭办公室中一样在计算机上(实际上,如果您要进入家庭办公室并查看PC,您将会看到屏幕已镜像)。
This is the moment where, if you’re anything like we are when it comes to geeky projects and gaming, you’ll just sit there stunned at how amazing the whole thing is. There you’ll be, sitting in your living room looking at your TV but playing games that are actually on your PC in the other room… and it’ll all work shockingly smoothly with crisp graphics and sharp sound. The future truly is now.
在这一刻,如果您像我们一样喜欢怪异的项目和游戏,您会坐在那里惊呆了,整个事情多么令人惊奇。 您将坐在客厅里看电视,却在另一间房间里的PC上玩游戏……您将可以以清晰的图形和清晰的声音流畅地工作。 真正的未来是现在。
Have a pressing question about gaming in the 21st century? Shoot us an email at ask@howtogeek.com and we’ll do our best to answer it. Have a clever Raspberry Pi project to share? We’d like to hear about that too.
对21世纪的游戏有一个紧迫的问题吗? 向我们发送电子邮件至ask@howtogeek.com,我们将尽力答复。 有一个聪明的Raspberry Pi项目可以分享吗? 我们也想听听。
翻译自: https://www.howtogeek.com/220969/turn-a-raspberry-pi-into-a-steam-machine-with-moonlight/
raspberry pi