Skip to content

Commit d7434c8

Browse files
committed
更新:修改静态库文件获取方式,建议使用脚本自动拉取最新版本
1 parent 86943ff commit d7434c8

7 files changed

Lines changed: 11 additions & 58 deletions

File tree

src/phira_build_guide/Android.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,9 @@ jobs:
3434
# For compatibility of release v0.6.7 and stable channel of Rust
3535
sed -i 's/#!\[feature(local_key_cell_methods)\]//g' prpr/src/lib.rs
3636
37-
- name: Download static-lib
38-
uses: suisei-cn/actions-download-file@v1.3.0
39-
id: downlod-static-lib
40-
with:
41-
url: "https://www.nuanr-mxi.com/prpr-avc.zip"
42-
target: ./
43-
4437
- name: Set Up static-lib
4538
run: |
46-
unzip prpr-avc.zip -d ./
39+
bash prpr-avc/pull-static-lib.sh
4740
4841
- name: Install Android SDK Tools
4942
run: |

src/phira_build_guide/Linux.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
- __若您要构建指定版本的 Phira,请前往 [release](https://github.com/TeamFlos/phira/releases) 页面在 Assets
1212
中选择下载 `Source code (tar.gz)` 到本地,解压到任意路径即可。__
1313
- __警告:为了防止玄学问题,我们不建议路径中包含除了 ASCII 编码包含字符以外的任何字符。__
14-
3. 静态库文件,您可以在 [ESA](https://www.nuanr-mxi.com/prpr-avc.zip)[EdgeOne](https://eo.nuanr-mxi.com/prpr-avc.zip)
15-
下载静态库文件,下载完成后直接解压到代码根目录下,如果提示覆盖文件,请点击覆盖。
14+
3. 静态库文件:您可以使用 `./prpr-avc/pull-static-lib.sh` 来拉取静态库文件。
1615
4. 构建过程需要库文件补充,输入以下命令即可(以Debian分支系统为例):
1716
```shell
1817
sudo apt update

src/phira_build_guide/OpenHarmony.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ git clone https://github.com/TeamFlos/phira
3939
git clone https://github.com/TeamFlos/phira-ohos
4040
```
4141

42-
2. 静态库文件,您可以在 [prpr-avc-ffmpeg](https://github.com/TeamFlos/prpr-avc-ffmpeg/releases) 下载 `aarch64-unknown-linux-ohos.tar.gz`,并解压所有链接库文件 `*.a``phira/prpr-avc/static-lib/aarch64-unknown-linux-ohos`
42+
2. 静态库文件:您可以使用 `./prpr-avc/pull-static-lib.sh` 来拉取静态库文件
4343

4444
3. 添加 `config.toml`,配置 cmake 位置,此部分为编译 ohos 平台的 phira 所需要的。
4545

src/phira_build_guide/StaticLib.md

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,8 @@
11
# 静态库(prpr-avc)
22

33
## 介绍
4-
- 此文件为 Phira 使用的用于解码视频的静态库,此静态库由 [FFmpeg commit hash 4a80db5fc2b1b134550ffbcb8fd3b7ce2ad734b3](https://github.com/FFmpeg/FFmpeg/commit/4a80db5fc2b1b134550ffbcb8fd3b7ce2ad734b3) 编译而来。
5-
- Phira 引用的静态库 FFmpeg 版本无需非常严格,使用什么版本由您决定,但是当您需要修改音视频解码相关功能并做出贡献时,请严格遵守这一版本,当前官方提供的静态库都由此版本编译,由贡献者贡献的静态库可能版本不一致。
6-
- 预编译的静态库可以在 [ESA](https://www.nuanr-mxi.com/prpr-avc.zip)[EdgeOne](https://eo.nuanr-mxi.com/prpr-avc.zip) 下载,下载完成后直接解压到代码根目录下,如果提示覆盖文件,请点击覆盖。
7-
- prpr-avc 仅包含最精简的 FFmpeg 组件,编译选项为:
8-
```shell
9-
--disable-everything \
10-
--enable-decoder=h264 \
11-
--enable-decoder=aac \
12-
--enable-decoder=aac_latm \
13-
--enable-decoder=flac \
14-
--enable-decoder=mp3 \
15-
--enable-decoder=vorbis
16-
```
17-
## 构建(以i686-pc-windows-gnu为例)
18-
19-
1. 下载 [FFmpeg n5.1.8 源代码(GitHub)](https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n5.1.8.tar.gz) 并解压到任意目录。
20-
- _如介绍所述,FFmpeg 版本无需特别严格,您也可以选择其他版本的 FFmpeg 进行构建,但是当您需要修改音视频解码相关功能并做出贡献时,请严格遵守这一版本_
21-
2.`sh` 上操作(此处使用msys2,注意要将ffmpeg源码复制到 `C:\msys64\home\您的用户名`,编译选项并不绝对,您可以自行查阅资料进行自定义)。
22-
23-
```sh
24-
cd FFmpeg-n5.1.8 && mkdir build && cd build
25-
26-
../configure \
27-
--disable-programs \
28-
--disable-doc \
29-
--disable-everything \
30-
--disable-debug \
31-
--arch=i686 \
32-
--target_os=mingw32 \
33-
--cross-prefix=i686-w64-mingw32-
34-
35-
make
36-
```
37-
38-
note:这里有个坑。。。如果报错的话尝试把 msys64\mingw32\bin 这个目录下的 i686-w64-mingw32-gcc-ar.exe , i686-w64-mingw32-gcc-nm.exe , i686-w64-mingw32-gcc-ranlib.exe 复制粘贴一份然后重命名成 i686-w64-mingw32-ar.exe , i686-w64-mingw32-nm.exe , i686-w64-mingw32-ranlib.exe
39-
40-
接着把build文件夹下的所有形如 `*.a` 的文件复制到 `phira\prpr-avc\static-lib\i686-pc-windows-gnu` 就可以啦
41-
42-
- __注意:以上操作仅能保证 cargo 正常编译并输出主程序,如需用于视频解码请自行在 configure 启用 protocol=file,decoders,parsers 等选项,如介绍所示__
43-
44-
## MSVC 构建静态库
45-
- 由于 ffmpeg 的 configure 本身就不为 MSVC 服务,其构建极具挑战性,我们不建议您自行构建 MSVC 版本的静态库,如果您需要 MSVC 版本的静态库,请 [直接下载](https://www.nuanr-mxi.com/prpr-avc.zip)
46-
- 如果您坚持挑战构建,请参考上述的 GNU 构建方法,配合 [这篇教程](https://github.com/ffiirree/ffmpeg-tutorials/blob/master/compile_on_windows.md) 进行构建操作。
4+
- 此文件为 Phira 使用的用于解码视频的静态库,现版本静态库文件由 [此仓库](https://github.com/TeamFlos/prpr-avc-ffmpeg/) 提供。
5+
- Phira 引用的静态库 FFmpeg 版本无需非常严格。
6+
- 预编译的静态库可以在 [prpr-avc-ffmpeg仓库](https://github.com/TeamFlos/prpr-avc-ffmpeg) 的 release 页面获取,但是通常,我们会建议您运行 `prpr-avc` 目录下的 `pull-static-lib.sh` 脚本自动拉取最新的静态库文件。
7+
## 构建
8+
参考[prpr-avc-ffmpeg仓库](https://github.com/TeamFlos/prpr-avc-ffmpeg)工作流。

src/phira_build_guide/Windows_Gnu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- __警告:为了防止玄学问题,我们不建议路径中包含除了 ASCII 编码包含字符以外的任何字符。__
1515
3. perl,您可以在命令提示符(cmd)或者 PowerShell 使用 `perl -v` 检查系统是否安装了 perl,如果没有,请搜索并打开
1616
`MSYS2 UCRT64` 输入 `pacman -S perl` 安装 perl
17-
4. 静态库文件您可以在 [ESA](https://www.nuanr-mxi.com/prpr-avc.zip)[EdgeOne](https://eo.nuanr-mxi.com/prpr-avc.zip) 下载静态库文件,下载完成后直接解压到代码根目录下,如果提示覆盖文件,请点击覆盖
17+
4. 静态库文件您可以在 `MSYS2中` 使用 `./prpr-avc/pull-static-lib.sh` 来拉取静态库文件
1818

1919
## 开始构建
2020

src/phira_build_guide/Windows_Msvc.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
- __如果您无法连接到 GitHub,您也可以使用 git 加速网站提供的加速地址克隆与下载。__
1313
- __若您要构建指定版本的 Phira,请前往 release 页面在 Assets 中选择下载 `Source code(zip)` 到本地,解压到任意路径即可。__
1414
- __警告:为了防止玄学问题,我们不建议路径中包含除了 ASCII 编码包含字符以外的任何字符。__
15-
3. 静态库文件,您可以在 [ESA](https://www.nuanr-mxi.com/prpr-avc.zip)[EdgeOne](https://eo.nuanr-mxi.com/prpr-avc.zip)
16-
下载静态库文件,下载完成后直接解压到代码根目录下,如果提示覆盖文件,请点击覆盖。
15+
3. 静态库文件:您可以使用 `./prpr-avc/pull-static-lib.sh` 来拉取静态库文件,或手动前往 [prpr-avc-ffmpeg发行页](https://github.com/TeamFlos/prpr-avc-ffmpeg/releases/latest) 下载所需要的静态库文件,并手动解压。
1716
4. 确认您拥有 `x64 Native Tools Command Prompt for VS 20**`,若无此环境,但是已经安装了 cargo,请考虑单独安装
1817
`Visual Studio 20xx`,并在安装时安装 `MSVC``Windows SDK` 组件,安装完成后您将会拥有
1918
`x64 Native Tools Command Prompt for VS 20**` 环境。

src/phira_build_guide/macOS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- __若您要构建指定版本的 Phira,请前往 [release](https://github.com/TeamFlos/phira/releases) 页面在 Assets
1212
中选择下载 `Source code (tar.gz)` 到本地,解压到任意路径即可。__
1313
- __警告:为了防止玄学问题,我们不建议路径中包含除了 ASCII 编码包含字符以外的任何字符。__
14-
3. 静态库文件,您可以在 [ESA](https://www.nuanr-mxi.com/prpr-avc.zip)[EdgeOne](https://eo.nuanr-mxi.com/prpr-avc.zip) 下载静态库文件,下载完成后直接解压到代码根目录下,如果提示覆盖文件,请点击覆盖
14+
3. 静态库文件:您可以使用 `./prpr-avc/pull-static-lib.sh` 来拉取静态库文件
1515

1616
## 开始构建
1717

0 commit comments

Comments
 (0)