Skip to content

Commit

Permalink
fix some typo
Browse files Browse the repository at this point in the history
  • Loading branch information
王磊 authored and taoboyang committed Jan 3, 2024
1 parent f27c298 commit d354d0e
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 26 deletions.
6 changes: 3 additions & 3 deletions content/en/docs/bmf/getting_started_yourself/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def hello_world():
"width": 320,
"height": 240,
"crf": 23,
"preset": "very fast"
"preset": "veryfast"
},
"audio_params": {
"codec": "aac",
Expand All @@ -95,10 +95,10 @@ def hello_world():
)
.run()
)

if __name__ == '__main__':
hello_world()
```
### run

`python3 hello_world.py`
`python3 hello_world.py`
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bmf.encode(
"width": 320,
"height": 240,
"crf": 23,
"preset": "very fast"
"preset": "veryfast"
},
"audio_params": {
"codec": "aac",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ apt install -y python3.9 \
<td>

```bash
dnf -y install python39 python39-devel python39-pip
dnf -y install python39 python39-devel python39-pip
```

</td>
Expand Down Expand Up @@ -204,7 +204,7 @@ cd /opt
wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
tar xvf Python-3.9.13.tgz
cd Python-3.9.13
sudo ./configure --enable-optimizations
sudo ./configure --enable-optimizations --enable-shared
sudo make altinstall
```

Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/bmf/multiple_features/dynamic_graph/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ option = {
'width': 320,
'height': 240,
'crf': 23,
'preset': 'very fast'
'preset': 'veryfast'
}
}
reset_graph = bmf.graph()
Expand All @@ -88,4 +88,4 @@ Dynamic configuration only needs to write the node alias and specific parameters

### Callback method:

