Unityでビデオプレーヤーを使用しているiOSデバイス用の4K 360ビデオプレーヤーを製作しようとしています。私はアプリケーションを構築してインストールするのに問題はありませんでしたが、フレームは落ち続けるので、私は本当に不安定なビデオを取得しています。 「Override for iPhone」と「Transcode」をチェックしてビデオをインポートし、コーデックをVP8に設定しました。ビデオはUnity Assetsフォルダにあります。品質設定は「非常に低い」と設定されています。私はvideoPlayer.Prepare()を使用してビデオをプリロードしていますが、MP4とOGVのビデオフォーマットを試しましたが、まだまだ問題のあるビデオを取得しています....Unity:iOSの4K 360ビデオVR
誰か知っていますか? iOSで4K 360の動画を再生するための最適な設定は何ですか?
private void Start()
{
LoadNewScene(firstDestination);
}
public void LoadNewScene(jumpPointData data)
{
DeleteAllJumpPoint();
ChangeVideoClip(data.destinationVideoClip);
SetRotation(data);
GenerateJumpPoints(data);
StartCoroutine(DisableFaderIfVideoStartPlaying());
}
private void ChangeVideoClip(VideoClip destination)
{
this.transform.GetComponent<VideoPlayer>().Stop();
this.transform.GetComponent<VideoPlayer>().clip = destination;
StartCoroutine(PlayIfLoaded());
}
private void SetRotation(jumpPointData data)
{
this.transform.rotation = Quaternion.Euler(-90, data.direction, 0);
}
public IEnumerator PlayIfLoaded(){
VideoPlayer mainVideoPlayer = this.GetComponent<VideoPlayer>();
while(!mainVideoPlayer.isPrepared){
Debug.Log("Prepareing");
yield return 0;
}
mainVideoPlayer.Play();
}
private IEnumerator DisableFaderIfVideoStartPlaying(){
VideoPlayer mainVideoPlayer = this.GetComponent<VideoPlayer>();
while (mainVideoPlayer.frame < mainVideoPlayer.frameRate * 1){
yield return 0;
}
faderSphere.GetComponent<faderControl>().faderEnabled = false;
yield break;
}