diff --git a/i18n/zh-cn/docusaurus-plugin-content-pages/faq-srs-stack.md b/i18n/zh-cn/docusaurus-plugin-content-pages/faq-srs-stack.md index b3bfc304..2451043c 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-pages/faq-srs-stack.md +++ b/i18n/zh-cn/docusaurus-plugin-content-pages/faq-srs-stack.md @@ -13,6 +13,7 @@ * [如何启动多个实例](#multiple-instances):机器CPU很多,如何支持更多的平台转发,或者更多路流以及录制等。 * [带宽太低,提升带宽](#bandwidth):带宽不够,想提升带宽,在CVM中用SRS Stack。 * [如何设置免费HTTPS](#https):如何申请免费HTTPS证书,如何申请多个域名的证书。 +* [如何用服务器的文件做虚拟直播](#virtual-live-server-file): 如何用其他工具上传文件,并在虚拟直播中使用 * [如何修改推流鉴权的密钥](#update-publish-secret):更新推流鉴权的密钥,更换推流密钥 * [如何禁用推流鉴权](#no-publish-auth):不想要推流鉴权,设备不支持特殊字符。 * [如何录制到本地磁盘](#record): 如何录制到SRS Stack的本地磁盘。 @@ -282,6 +283,30 @@ docker run --rm -it --name srs-stack -v $HOME/data:/data \ 申请成功后,在浏览器敲https加你的域名,就可以访问你的网站了。 +


+ +## 如何用服务器的文件做虚拟直播 + +如何用其他工具上传文件,并在虚拟直播中使用。 + +你可以使用其他工具比如ftp或者scp上传大的文件到服务器,然后在虚拟直播中使用上传的文件。但是要求上传的文件在 +`/data`目录下面。 + +SRS Stack是在容器中运行的,所以它这个`/data`说的是容器中的路径,所以你可以在启动SRS Stack的容器时,把你host机器的 +路径映射到`/data`下面, 比如:`docker run -v /your-host-dir:/data/my-upload`,这样在容器中就可以访问`/data/my-upload` +这个目录了。 + +然后你再上传文件到你的host的目录比如文件`my-file.mp4`,在物理机中该文件的路径是`/your-host-dir/my-file.mp4`, +你在SRS Stack中就可以输入`/data/my-upload/my-file.mp4`访问这个文件。 + +你也可以在上传文件后,进入SRS Stack容器,查看文件是否存在,比如执行命令: + +```bash +docker exec -it srs-stack ls -lh /data/my-upload/my-file.mp4 +``` + +如果提示文件存在,则可以在SRS Stack的Virtual Live Events使用这个文件,否则请检查启动Docker时路径是否映射对了。 +


## 如何修改推流鉴权的密钥 diff --git a/src/pages/faq-srs-stack.md b/src/pages/faq-srs-stack.md index 2492c949..9748edcb 100644 --- a/src/pages/faq-srs-stack.md +++ b/src/pages/faq-srs-stack.md @@ -13,6 +13,7 @@ Quick Content * [How to run multiple instances](#multiple-instances): The machine has a lot of CPU, how can we support more platform forwarding, or more streams and recording, etc. * [Low bandwidth, get more bandwidth](#bandwidth): Insufficient bandwidth, want to increase bandwidth, use SRS Stack in CVM. * [How to set up free HTTPS](#https): How to apply for a free HTTPS certificate, how to apply for certificates for multiple domain names. +* [How to use server file for virtual live events](#virtual-live-server-file): How to upload file to server and use it in virtual live events. * [How to modify the push authentication key](#update-publish-secret): Update the push authentication key, replace the push key. * [How to disable push authentication](#no-publish-auth): Don't want push authentication, the device does not support special characters. * [How to record to local disk](#record): How to record to the local disk of SRS Stack. @@ -88,7 +89,7 @@ the container and start with the new version, such as `ossrs/srs-stack:v1.0.299` If you use `ossrs/srs-stack:1`, it is the latest version, and you need to update manually, such as `docker pull ossrs/srs-stack:1`. -If you use BT panel, just delete the application and reinstall the new version, the data is saved in the +If you use aaPanel panel, just delete the application and reinstall the new version, the data is saved in the `/data` directory and will not be lost.


@@ -310,6 +311,35 @@ docker run --rm -it --name srs-stack -v $HOME/data:/data \ After the application is successful, enter https plus your domain name in the browser, and you can access your website. +


+ +## How to use server file for virtual live events + +How to upload file to server and use it in virtual live events. + +You can use other tools like FTP or SCP to upload large files to the server, and then use these uploaded +files in Virtual Live Events. However, it's required that the uploaded files be located in the `/data` +directory. + +SRS Stack runs inside a container, so the `/data` path mentioned refers to a directory within the container. +You can map a directory from your host machine to the `/data` directory inside the container. For example, +by using `docker run -v /your-host-dir:/data/my-upload`, you can access the `/data/my-upload` directory +inside the container. + +Then, when you upload a file to your host directory, such as `my-file.mp4`, the file in the host is +`/your-host-dir/my-file.mp4`, you can access it within SRS Stack by specifying +`/data/my-upload/my-file.mp4`. + +After uploading files, you can also enter the SRS Stack container to check if the files are present. +For example, you can execute the command: + +```bash +docker exec -it srs-stack ls -lh /data/my-upload/my-file.mp4 +``` + +If it indicates that the file exists, you can use this file in SRS Stack's Virtual Live Events. If not, +please check whether the path was mapped correctly when starting Docker. +


## How to modify the push authentication key