> ## Documentation Index
> Fetch the complete documentation index at: https://docs.youka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Media

> Tải lên và quản lý hình ảnh, video, logo và clip intro/outro có thể tái sử dụng

Media là các tệp có thể tái sử dụng mà bạn có thể tham chiếu từ preset hoặc cài đặt dự án. Tải chúng lên một lần, sau đó áp dụng trên nhiều dự án và lần xuất khác nhau.

## `media add`

Tải một tệp cục bộ lên dưới dạng media có thể tái sử dụng.

```bash theme={null}
youka media add <file> --as <type>
```

<ParamField path="file" type="string" required>
  Đường dẫn cục bộ tới tệp bạn muốn tải lên.
</ParamField>

<ParamField path="--as" type="string" required>
  Một trong `image`, `video`, `logo`, `intro`, hoặc `outro`.
</ParamField>

### Types

| Type    | Description   |
| ------- | ------------- |
| `image` | Hình nền tĩnh |
| `video` | Video nền lặp |
| `logo`  | Logo lớp phủ  |
| `intro` | Clip intro    |
| `outro` | Clip outro    |

### Examples

<CodeGroup>
  ```bash image theme={null}
  youka media add ./background.png --as image --json
  ```

  ```bash intro theme={null}
  youka media add ./intro.mp4 --as intro --json
  ```
</CodeGroup>

## `media list`

Liệt kê media đã tải lên cho tài khoản đã xác thực.

```bash theme={null}
youka media list
youka media list --json
```

## `media show`

Lấy một mục media theo ID.

```bash theme={null}
youka media show <mediaId>
youka media show <mediaId> --json
```

## `media delete`

Xóa một mục media đã tải lên.

```bash theme={null}
youka media delete <mediaId> --json
```

<Warning>
  Việc xóa media không ghi lại các dự án hoặc lần xuất hiện có. Nó chỉ ngăn
  các lần render trong tương lai tham chiếu tới media đó.
</Warning>

## Tiếp theo

* [Presets](/vi/cli/presets) - gói media vào các cài đặt render có thể tái sử dụng
* [Projects](/vi/cli/projects) - áp dụng media thông qua `project settings`
