apple tv 开发_如何在Apple TV上播放计算机中的视频文件

apple tv 开发

apple tv 开发

The new Apple TV is pretty cool on its own, and we believe that it’s a good purchase if you’re looking to buy or upgrade to a new streaming device. But what if you want to play a video file from your computer on your TV?

新的Apple TV本身非常酷,如果您要购买或升级到新的流媒体设备我们认为这是一个不错的选择。 但是,如果您想在电视上播放计算机中的视频文件,该怎么办?

The good news is, with a simple $5 app, you can turn your Apple TV into a very capable video streaming device that will play virtually any TV shows or movies you have stored on your PC or Mac.

好消息是,有了一个简单的5美元应用程序,您就可以将Apple TV变成功能强大的视频流设备,几乎可以播放您存储在PC或Mac上的任何电视节目或电影。

在Apple TV上安装Air Video HD (Install Air Video HD on Your Apple TV)

The first thing you will need to do is install the Air Video HD app on your Apple TV. To do this, first open the app store and search for it. The Siri Remote might make this a little annoying, but you should be able to find it with just a few letters.

您需要做的第一件事是在Apple TV上安装Air Video HD应用程序。 为此,请先打开应用商店并进行搜索。 Siri Remote可能会让感到烦恼,但您只需几个字母就可以找到它。

As we mentioned, the app itself will set you back $4.99, but considering what it can do, we think it’s well worth it.

正如我们所提到的,该应用程序本身的价格为4.99美元,但考虑到它可以做什么,我们认为这是非常值得的。

When you first open Air Video HD, you will almost certainly get an error telling you no computers were found.

首次打开Air Video HD时,几乎可以肯定会收到一条错误消息,告诉您未找到计算机。

This is because you need to install the Air Video HD Server on your computer, too.

这是因为您还需要在计算机上安装Air Video HD Server。

在计算机上安装Air Video Server HD (Install Air Video Server HD on Your Computers)

In order to stream video content to your Apple TV, you will first need to install the Air Video Server HD application on your PC or Mac (Linux support is coming soon). We’ll be using the Windows version in this guide, but the two are nearly identical.

为了将视频内容流式传输到Apple TV,首先需要在PC或Mac上安装Air Video Server HD应用程序(即将提供Linux支持)。 在本指南中,我们将使用Windows版本,但是两者几乎相同。

Install the application like you would any other, then start it up. The server will start running automatically.

像安装其他应用程序一样安装该应用程序,然后启动它。 服务器将自动开始运行。

You will immediately see a bunch of options and settings but you can probably safely ignore everything for the time being. Right now, we’re most concerned about adding a location or locations to get things started.

您将立即看到很多选项和设置,但是您暂时可以放心地忽略所有内容。 目前,我们最担心要添加一个或多个位置来开始工作。

Click the “Add” button and you will be prompted to select a directory. Browse to the location where your media is stored on your PC or Mac, choose the folder(s) you want to add and click “OK”.

单击“添加”按钮,系统将提示您选择目录。 浏览到PC或Mac上存储媒体的位置,选择要添加的文件夹,然后单击“确定”。

Now, you will see your locations in the “Shared Folders”. In our example, we’ve only added one location for the sake of simplicity, but you can obviously add as many as you want.

现在,您将在“共享文件夹”中看到您的位置。 在我们的示例中,为简单起见,我们仅添加了一个位置,但显然您可以添加任意多个位置。

At this point, you can close the server application and it will continue to run in the background. If you need to access it in the future, you can do so by clicking the icon in the system tray on Windows or in the menu bar on OS X.

此时,您可以关闭服务器应用程序,它将继续在后台运行。 如果以后需要访问它,可以单击Windows上系统托盘中或OS X上菜单栏中的图标来进行访问。

在Apple TV上查找计算机 (Find Your Computer on Your Apple TV)

With the server up and running and our locations added, it’s time to go back to the Apple TV and access our content. Remember earlier when it told us it couldn’t find any computers? You should now be able to see your server(s) on Air Video HD’s connections screen.

随着服务器的启动和运行以及我们位置的添加,现在该回到Apple TV并访问我们的内容了。 还记得较早时它告诉我们找不到任何计算机吗? 现在,您应该能够在Air Video HD的连接屏幕上看到您的服务器。

