# OBS と連携する

<figure><img src="/files/FpvPSx0IkqxEgdyPY8vn" alt=""><figcaption></figcaption></figure>

## VCam OBS Pluginを使う (おすすめ)

この方法は他の方法に比べて負荷を軽減できます。

{% hint style="info" %}
このプラグインを利用するためには、仮想カメラが有効になっている必要があります。まだ有効にしていない場合は、[仮想カメラを有効にする](https://docs.vcamapp.com/virtual-camera/virtualcamera)をご覧ください。
{% endhint %}

### インストール

下記から最新版の .pkg ファイルをダウンロードし、ファイルを開いてインストールします。\
インストール後、OBS Studioは再起動してください。

{% embed url="<https://github.com/vcamapp/obs-plugin/releases>" %}

### 使い方

1. OBS Studioのソースの「+ボタン」をクリックし、「VCam」を選択して、ソースに追加します。
2. VCamアプリを開きます。
3. OBS StudioにVCamの映像が映ります。

### クロマキー無しで背景を透明にする

VCamの背景選択から背景色を選択します。

<figure><img src="/files/NPh9894qdFqpGblUOufG" alt="" width="143"><figcaption></figcaption></figure>

そして、不透明度を0%にすると、OBS上の背景が透明になります。

<figure><img src="/files/JLpAEk727eKje5ZQBTLX" alt="" width="120"><figcaption></figcaption></figure>

## 映像デバイスとしてVCamを利用する

1. ソースの追加ボタンから「映像キャプチャデバイス」を選択し、新規作成します。

<figure><img src="https://user-images.githubusercontent.com/8188636/154320879-44aa4caa-bd56-4775-9529-d54b9afc3c0c.png" alt="" width="375"><figcaption></figcaption></figure>

2. デバイスから「VCam - CameraExtension \[数字]」または「VCam」を選択します。

<figure><img src="https://user-images.githubusercontent.com/8188636/154321293-4dff954a-b815-44b9-9d9e-d1ea65aea34d.png" alt="" width="375"><figcaption></figcaption></figure>

※この時に事前にVCamを開いていれば、プレビューが表示されます。選択後にVCamを起動した場合は、デバイスのリストから別のデバイスを選んだ後にVCamを選び直すことでプレビューできます。

3. ソースをCtrl+クリックし、メニューから「フィルタ」を選択します。

![image](https://user-images.githubusercontent.com/8188636/154321674-cdf851d8-e375-4193-9481-f8f55ce91b64.png)

4. エフェクトフィルタの追加ボタンをクリックし、「クロマキー」を選択します。

![image](https://user-images.githubusercontent.com/8188636/154321774-076ca337-bb98-4911-bb56-359b3c07ee54.png)

5. VCam側の背景色に合わせて、色キーを設定すると背景色を消すことができます。

![image](https://user-images.githubusercontent.com/8188636/154322044-acf1ea4a-37b7-4b88-ae27-bcaa61a405e8.png)

6. (ウィンドウサイズによって余白が出ている場合は) エフェクトフィルタに「クロップ/パッド」を追加することで黒帯などを消すことができます。

![image](https://user-images.githubusercontent.com/8188636/154323204-aa42c68c-3749-49b5-9902-00c2346e953b.png)

これで自由自在にアバターとゲームの映像などを合成できるようになりました。\
VCamはアプリを最小化していても多くの機能は動作をするため、操作ウィンドウが不要な方は最小化してみてください。


---

# 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://docs.vcamapp.com/integration/obs.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.
