From ab1bd055318f4534344f12e51862d383888952a6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Mar 2023 08:49:53 +0800 Subject: [PATCH] translating --- ...️ Use your Raspberry Pi as a streaming server.md | 119 ------------------ ...️ Use your Raspberry Pi as a streaming server.md | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 119 deletions(-) delete mode 100644 sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md create mode 100644 translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md diff --git a/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md b/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md deleted file mode 100644 index 9d95cccba3..0000000000 --- a/sources/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: subject: "Use your Raspberry Pi as a streaming server" -[#]: via: "https://opensource.com/article/23/3/raspberry-pi-streaming-server" -[#]: author: "Sven Erbeck https://opensource.com/users/erbeck" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Use your Raspberry Pi as a streaming server -====== - -There are various reasons to stream live video transmissions from webcams. The Raspberry Pi platform is perfect for such applications. It requires little power for continuous applications such as live-streaming servers. Communication with a Raspicam camera module, USB cam, or other network video signals is possible. The system is an RTMP, HLS, and SRT server. This article shows how to set up the Raspberry Pi as a streaming server to use HLS streaming. You need a video source to use it as a streaming server. - -Even without a Raspberry Pi, you can do the steps described here. In addition, there are further installation instructions for [Windows][1], [Linux][2], and [macOS][3] available. - -### Setup - -The application is datarhei [Restreamer][4], a graphical user interface for the datarhei [Core][5]. The datarhei Core runs the well-known media framework FFmpeg under the hood. The easiest way to start with datarhei Restreamer is to install the official Docker container. The download and installation of the program via Docker Hub are automatic with the `pull` command. Restreamer starts immediately after the installation. If you don't have a Raspberry Pi, use one of the other Docker containers on the datarhei [Restreamer GitHub][4] page (e.g., AMD64 or GPU Cuda support). - -datarhei Restreamer and datarhei Core are both open source software under the [Apache License 2.0][6]. - -Here's the command for an installation on a Raspberry Pi 3 and above with GPU support: - -``` -docker run -d --restart=always --name restreamer \ - -v /opt/restreamer/config:/core/config -v /opt/restreamer/data:/core/data \ - --privileged \ - -p 8080:8080 -p 8181:8181 \ - -p 1935:1935 -p 1936:1936 \ - -p 6000:6000/udp \ - datarhei/restreamer:rpi-latest -``` - -Regardless of which command you use, you only need the `--privileged` option to access local devices, like a USB camera. - -After installation, connect the Raspberry Pi to the local network. Then open the web-based GUI in a browser by navigating to [http://device-ip:8181/ui][7]. - -You should see the following screen: - -![First login into datarhei Restreamer][8] - -Assign the password, and the system is ready for the first login. A wizard is starting to configure the first video source. - -Hint: The above Docker command permanently stores the configuration data with the login name and password in the `/opt/restreamer/config` folder. - -### Implementation - -The application consists of three logical parts: Video input, system dashboard, and video output. The video input and output run independently of each other. - -### Video input - -The wizard will help you to create a video source right from the start. This can be a USB video source, the Raspberry Pi camera, or a network source like an IP cam or an m3u8 file from a network. HLS, RTMP, and real-time SRT protocol are ready to use. The wizard helps to configure the video resolution and sound correctly. In the last step, you can assign different licenses from Creative Commons. It is worth taking a look at the video signal settings. You will find several options, like transcoding or rotating the video for vertical video platforms. - -### Dashboard - -After successfully creating the video signal, you will land in the dashboard. - -![datarhei Restreamer dashboard][9] - -It is the central starting point for all other settings. To see the program's full functionality, you can switch to expert mode in system preferences. - -The dashboard contains the following: - -- Video signal settings. -- Active content URL for RTMP, SRT, HLS server, and snapshot. -- All active Publication Services for restreaming. -- Start the wizard to create additional video sources. -- The system menu. -- Live-Statistics for the video signal. -- Live-System monitoring. - -### Video output - -There are different ways to play the video signal. - -The [publication website][10] is the simplest, immediately-ready, and internally hosted landing page by Restreamer. The player page can also transmit to Chromecast and AirPlay. Basic settings like adjusting the background image and adding a logo in the player are possible directly in the Restreamer. Those who know HTML can customize the page for themselves. Advanced users can inject code to use the site with external modules like a chat. A statistics module under the video player shows the active viewers and all views. The **Share** button supports the distribution of the live stream. HTTPS certificates for the website are active with Let's Encrypt without much effort. With a simple port forwarding for HTTPS to the LAN IP of the Raspberry Pi, the website is publicly accessible. - -![Landingpage from datahrei Restreamer][11] - -The publication services are a great way to restream content. There are numerous ready-made modules for popular websites like YouTube, Twitch, or PeerTube. Likewise, for other streaming software, to popular CDNs. Complete control over the video protocols allows streaming to all RTMP, HLS, and SRT-capable destination addresses. An HTML snippet code with the video player works on web pages. - -![Presets for publication services][12] - -### Save power while streaming with Raspberry Pi - -This article shows how to turn the Raspberry Pi into a streaming server. The Raspberry Pi platform allows you to interact with various video signals in a power-saving way. The pre-settings make it easy to configure the server, and advanced users can make some adjustments to the system. You can use it for restreaming, hosting for live-streaming on a website, or integration into system landscapes with [OBS][13]. Using different video sources and transport protocols offer great flexibility as a basis for a project and make this system highly customizable. Furthermore, the datarhei Core with FFmpeg makes it easy for software developers to extend all application processes. - -The program turns the Raspberry Pi into a dedicated streaming server. Depending on your internet upload, you can live stream to websites or multi-stream to different video networks independently and without an additional video provider. - -Test a fully functional [demo][14] before installation on the project website with the login name **admin** and password **demo**. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/raspberry-pi-streaming-server - -作者:[Sven Erbeck][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/erbeck -[b]: https://github.com/lkxed/ -[1]: https://docs.datarhei.com/restreamer/installing/windows -[2]: https://docs.datarhei.com/restreamer/installing/linux -[3]: https://docs.datarhei.com/restreamer/installing/mac -[4]: https://github.com/datarhei/restreamer -[5]: https://github.com/datarhei/core -[6]: https://github.com/datarhei/restreamer/blob/2.x/LICENSE -[7]: http://device-ip:8181/ui -[8]: https://opensource.com/sites/default/files/2023-01/fig2-first-login-datarhei.jpg -[9]: https://opensource.com/sites/default/files/2023-01/fig1-title-dashboard-datarhei.jpg -[10]: https://demo.datarhei.com/ -[11]: https://opensource.com/sites/default/files/2023-01/fig3-int-publication-website-datarhei.jpg -[12]: https://opensource.com/sites/default/files/2023-01/fig4-preset-publication-services-datarhei.jpg -[13]: https://opensource.com/article/20/6/obs-websockets-streaming -[14]: https://demo.datarhei.com/ui \ No newline at end of file diff --git a/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md b/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md new file mode 100644 index 0000000000..63faa3a7e8 --- /dev/null +++ b/translated/tech/20230301.3 ⭐️⭐️ Use your Raspberry Pi as a streaming server.md @@ -0,0 +1,119 @@ +[#]: subject: "Use your Raspberry Pi as a streaming server" +[#]: via: "https://opensource.com/article/23/3/raspberry-pi-streaming-server" +[#]: author: "Sven Erbeck https://opensource.com/users/erbeck" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +把你的树莓派当作流媒体服务器使用 +====== + +从网络摄像头流式传输实时视频有多种原因。树莓派平台很适合此类应用。对于实时流媒体服务器等连续应用,它只需要很少的电力。可以与 Raspicam 相机模块、USB 摄像头或其他网络视频信号进行通信。该系统是一个 RTMP、HLS 和 SRT 服务器。这篇文章展示了如何将树莓派设置为流媒体服务器以使用 HLS 流媒体。你需要一个视频源才能把它作为流媒体服务器使用。 + +即使没有树莓派,你也可以完成这里描述的步骤。此外,还有针对 [Windows][1]、[Linux][2] 和 [macOS][3] 的进一步安装说明。 + +### 设置 + +该应用程序是 datarhei [Restreamer][4],是 datarhei [Core][5] 的图形用户界面。datarhei Core 在底层运行著名的媒体框架 FFmpeg。开始使用 datarhei Restreamer 的最简单方法是安装官方 Docker 容器。通过 Docker Hub 的程序下载和安装是通过 `pull` 命令自动进行的。安装后,Restreamer 立即启动。如果你没有树莓派,可以使用 datarhei [Restreamer GitHub][4] 页面上的其他 Docker 容器之一(例如,支持 AMD64 或 GPU Cuda)。 + +datarhei Restreamer 和 datarhei Core 都是 [Apache License 2.0][6] 下的开源软件。 + +以下是在支持 GPU 的树莓派 3 及以上机型上的安装命令: + +``` +docker run -d --restart=always --name restreamer \ + -v /opt/restreamer/config:/core/config -v /opt/restreamer/data:/core/data \ + --privileged \ + -p 8080:8080 -p 8181:8181 \ + -p 1935:1935 -p 1936:1936 \ + -p 6000:6000/udp \ + datarhei/restreamer:rpi-latest +``` + +无论你使用哪条命令,你只需要 `--privileged` 选项来访问本地设备,如 USB 摄像头。 + +安装后,将 Raspberry Pi 连接到本地网络。然后在浏览器中进入 [http://device-ip:8181/ui][7] 打开基于 Web 的 GUI。 + +你应该看到以下屏幕: + +![First login into datarhei Restreamer][8] + +分配好密码,系统就可以进行首次登录了。向导正在开始配置第一个视频源。 + +提示:上述 Docker 命令将带有登录名和密码的配置数据永久保存在 `/opt/restreamer/config` 文件夹中。 + +### 实施 + +该应用程序由三个逻辑部分组成:视频输入、系统仪表板和视频输出。视频输入和输出相互独立运行。 + +### 视频输入 + +该向导将帮助你从一开始就创建一个视频源。这可以是一个 USB 视频源、树莓派摄像头,或者是一个网络源,如 IP 摄像头或来自网络的 m3u8 文件。HLS、RTMP 和实时 SRT 协议都可以使用。该向导帮助正确配置视频分辨率和声音。在最后一步,你可以从 Creative Commons 分配不同的许可证。值得看一下视频信号的设置。你会发现几个选项,例如为垂直视频平台转码或旋转视频。 + +### 仪表板 + +成功创建视频信号后,你将进入仪表板。 + +![datarhei Restreamer dashboard][9] + +它是所有其他设置的中心起点。要看到程序的全部功能,你可以在系统偏好中切换到专家模式。 + +仪表板包含以下内容: + +- 视频信号设置。 +- RTMP、SRT、HLS 服务器和快照的活动内容 URL。 +- 用于重新流式传输的所有活动发布服务。 +- 启动向导来创建额外的视频源。 +- 系统菜单。 +- 实时视频信号统计。 +- 实时系统监控。 + +### 视频输出 + +有不同的方法来播放视频信号。 + +[发布网站][10] 是 Restreamer 最简单、即时可用且内部托管的登录页面。播放页面也可以传输到 Chromecast 和 AirPlay。基本设置,如调整背景图片和在播放器中添加标识,可以直接在 Restreamer 中进行。那些懂 HTML 的人可以为自己定制页面。高级用户可以注入代码,以使用网站的外部模块,如聊天。视频播放器下的统计模块显示活跃的观众和所有视图。**分享**按钮支持直播流的分发。网站的 HTTPS 证书通过 Let's Encrypt 激活,无需太多努力。通过简单的 HTTPS 端口转发到树莓派的 LAN IP,网站就可以公开访问。 + +![Landingpage from datahrei Restreamer][11] + +发布服务是重新传输内容的一个好方法。对于流行的网站,如 YouTube、Twitch 或 PeerTube,有许多现成的模块。同样,对于其他流媒体软件,对流行的 CDN 也是如此。对视频协议的完全控制允许流式传输到所有支持 RTMP、HLS 和 SRT 的目标地址。一个带有视频播放器的 HTML 片段代码在网页上工作。 + +![Presets for publication services][12] + +### 使用树莓派播放流媒体节省电力 + +这篇文章展示了如何将树莓派变成一个流媒体服务器。树莓派平台允许你以省电的方式与各种视频信号互动。预先的设置使配置服务器变得很容易,高级用户可以对系统进行一些调整。你可以用它来做重播,在网站上托管实时流式传输,或使用 [OBS][13] 集成到系统环境中。使用不同的视频源和传输协议作为项目的基础,提供了极大的灵活性,使这个系统具有高度的可定制性。此外,带有 FFmpeg 的 datarhei Core 使软件开发者很容易扩展所有的应用进程。 + +该程序将树莓派变成一个专门的流媒体服务器。你可以独立地直播到网站或多路直播到不同的视频网络,而无需额外的视频提供商。 + +使用登录名 **admin** 和密码 **demo** 在项目网站上安装之前测试功能齐全的 [demo][14]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/raspberry-pi-streaming-server + +作者:[Sven Erbeck][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/erbeck +[b]: https://github.com/lkxed/ +[1]: https://docs.datarhei.com/restreamer/installing/windows +[2]: https://docs.datarhei.com/restreamer/installing/linux +[3]: https://docs.datarhei.com/restreamer/installing/mac +[4]: https://github.com/datarhei/restreamer +[5]: https://github.com/datarhei/core +[6]: https://github.com/datarhei/restreamer/blob/2.x/LICENSE +[7]: http://device-ip:8181/ui +[8]: https://opensource.com/sites/default/files/2023-01/fig2-first-login-datarhei.jpg +[9]: https://opensource.com/sites/default/files/2023-01/fig1-title-dashboard-datarhei.jpg +[10]: https://demo.datarhei.com/ +[11]: https://opensource.com/sites/default/files/2023-01/fig3-int-publication-website-datarhei.jpg +[12]: https://opensource.com/sites/default/files/2023-01/fig4-preset-publication-services-datarhei.jpg +[13]: https://opensource.com/article/20/6/obs-websockets-streaming +[14]: https://demo.datarhei.com/ui \ No newline at end of file