Go ahead and click on one of them (if you have more than one running) and browse to the content you want to view. Of course, if you have more than one location added, you will see all of them. As we said earlier, we only added one to keep things simple.

继续并单击其中一项(如果有多个正在运行),然后浏览到要查看的内容。 当然,如果您添加了多个位置,则将看到所有这些位置。 如前所述,我们只是添加了一个以使事情简单。

That then is all there is to it. When you click on a title, it will begin playing and you can operate in the same way you do other video content using the Siri Remote’s play/pause button as well as the touch pad surface to fast forward and rewind.

那就是全部。 单击标题后,它将开始播放,并且您可以使用Siri Remote的播放/暂停按钮以及触摸板表面来快进和快退,以与处理其他视频内容相同的方式进行操作。

Just remember, you can only access this content so long as the host computer is on and the Air Video Server application is running. If you don’t see your shared folder(s) when you open the Air Video HD application on your Apple TV, then you should first check to make sure the computer from where you’re streaming your files is on or hasn’t gone to sleep.

请记住,您只能在主机打开且Air Video Server应用程序正在运行的情况下访问此内容。 如果您在Apple TV上打开Air Video HD应用程序时未看到共享文件夹,则应首先检查以确保流媒体文件所在的计算机已打开或未打开睡觉。

所有这些设置有什么用? (What’s Up With All Those Settings?)

Before we conclude today, we want to take just a few minutes to run through the various configuration settings you will see when you start the server software.

今天结束之前,我们只需要花几分钟时间来完成启动服务器软件时将看到的各种配置设置。

First, at the top of the server screen you will see two options: one to stop the server (if it is running) or start it (if it is stopped), and a button to check the server status.

首先,在服务器屏幕顶部,您将看到两个选项:一个用于停止服务器(如果正在运行)或启动它(如果已停止),以及一个用于检查服务器状态的按钮。

The server status will show you three tabs. The Network tab will display important information such as the local IP address, port, as well as external port and IP if you want to allow your server to be accessed from the Internet.

服务器状态将显示三个选项卡。 如果要允许从Internet访问服务器,“网络”选项卡将显示重要信息,例如本地IP地址,端口以及外部端口和IP。

The Session tab will show you any connected users and playback sessions, and finally the Conversion tab will display information on any files that are currently being converted.

“会话”选项卡将向您显示所有已连接的用户和回放会话,最后“转换”选项卡将显示有关当前正在转换的任何文件的信息。

Below the top section are the Remote Access options. If your server is accessible from the Internet, you can enable or disable it here.

顶部下方是“远程访问”选项。 如果可以从Internet访问服务器,则可以在此处启用或禁用它。

Additionally, you can configure whether you want to set up single or multi user mode. If you choose the latter, then you can assign user accounts to persons in your household.

此外,您可以配置是否要设置单用户或多用户模式。 如果选择后者,则可以将用户帐户分配给家庭成员。

Below these options is a button to “invalidate passwords saved on devices”. All this basically means is that if you give a user access and later need to revoke it, you can quickly do so by clicking that button.

在这些选项下方是一个按钮,用于“使设备上保存的密码无效”。 这基本上意味着,如果您授予用户访问权限,但以后又需要撤消它,则可以通过单击该按钮来快速进行访问。

Finally, if you have file formats that first need to be converted before they can be streamed, then you can see where the conversion folder information is, and if necessary, you can change its location.

最后,如果您具有首先需要转换的文件格式,然后才能进行流传输,则可以查看转换文件夹信息的位置,并且如有必要,可以更改其位置。

The remaining “Other Options” give you the ability to start the server software when you log into your account, as well as set the server to listen on a custom port.

其余的“其他选项”使您能够在登录帐户时启动服务器软件,以及将服务器设置为在自定义端口上侦听。

More than likely, you will not have to mess with this last option, the remaining two “experimental” items, or any of the three buttons located on the right side of the server window.

您很有可能不必弄混最后一个选项,其余两个“实验”项或位于服务器窗口右侧的三个按钮中的任何一个。

As you can see, turning your Apple TV into a video streaming powerhouse is dead simple and cheap, so if you have a bunch of files residing on your trusty old PC or Mac, then you no longer need to futz with attaching it directly to your TV via an HDMI cable.

