# 9.6 多媒体处理

FreeBSD 支持 Audacity（音频剪辑）、Olive/FFmpeg（视频与字幕处理）及 Inkscape（矢量图形处理）等工具。本节按类别给出安装与基本使用方法。

## 音频剪辑

Audacity 是一款开源跨平台音频编辑软件。

* Audacity 安装方法：

使用 pkg（二进制包管理器）安装：

```sh
# pkg install audacity
```

或者使用 Ports（源代码包管理器）编译安装：

```sh
# cd /usr/ports/audio/audacity/
# make install clean
```

## 视频剪辑

Olive 视频编辑器是一款开源的非线性视频编辑软件。

Olive 视频编辑器（Olive Video Editor）安装方法：

使用 pkg（二进制包管理器）安装：

```sh
# pkg install olive-video-editor
```

或者使用 Ports（源代码包管理器）编译安装：

```sh
# cd /usr/ports/multimedia/olive/
# make install clean
```

## 压制字幕

FFmpeg 是一款开源多媒体处理框架，可用于将字幕压制到视频中。

FFmpeg 安装方法：

使用 pkg（二进制包管理器）安装：

```sh
# pkg install ffmpeg
```

或者使用 Ports（源代码包管理器）编译安装：

```sh
# cd /usr/ports/multimedia/ffmpeg/
# make install clean
```

使用 FFmpeg 将 ASS（高级字幕，Advanced SubStation Alpha）格式字幕压制到视频中的示例命令：

```sh
$ ffmpeg -i 视频文件.mp4 -vf subtitles=对应字幕.ass 输出视频.mp4
```

其中，`-i` 指定输入视频文件，`-vf subtitles=` 应用字幕滤镜并指定字幕文件路径，最后为输出视频文件名。

## 抠图

Inkscape 是矢量制图程序，以下演示基本抠图操作。

### 安装 Inkscape

* 使用 pkg（二进制包管理器）安装：

```sh
# pkg install inkscape
```

* 或者使用 Ports 源代码编译安装：

```sh
# cd /usr/ports/graphics/inkscape/
# make install clean
```

### Inkscape 基本抠图操作步骤

1. 使用快捷键 `Ctrl` + `O`（字母 `o`）打开待处理的图片文件；
2. 用鼠标点击选中图片；
3. 使用快捷键 `Shift` + `F6` 切换到贝塞尔曲线和直线绘制模式；
4. 使用快捷键 `Ctrl` + `A` 全选相关对象；
5. 在菜单栏中选择 **路径** → **交集** 选项，以实现抠图效果。

### 参考文献

* Inkscape. Inkscape Tutorials\[EB/OL]. \[2026-03-25]. <https://inkscape.org/zh-hans/learn/tutorials/>. 提供 Inkscape 矢量绘图软件的详细中文教程，涵盖基础操作与高级功能。

## 艺术创作

本小节介绍艺术创作领域的相关工具，涵盖音乐创作、三维建模、数字绘画等。

### 音乐

#### 制谱软件 `MuseScore`

MuseScore 是一款开源的音乐制谱软件，支持乐谱创作、编辑和播放。

使用 pkg 安装：

```sh
# pkg install musescore
```

或者使用 Ports 安装：

```sh
# cd /usr/ports/audio/musescore/
# make install clean
```

![MuseScore 界面](/files/AXpbdFWeDYW9HsxHYR1F)

### 三维图像

#### 3D 建模 `Blender`

Blender 是一款开源的 3D 建模和动画制作软件，支持建模、渲染、动画等功能。

使用 pkg 安装：

```sh
# pkg install blender
```

或者使用 Ports 安装：

```sh
# cd /usr/ports/graphics/blender/
# make install clean
```

软件支持简体中文。如果无法直接显示简体中文，可先切换为繁体中文，再切换回简体中文。

![Blender 界面](/files/GXSyKFpwgBFHmHwe2CFx)

### 绘画

#### Krita

Krita 是一款开源的数字绘画软件，专为插画师和概念艺术家设计。

使用 pkg 安装：

```sh
# pkg install krita
```

或者使用 Ports 安装：

```sh
# cd /usr/ports/graphics/krita/
# make install clean
```

![Krita 界面](/files/0dSquGzvASbLkfIM15BJ)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/di-9-zhang-duo-mei-ti-he-wai-bu-she-bei/di-9.6-jie-duo-mei-ti-chu-li-gong-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