Some application scenarios need to decide when to dynamically add, delete, and configure in certain module nodes. In this case, the callback mechanism of BMF can be used to cooperate. For details, see test_dynamical_graph_cb() of the example program.
Some application scenarios need to decide when to dynamically add, delete, and configure in certain module nodes. In this case, the callback mechanism of BMF can be used to cooperate. For details, see test_dynamical_graph_cb() of the example program.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ BMF supports ffmpeg GPU codec as well. E.g. you can set `"hwaccel": "cuda"` and
bmf.graph()
.decode({'input_path': input_video_path})['video']
.scale(320, 240)
.encode(None,
.encode(None,
{
"output_path": output_path,
"format": "mjpeg",
Expand All @@ -123,9 +123,10 @@ BMF supports ffmpeg GPU codec as well. E.g. you can set `"hwaccel": "cuda"` and

input_path = "test.mp4"
output_path = "./stream_copy.mp4"

stream = bmf.graph().decode(
{ 'input_path': input_path,
{
'input_path': input_path,
'video_codec': "copy"
}
)
Expand Down Expand Up @@ -392,4 +393,4 @@ And a FFmpeg command line will be generated and run according to the json descri
ffmpeg -threads 8 -i test.mp4 -filter_complex "[0:v] scale=320:240[c_ffmpeg_filter_1_0]
" -map '[c_ffmpeg_filter_1_0]' -vcodec libx264 -pix_fmt yuv420p -crf 23 -preset veryfast -s 320x240 -map
0:a -acodec aac -b:a 128000 -ar 44100 -ac 2 -f mp4 ./output.mp4 -y
```
```
6 changes: 3 additions & 3 deletions content/zh/docs/bmf/getting_started_yourself/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def hello_world():
"width": 320,
"height": 240,
"crf": 23,
"preset": "very fast"
"preset": "veryfast"
},
"audio_params": {
"codec": "aac",
Expand All @@ -93,10 +93,10 @@ def hello_world():
)
.run()
)

if __name__ == '__main__':
hello_world()
```
### 运行

`python3 hello_world.py`
`python3 hello_world.py`
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bmf.encode(
"width": 320,
"height": 240,
"crf": 23,
"preset": "very fast"
"preset": "veryfast"
},
"audio_params": {
"codec": "aac",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ apt install -y python3.9 \
<td>

```bash
dnf -y install python39 python39-devel python39-pip
dnf -y install python39 python39-devel python39-pip
```

</td>
Expand Down Expand Up @@ -204,7 +204,7 @@ cd /opt
wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
tar xvf Python-3.9.13.tgz
cd Python-3.9.13
sudo ./configure --enable-optimizations
sudo ./configure --enable-optimizations --enable-shared
sudo make altinstall
```

Expand Down
4 changes: 2 additions & 2 deletions content/zh/docs/bmf/multiple_features/dynamic_graph/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ option = {
'width': 320,
'height': 240,
'crf': 23,
'preset': 'very fast'
'preset': 'veryfast'
}
}
reset_graph = bmf.graph()
Expand All @@ -88,4 +88,4 @@ main_graph. update(reset_graph)

### 回调方式:

有些应用场景需要在某些模块节点中决定什么时候去动态的增删和配置,这种情况可以用 BMF 的回调机制去配合实现,详见示例程序:test_dynamical_graph_cb()。
有些应用场景需要在某些模块节点中决定什么时候去动态的增删和配置,这种情况可以用 BMF 的回调机制去配合实现,详见示例程序:test_dynamical_graph_cb()。
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ BMF 也支持 FFmpeg GPU 编解码器。例如,您可以设置 `"hwaccel": "
bmf.graph()
.decode({'input_path': input_video_path})['video']
.scale(320, 240)
.encode(None,
.encode(None,
{
"output_path": output_path,
"format": "mjpeg",
Expand All @@ -123,9 +123,10 @@ BMF 也支持 FFmpeg GPU 编解码器。例如,您可以设置 `"hwaccel": "

input_path = "test.mp4"
output_path = "./stream_copy.mp4"

stream = bmf.graph().decode(
{ 'input_path': input_path,
{
'input_path': input_path,
'video_codec': "copy"
}
)
Expand Down Expand Up @@ -392,4 +393,4 @@ FFmpeg 命令行将根据 json 描述生成并运行:
ffmpeg -threads 8 -i test.mp4 -filter_complex "[0:v] scale=320:240[c_ffmpeg_filter_1_0]
" -map '[c_ffmpeg_filter_1_0]' -vcodec libx264 -pix_fmt yuv420p -crf 23 -preset veryfast -s 320x240 -map
0:a -acodec aac -b:a 128000 -ar 44100 -ac 2 -f mp4 ./output.mp4 -y
```
```
4 changes: 2 additions & 2 deletions content/zh/docs/bmf/overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ BMF 支持多种主流数据格式之间的零拷贝互转,极大地兼容了

NVIDIA GPU 拥有专用的视频编解码硬件。此外,它还具有高带宽内存和大规模并行计算 CUDA 内核,适用于通用视频和图像处理。BMF 与 NVIDIA 工程师合作,增强了对 NVIDIA GPU 的支持:
* NVENC/NVDEC/GPU filter 继承 FFmpeg 的能力,开箱即用。
* 通过集成 CV-CUDV 和定制 CUDA 内核实现高性能帧处理。
* 通过集成 CV-CUDA 和定制 CUDA 内核实现高性能帧处理。
* 使用 TensorRT 可以将 AI 推理轻松集成到视频 pipeline 中。
* CPU 和 GPU 之间的数据移动可以通过简单的调用实现。

简而言之,BMF 已经集成了 NVIDIA 中所有类型的视频和图像 SDK。因此,开发者可以使用 Python/GO/C++ 轻松编写 GPU 加速视频 pileline 并高效运行它们。

BMF 以开源的形式全面融入社区,持续扩展生态,展示各种解决方案,期望在超视频时代为行业内的开发者和企业提供更好的帮助。
BMF 以开源的形式全面融入社区,持续扩展生态,展示各种解决方案,期望在超视频时代为行业内的开发者和企业提供更好的帮助。

0 comments on commit d354d0e

Please sign in to comment.