> ## 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.

# Xuất

> Render và tải xuống các bản xuất karaoke trên cloud hoặc trên máy cục bộ

Một bản xuất là một tạo phẩm đã được render tạo ra từ một dự án. Mặc định, các bản xuất chạy trên cloud. Truyền `--local` để render trên máy của bạn với pipeline Remotion cục bộ.

## `export create`

Render một bản xuất mới cho một dự án.

```bash theme={null}
youka export create <projectId> [options]
```

<ParamField path="projectId" type="string" required>
  Dự án cần xuất.
</ParamField>

### Options

| Option                  | Description                                              |
| ----------------------- | -------------------------------------------------------- |
| `--resolution <value>`  | `480p`, `720p`, `1080p`, hoặc `4k`                       |
| `--quality <value>`     | `low`, `medium`, hoặc `high`                             |
| `--speed <number>`      | Hệ số nhân tốc độ phát                                   |
| `--tone <number>`       | Hệ số nhân dịch chuyển cao độ                            |
| `--transparent`         | Render với nền trong suốt                                |
| `--preset <presetId>`   | Ghi đè preset cho bản xuất này                           |
| `--volume <stem=value>` | Đặt âm lượng stem theo loại. Có thể lặp lại              |
| `--local`               | Render cục bộ thay vì trên cloud                         |
| `--download`            | Chờ bản xuất hoàn tất và tải xuống                       |
| `--output <path>`       | Tệp hoặc thư mục đầu ra cho render cục bộ hoặc tải xuống |

### Âm lượng stem

Dùng `--volume <type>=<value>`. Các type hợp lệ là `original`, `vocals`, `instrumental`, và `backing_vocals`. Giá trị phải nằm trong khoảng `0` đến `1`.

### Render trên cloud

```bash theme={null}
youka export create $PROJECT_ID \
  --resolution 1080p \
  --quality high \
  --wait \
  --download \
  --output ./karaoke.mp4 \
  --json
```

### Render cục bộ

Render cục bộ chạy pipeline Remotion trên máy của bạn. Trước tiên hãy đảm bảo các phụ thuộc render đã được cài đặt:

```bash theme={null}
youka deps ensure --for render
```

Sau đó xuất với `--local`:

```bash theme={null}
youka export create $PROJECT_ID \
  --local \
  --resolution 1080p \
  --output ./karaoke.mp4 \
  --json
```

<Note>
  Render cục bộ ghi trực tiếp vào đường dẫn `--output`. Không truyền `--download`
  cùng với `--local`; CLI sẽ từ chối tổ hợp đó vì không có tạo phẩm trên cloud
  để tải xuống sau khi render cục bộ.
</Note>

## `export quote`

Báo giá số credits cần cho một bản xuất trên cloud mà không khởi chạy bản xuất.

```bash theme={null}
youka export quote <projectId> [options]
```

`export quote` chỉ báo giá cho các bản xuất trên cloud. Các bản xuất cục bộ chạy trên máy của bạn và
không sử dụng credits xuất trên cloud.

| Option                  | Description                                 |
| ----------------------- | ------------------------------------------- |
| `--resolution <value>`  | `480p`, `720p`, `1080p`, hoặc `4k`          |
| `--quality <value>`     | `low`, `medium`, hoặc `high`                |
| `--speed <number>`      | Hệ số nhân tốc độ phát                      |
| `--tone <number>`       | Hệ số nhân dịch chuyển cao độ               |
| `--transparent`         | Render với nền trong suốt                   |
| `--preset <presetId>`   | Ghi đè preset cho bản xuất này              |
| `--volume <stem=value>` | Đặt âm lượng stem theo loại. Có thể lặp lại |

Ví dụ:

```bash theme={null}
youka export quote $PROJECT_ID \
  --resolution 1080p \
  --quality high \
  --json
```

## `export list`

Liệt kê các bản xuất của một dự án.

```bash theme={null}
youka export list <projectId> [--page <n>] [--page-size <n>]
```

| Option        | Default | Description                     |
| ------------- | ------- | ------------------------------- |
| `--page`      | `1`     | Số trang.                       |
| `--page-size` | `100`   | Kích thước trang. Tối đa `100`. |

Ví dụ:

```bash theme={null}
youka export list $PROJECT_ID --page-size 50 --json
```

## `export show`

Lấy một bản xuất theo ID.

```bash theme={null}
youka export show <exportId>
youka export show <exportId> --json
```

## `export wait`

Thăm dò một bản xuất cho đến khi nó đạt trạng thái kết thúc.

```bash theme={null}
youka export wait <exportId> --json
```

## `export download`

Tải xuống một bản xuất hiện có theo ID.

```bash theme={null}
youka export download <exportId> [--output <file>]
```

Ví dụ:

```bash theme={null}
youka export download $EXPORT_ID \
  --output ./karaoke.mp4
```

## Tiếp theo

* [Projects](/vi/cli/projects) - tạo hoặc chờ các dự án trước khi xuất
* [Presets](/vi/cli/presets) - tái sử dụng cài đặt render cho nhiều bản xuất
* [Dependencies](/vi/cli/deps) - kiểm tra và cài đặt các phụ thuộc render cục bộ
