-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding video with a code-first approach #200
Comments
@Doprez , do we have any example on this? I recall others trying it but not sure where it finished. Also some other references here: |
@VaclavElias am I correct in the assumption that Stride is not usable at the moment with Code First? I've tried another thing, with scene management. The issue boiled down to same; and the solution seemed possible; by swapping I do realize that my case is a bit against the grain, but a lot of elements of the engine seems intrinsically tied to one or the other implementation without the possibility to swap them :( |
I don't have a definite answer for you at the moment because I haven't gotten that far yet, and I mostly do white-boxing without any assets in Code First. When I implemented a skybox for Code First, it took me a while to figure out how to do it, but I managed. So, the answer might be:
The maintainers would consider any PRs that improve the Code First experience. Actually, Code First itself, including using F# and Visual Basic required some tiny engine updates. I believe Stride is usable with Code First for certain scenarios. |
Hey sorry, I missed the @ somehow. Unfortunately there arent any resources/examples for videos that I know of. If you are already at the point of trying to modify the I will also add this to the other checklist for code first examples here |
Hey,
I am unable to add video with the code-first approach. What I am trying to do is to load and use an arbitrary file during a runtime.
Please note, there are several issues with my code; all described below. Also, this is the first couple of hours with Stride; I am a dev by trade - just not in a game dev, and not in c#. The closest I've got is:
My reasoning:
VideoComponent
requiresVideoInstance
VideoInstance
is created fromVideo
attached to theVideoComponent
by theVideoProcessor
VideoProcessor
requires theVideoComponent
to be presentVideoInstance
requiresVideoComponent.Source.FileProvider
to contain theDataUrl
from aVideo
on aFileProvider
-> "Video files needs to be stored on the virtual file system in a non-compressed form."STRIDE_GRAPHICS_API_DIRECT3D11
and https://github.com/stride3d/stride/blob/master/sources/engine/Stride.Video/VideoInstance.Direct3D.cs I can avoidFFMpeg
requirement on the target computer.Video
is created by theVideoAssetCompiler
.Builder
instance alongsideVideoAssetCompiler
. It seems like neither are present within theGame.Services
. Builder was created according toStride
's own deprecated tests.VideoAssetCompiler
usesnew ContentManager(MicrothreadLocalDatabases.ProviderService)
; which does not seem to share the space withGame.Content
; so I have no access to the result withvar video = game.Content.Load<Video>(location);
in my code, as in - "file not found". Manual inspection of theGame.Content
's does also confirm this.VideoAssetCompiler
's ContentManager is hard-coded and can't be injected as a strategy.VideoAssetCompiler
on windows has a hard limitation - FFMpeg must be present either in the directory of the executable; or the../../Content
; even when my system has FFMpeg in thePATH
; it will not be cosidered due toToolLocator.LocateTool
if(!OperatingSystem.IsWindows())
.ToolWindow
behaviour is hard-coded and can't be injected as a strategy.What I am trying to achieve:
*.bik
format to play as a intro video.What are my "wishes"
The best situation for me would be to stream the video from the original format, using e.g. similar approach to https://github.com/nickdu088/Bink-Unity-Player/blob/main/Assets/Scripts/BinkPlayer.cs ; reusing
VideoInstance
logic to modify theVideoTexture
.I can accept copying the video to the
VirtualDisk
, but that adds unnecessary latency if I understand it correctly.I can also understand the need to convert to an uncompressed format, but then I should not have to rely on the
VideoConverter
that is intrinsically tied to theAsset
's. and FFMpege: So ideally,
The text was updated successfully, but these errors were encountered: