1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Unity】Androidの実機でVideoPlayerが正常に動かない問題

Last updated at Posted at 2022-02-26

現在バグフィックス中。対応はバージョン2022からで修正次第2021,2020,2019辺りでも対応予定とのこと。(2022年2月現在)
https://forum.unity.com/threads/playing-video-on-android-lag-stuttering.524329/ 参照

ーーーー
※23年1月現在対応済み
VideoPlayerのSkip On Dropにチェックを入れる
動画のCodecやクオリティー、Videoの場所は問わず

ーーーー

症状
Androidの実機で動画を再生すると1秒間に300ms秒分ずつぐらいしか進まない
音も飛び飛びで見るに堪えない

環境
unity 2020.3.22 (一部3.28と3.14含む)
端末Rakuten hand

試したこと(全てRender texture上に表示)
マルチスレッドレンダリング機能のオフ
オーディオ再生direct、Audio Source
再生中のGC停止

インクリメンタルGC
・Addresseble(アセットバンドル)
H264(インポートしたデータ、動画ファイル自体の解像度や品質の変更もしたが変化なし)
H265(Unity内の変換機能)
Vp8(Unity内の変換機能)
圧縮、非圧縮
品質Low、Mid、High(Unity内の機能)
音声のない動画と音声に分けて、VideoPlayerと同時に別のオーディオソースで音を再生

・StreamingAseets
pathでmp4を取得

まとめ
秋口から対処方法を探していてネット上で見かけた方法含めてビルドのたびにまめに試していたが、どれも変化がなかった
巻き戻すと2秒ぐらいスムーズに再生されるのでやりようはあるかもしれないが、ミドルウェアなり有料アセットなりを使った方がよさそう

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?