﻿StreamMix Display for Windows  1.1.1-beta.1  (BETA / ベータ版)
==============================================================

【日本語】

■ これは何?
iPad の StreamMix アプリから届いた映像を受け取り、Spout で VJ ソフト
(Resolume、MadMapper、TouchDesigner、OBS Studio〔Spout プラグイン〕など) へ渡す Windows 用アプリです。
この版はベータ版です。動作や画面は今後変わることがあります。
不具合を見つけたら、使った環境と症状を作者へ知らせてください。

■ 動作要件
- Windows 10 バージョン 1809 (ビルド 17763) 以降、64 ビット (x64)
  (動作確認は Windows 11 で行っています)
- Direct3D 11 に対応した GPU (ほぼすべての Windows 10 / 11 の PC が該当します)
  HEVC (H.265) のハードウェアデコードに対応した GPU なら GPU で復号します。
  対応していない場合は CPU で復号するため、負荷が高くなり、映像が
  間に合わないことがあります。Microsoft の「HEVC ビデオ拡張機能」は不要です。
- iPad の StreamMix アプリ (1.1.1 以降) と、同じネットワーク、または有線での直結
- VJ ソフトは Spout 2 に対応したもの

■ インストール (Setup.exe)
1. StreamMixDisplay-Win-1.1.1-beta.1-x64-Setup.exe をダブルクリックします。
   管理者権限は要りません。お使いのユーザーだけにインストールされます。
   インストール先:  %LOCALAPPDATA%\StreamMix.Display\
                    (例: C:\Users\<ユーザー名>\AppData\Local\StreamMix.Display\)
   インストールが終わると、スタートメニューに「StreamMix Display」ができます。
2. スタートメニューの「StreamMix Display」から起動します。
3. 初回は利用規約が表示されます。内容を確認して同意してください。

Setup.exe を使わず、展開するだけで使いたいとき (Portable 版):
  StreamMixDisplay-Win-1.1.1-beta.1-x64-Portable.zip を、短いパスのフォルダへ展開します
  (例: C:\StreamMix)。展開したフォルダの「StreamMix Display.exe」をダブルクリックします。
  ※ 展開先のパスが長すぎると (Windows の上限の 260 文字に近づくと)、ファイルを
    取り出せなかったり、起動できなかったりします。ダウンロード フォルダの中の
    長い名前のフォルダの奥深くなどは避けてください。

■ アンインストール
Windows の「設定」→「アプリ」→「インストールされているアプリ」(Windows 10 では
「アプリと機能」) で「StreamMix Display」を選び、「アンインストール」を押します。
Portable 版は、展開したフォルダを削除するだけです。

アンインストールしても、設定やログなどは消えません。次のフォルダに残ります。
  %LOCALAPPDATA%\StreamMixDisplay\
  (設定、利用規約への同意、ログ、iPad との接続に使う識別子、動画のキャッシュなど)
これらも消したいときは、このフォルダを手で削除してください。
なお、インストール先 (StreamMix.Display) とこのフォルダ (StreamMixDisplay) は
別のフォルダです。名前が似ているので、間違えないようにしてください。

■ 起動時に出る警告について
(1) SmartScreen の警告
    このベータ版にはコード署名がありません。そのため、Setup.exe を初めて
    起動するとき (Portable 版は、初めて起動するとき) に
    「Windows によって PC が保護されました」と表示されます。
    「詳細情報」を押し、現れた「実行」を押すと進めます。
    (ブラウザーのダウンロードで警告が出たときは、「保持する」を選んでください。)
(2) Windows セキュリティのファイアウォールの確認
    初回の起動時か、iPad が初めて接続したときに、Windows がネットワークへの
    アクセスの許可を求めます (iPad が接続したときは、その前にアプリが
    「ネットワークの許可について」の説明を 1 度だけ出します)。
    Setup.exe でインストールすると、アプリの場所
    (%LOCALAPPDATA%\StreamMix.Display\current\StreamMixDisplay.exe) は
    版が変わっても同じなので、この確認は最初の 1 回だけです。
    (Portable 版は、展開した場所ごとに確認が出ます。)
    - 「プライベート ネットワーク」は必ず許可してください。
    - iPad と有線 (USB-LAN アダプタなど) で直接つなぐ場合は、Windows が
      そのつなぎ先を「パブリック ネットワーク」とみなすことがあります。
      その場合は「パブリック ネットワーク」も許可してください。
    許可しないと、iPad が見つからないことがあります。また、iPad とは
    つながっていても動画が届かなくなります (「iPad から応答がありません」と
    表示されます)。
    あとから変えるときは、Windows セキュリティ → ファイアウォールと
    ネットワーク保護 → 「ファイアウォールによるアプリケーションの許可」で、
    StreamMixDisplay.exe の項目を確認してください。

■ iPad との接続
この受信機は、起動しただけでは接続しません。
1. iPad で StreamMix アプリを起動します (PC と同じネットワークにつなぎます)。
2. 受信機は起動すると自動で iPad を探します。見つからないときは、
   画面上部の「検索」を押すと、一覧を空にして探し直します。
