update: 2017/03/05
reference:
1. Playing Videos in a Level | Unreal Engine
Unreal 版本: 4.13
A. 新增專案
1. 新增一個 Blank 的 Blueprint 專案
a. 下載 Unreal 提供的範例影片: Sample Video (檔名: SampleVideo.mp4)
b. 將影片放入 Movies 資料夾內: (以確保影片檔能正確被封裝)
B. 專案內容新增 "多媒體檔"
1. 點選 Content > Movies 資料夾:
Add New > Media > File Media Source
C. 專案內容新增 "媒體播放"
1. 點選 Content > Movies 資料夾:
Add New > Media > Media Player
Audio output SoundWave asset
Video output MediaTexture asset
> OK
檢查右下方的 Sound Wave 與 Video Texture 設定.
D. 新增一個 Static Mesh 來作為播放影片的地方
1. Place > Basic > Cube
> 利用 Translate (W), Rotation (E) and Scale (R), 來調整大小形狀與位置
並拖放到剛剛新增的 Static Mesh 上.
-----------------------------------------------------------------------------------------------
E. Level Blueprint
1. 開啟 Level Blueprint
並設定其 Media Source (在此為: myVideoFile)
-----------------------------------------------------------------------------------------------
F. 改變播放速率(目前只在 Mac 上有效)
1. 開啟 MyMediaPlayer, 取消勾選右下方的: Play on Open (不然不會改變播放率)
只有 Rate 為 1.0(影片的正常播放速率)才會有聲音, 太快或太慢都不會有聲音.
-----------------------------------------------------------------------------------------------
4. 正解: (UE 4.13 ~ UE 4.15)
Q: How to set Play Rate in Media Player on Windows?
It seems works only on Mac, not Windows.
A: The first thing you need to do is make sure that you call the Open Source Node
before the Set Rate Node. Secondly, there is a known issue with the Media Player
in UE4 where it doesn't like receiving multiple commands "simultaneously."
So you will need to add a Delay Node between the Open Source Node
and Set Rate Node. It might depend on the machine, but for me, the Delay
must be a minimum of 0.2 seconds for this to work.
a. Static Set Rate:
Level Blueprint:
Result:
Timeline:
Level Blueprint:
Result:
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。