So, I’ve imported a video to Content/Movies folder as File Media Source (Drag & Drop) and then tried to create Media Player using it after playing it then saving it but it showed that it didn’t save when I closed the media player editor, the texture just returns from media texture to black exactly after closing the editor.
I’m just trying to make a Main Menu background using it :\
Checkout the attached screenshots for more details:
This was fixed in CL# 3172935. Will be in the Master branch soon - probably December 14th.
The fix is very simple. In /Engine/Plugins/Media/MediaPlayerEditor/Private/AssetTools/MediaPlayerActions.cpp, add two missing MarkPackageDirty calls. This will mark the assets dirty, so the Editor will remind you to save them on shutdown…
Near the bottom of FMediaPlayerActions::ExecuteCreateMediaSoundWave:
if (NewAsset != nullptr)
{
MediaPlayer->SetSoundWave(Cast<UMediaSoundWave>(NewAsset));
MediaPlayer->MarkPackageDirty();
ObjectsToSync.Add(NewAsset);
}
Near the bottom of FMediaPlayerActions::ExecuteCreateMediaTexture:
if (NewAsset != nullptr)
{
MediaPlayer->SetVideoTexture(Cast<UMediaTexture>(NewAsset));
MediaPlayer->MarkPackageDirty();
ObjectsToSync.Add(NewAsset);
}
Hello!
I’ve tried the fix you wrote to me in: 4.14/Engine/Plugins/Media/MediaPlayerEditor/Source/MediaPlayerEditor/Private/AssetTools/MediaPlayerActions.cpp, Added the 2 missing MarkPackageDirty calls correctly and still having trouble when saving the video as media texture, hmm… seems like the whole thing is not allowing any media files to save while closing/saving as output asset.
Oh, so the Media Player Editor is only for previewing the media. It will not store the previewed Media URL or Media Source in the Media Player. You will have to open the desired media in your Blueprint, i.e. on BeginPlay, when the user clicks some button in your game, or whenever is appropriate in your use case.
The exact same problem still persists for me… Anyone got a working solution?
If i close my whole project and re-open it, the Media Texture doesnt include my video anymore and i have to attach it over and over again…