3. 映像エリアに iPad が表示されます。接続したい iPad をクリックして選びます。
4. 接続されると、受信機の表示が接続中に変わります。
   iPad で映像を再生すると、受信機のプレビューに映ります。
うまくつながらないときは、ファイアウォールの許可 (上記) と、
PC と iPad が同じネットワークにいることを確認してください。

■ Spout の出力
- 既定の出力名は「StreamMix Display」です (設定で変えられます)。
  VJ ソフトの Spout 入力で、この名前を選んでください。
- Raw モードにすると、プレイヤー A / B が別々の出力になります。
  名前は「<出力名> A」と「<出力名> B」です (例: StreamMix Display A)。
  モードの切り替えは iPad 側の設定で行い、受信機に確認が出ます。

■ このベータ版でできること・できないこと
- できる: iPad の映像の受信と Spout 出力、iPad 内の動画の再生
- できる: iPad の検索窓からの動画検索 (YouTube などのインターネット上の動画)
  iPad はインターネットに直接つながりません。受信機がインターネット上の
  動画情報サーバー (Invidious) を使って検索・取得し、iPad へ渡します。
  この PC がインターネットにつながっている必要があります。
- できる: この PC のフォルダの動画を、iPad の検索窓から検索・再生
  受信機の設定「IPAD SEARCH」で「iPad の検索窓で探すもの」を
  「この PC のローカルファイル」にし、「フォルダを選ぶ…」でフォルダを選びます。
  サブフォルダを含む動画 (mp4 / m4v / mov) をファイル名で探し、
  iPad で選ぶとこの PC から配信します。
- できる: BPM の自動解析
  受信機が動画の BPM を解析して iPad へ送ります (iPad の BPM 表示とレートに
  使われます)。音声が無いなど、解析できなかったときは iPad で手動設定します。
- できる: この PC から iPad へ動画を送る (load_video)
  受信機の「iPad へ送る」にある「YouTube 検索」タブと「ローカルファイル」タブから、
  Player A / B へ送れます。
- 自動更新はありません。新しい版は https://tech.niaris.net/stream-mix/ で
  確認してください。新しい版の Setup.exe は、そのまま上から実行して入れ直せます
  (設定は引き継がれます)。

■ ログ
不具合の調査用に、動作の記録を次の場所に保存します。
  %LOCALAPPDATA%\StreamMixDisplay\
映像や、あなたの個人情報そのものは含みませんが、送るときは内容を確認してください。

■ ライセンス
- このアプリは FFmpeg (LGPL 3.0 以降) を、別ファイルの DLL
  (Native フォルダ内の avcodec-61.dll など 5 つ) として使っています。
- ライセンス全文と入手元は、同梱の Licenses フォルダにあります。
    Licenses\FFmpeg-NOTICE.txt  (ビルドの情報と、ソースの入手先)
    Licenses\FFmpeg-LGPL-3.0.txt
    Licenses\FFmpeg-GPL-3.0.txt (LGPL 3.0 が参照する GPL 3.0)
- Spout 出力には Spout 2 (BSD 2-Clause) を使っています。
  著作権表示と許諾文は Licenses\Spout-LICENSE.txt にあります。
- インストーラ (Setup.exe) と起動の仕組みには Velopack (MIT) を使っています。
  著作権表示と許諾文は Licenses\Velopack-LICENSE.txt にあります。
- FFmpeg は Fabrice Bellard の商標です。


【English】

■ What is this?
A Windows receiver for StreamMix (iPad). It receives the video sent from the
StreamMix iPad app and passes it to VJ software (Resolume, MadMapper,
TouchDesigner, OBS Studio with a Spout plugin, etc.) through Spout. This is a BETA release; behavior and screens may change.

■ Requirements
- Windows 10 version 1809 (build 17763) or later, 64-bit (x64).
  (Tested on Windows 11.)
- A Direct3D 11 GPU (practically every Windows 10 / 11 PC). If the GPU can
  decode HEVC (H.265) in hardware, the GPU is used; otherwise decoding runs on
  the CPU, which is much heavier and may not keep up. The Microsoft "HEVC Video
  Extensions" are not required.
- StreamMix on iPad (1.1.1 or later), on the same network or directly
  connected by a wired link.
- VJ software with Spout 2 support.

■ Installing (Setup.exe)
1. Double-click StreamMixDisplay-Win-1.1.1-beta.1-x64-Setup.exe. No administrator
   rights are needed; it installs for your user account only.
   Install location:  %LOCALAPPDATA%\StreamMix.Display\
                      (e.g. C:\Users\<you>\AppData\Local\StreamMix.Display\)
   A "StreamMix Display" shortcut is added to the Start menu.
2. Start "StreamMix Display" from the Start menu.
3. On first launch, read and accept the Terms of Service.

Portable version (no installer): extract
StreamMixDisplay-Win-1.1.1-beta.1-x64-Portable.zip into a folder with a short path
(for example C:\StreamMix) and double-click "StreamMix Display.exe" in it.
Avoid extracting it very deep inside folders such as Downloads\<long name>\...:
when the whole path gets close to the Windows limit of 260 characters, files
cannot be extracted or the app cannot start.

■ Uninstalling
Open Windows Settings -> Apps -> Installed apps (Windows 10: "Apps & features"),
select "StreamMix Display" and click Uninstall. For the Portable version, just
delete the folder you extracted.

Uninstalling does NOT remove your settings and logs. They stay in
  %LOCALAPPDATA%\StreamMixDisplay\
(settings, your acceptance of the Terms of Service, logs, the identifier used
to pair with the iPad, the video cache, etc.). Delete this folder by hand if
you want them gone too. Note that the install folder (StreamMix.Display) and this
data folder (StreamMixDisplay) are two different folders with similar names.

■ Warnings you will see
(1) SmartScreen: this beta is not code-signed, so Windows shows
    "Windows protected your PC" the first time you run Setup.exe (or, for the
    Portable version, the app). Click "More info", then "Run anyway".
    (If your browser warns about the download, choose "Keep".)
(2) Windows Firewall: on first launch, or the first time the iPad connects,
    Windows asks whether to allow network access (when the iPad connects, the
    app first shows its own explanation, "ネットワークの許可について", once).
    When installed with Setup.exe, the app's location
    (%LOCALAPPDATA%\StreamMix.Display\current\StreamMixDisplay.exe) stays the same
    across versions, so you are asked only once. (The Portable version asks
    for each folder it is extracted to.) Allow "Private networks". If you connect the iPad directly over
    a wired link, Windows may treat that link as a "Public network"; in that
    case also allow "Public networks". If you do not allow it, the receiver
    may not find the iPad, and even while connected the iPad does not get
    the video (the receiver shows "iPad から応答がありません").

■ Connecting to the iPad
The receiver does NOT connect automatically.
1. Start the StreamMix app on the iPad (on the same network as this PC).
2. The receiver starts looking for the iPad as soon as it launches. If it
   does not appear, click "検索" (Search) at the top of the receiver window
   to clear the list and look again.
3. Your iPad appears in the video area. Click it to connect.
4. Play a video on the iPad; it shows up in the receiver's preview.
If it does not connect, check the firewall permission above and that the PC
and the iPad are on the same network.

■ Spout output
- Default sender name: "StreamMix Display" (changeable in Settings). Select
  it in your VJ software's Spout input.
- In Raw mode, players A and B become separate senders:
  "<name> A" and "<name> B" (e.g. "StreamMix Display A").
  The mode is switched from the iPad; the receiver asks you to confirm.

■ What works in this beta
- Works: receiving the iPad's video and Spout output; playing videos stored
  on the iPad.
- Works: searching for videos (YouTube and other videos on the internet) from
  the iPad's search box. The iPad does not connect to the internet directly:
  the receiver searches and fetches them through internet video-information
  servers (Invidious) and hands them to the iPad. This PC needs an internet
  connection for that.
- Works: searching and playing videos in a folder on this PC from the iPad's
  search box. In the receiver's Settings, under "IPAD SEARCH", set the
  search source ("iPad の検索窓で探すもの") to "この PC のローカルファイル" and
  pick a folder with "フォルダを選ぶ…". Videos (mp4 / m4v / mov) in that
  folder and its subfolders are searched by file name, and the file you pick
  on the iPad is streamed from this PC.
- Works: automatic BPM analysis. The receiver analyses the BPM of videos and
  sends it to the iPad (used for the iPad's BPM display and rate). If it
  cannot be analysed (e.g. no audio), set it manually on the iPad.
- Works: sending videos from this PC to the iPad (load_video). In the
  receiver's "iPad へ送る" panel, use the "YouTube 検索" (YouTube search) tab
  or the "ローカルファイル" (local files) tab to send to Player A / B.
- There is no automatic update. Check https://tech.niaris.net/stream-mix/
  for new versions. To update, just run the new Setup.exe over the old
  install (your settings are kept).

■ Logs
Diagnostic logs are kept in %LOCALAPPDATA%\StreamMixDisplay\ . They do not
contain video, but please review them before sending them to anyone.

■ Licenses
- This app uses FFmpeg (LGPL 3.0 or later) as separate DLL files in the
  Native folder (avcodec-61.dll and four others), which you may replace with
  your own build of the same major versions.
- The license texts and where to get the source are in the Licenses folder:
    Licenses\FFmpeg-NOTICE.txt, FFmpeg-LGPL-3.0.txt, FFmpeg-GPL-3.0.txt
- Spout output uses Spout 2 (BSD 2-Clause); its notice is in
  Licenses\Spout-LICENSE.txt.
- The installer (Setup.exe) and launcher use Velopack (MIT); its notice is in
  Licenses\Velopack-LICENSE.txt.
- FFmpeg is a trademark of Fabrice Bellard.