如您所见,将Apple TV变成视频流媒体的功能既简单又便宜,因此,如果您在可靠的旧PC或Mac上驻留了大量文件,那么您就不再需要直接将其附加到您的计算机上通过HDMI电缆连接电视。

Now, all you need to do is fire up your Apple TV and pick the title you want to view with the Air Video HD app. With that said, please let us know if you found this article helpful by leaving your feedback in our discussion forum.

现在,您所需要做的就是启动Apple TV,并选择要使用Air Video HD应用程序查看的标题。 话虽如此,请将您的反馈意见留在我们的讨论论坛中,如果您对本文有所帮助,请告知我们。

翻译自: https://www.howtogeek.com/235803/how-to-stream-local-movies-and-tv-shows-to-your-apple-tv/

apple tv 开发

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Apple TV和Chromecast上观看本地内容。 无需等待,无需索引,只需拖放即可观看。 确实没有任何简单的事情。 下载气流 复杂而独特的视频处理管道... 气流的心脏。它以最低的CPU负载确保了最佳的视频质量。 怎么样?气流透明地重新混合了可以重新混合的视频,并对需要转码的视频进行了转码。如果您的计算机支持,则代码转换可以硬件加速。听起来太技术性了吗?这就是我们构建Airflow的原因。它隐藏了所有讨厌的细节,并且可以正常使用TM。 大字幕支持 字幕很重要。与大多数类似软件不同,Airflow无需对视频进行转码即可显示文本字幕。这样可以提高视频质量并降低CPU负载。支持DVD和Bluray字幕。 擦洗预览 寻求不一定是个谜。借助即时清理预览,您可以知道在内容加载之前将要降落的位置。使用触摸遥控器进行擦洗时,在Apple TV 4上也可用。 播放清单和最后位置 通过Airflow,您可以将文件整理到播放列表,从而观看多个剧集变得尽可能无缝。 Airflow会记住每个文件的播放位置。它还监视当前文件夹,并为新文件自动选择下一个文件以进行不间断的播放。 环绕声 Chromecast和Apple TV全面支持5.1音频。 Airflow与Airplay镜像或Chrome Tab镜像相比如何 镜像不适用于视频播放,通常会使视频质量出现问题。帧速率不正确,存在伪影和口吃。有了Airflow,您将一无所获。它是专为视频播放而设计的,可提供最佳的视频质量。包括Chromecast Ultra和Apple TV 4K上的4K HDR HEVC流。
要在Apple TV的APP获取HomePod的指令,您可以使用HomeKit框架。以下是获取指令的基本步骤: 1. 导入HomeKit框架: ```swift import HomeKit ``` 2. 创建HMHomeManager实例并请求访问HomeKit数据: ```swift let homeManager = HMHomeManager() homeManager.requestAuthorization { (status) in switch status { case .authorized: // 访问HomeKit数据成功 default: // 访问HomeKit数据失败 } } ``` 3. 获取HomePod的HMRoom实例: ```swift if let home = homeManager.primaryHome { let homePodRoom = home.rooms.first(where: { $0.name == "HomePod Room" }) // 根据HomePod所在的房间名称进行查找 } ``` 4. 获取HomePod的HMAccessory实例: ```swift if let home = homeManager.primaryHome { if let homePodRoom = home.rooms.first(where: { $0.name == "HomePod Room" }) { let homePodAccessory = homePodRoom.accessories.first(where: { $0.name == "HomePod" }) // 根据HomePod的名称进行查找 } } ``` 5. 获取HomePod的指令: ```swift if let home = homeManager.primaryHome { if let homePodRoom = home.rooms.first(where: { $0.name == "HomePod Room" }) { if let homePodAccessory = homePodRoom.accessories.first(where: { $0.name == "HomePod" }) { for service in homePodAccessory.services { for characteristic in service.characteristics { if characteristic.characteristicType == HMCharacteristicTypePowerState { // 获取HomePod的开关状态 characteristic.readValue(completionHandler: { (error) in if error == nil { if let value = characteristic.value as? Bool { print("HomePod的开关状态为:\(value)") } } }) } } } } } } ``` 这样,您就可以在Apple TV的APP获取到HomePod的指令了。注意,要获取HomePod的指令,您需要确保HomePod和Apple TV在同一个HomeKit家庭,并且HomePod已经被添加到HomeKit家庭

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值