Video instead texture

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Video instead texture

Post by Chris »

Apeirogon wrote:You mean something like
[...]
No. Audio is a continuous stream (it's constantly playing in the background), and video is subject to frame timing (it doesn't display on the screen right when you call to draw it). The act of preparing more audio or video takes a variable amount of time, so to avoid choppy playback you'll want to have it ready ahead of time and set to automatically play/display at the end of the last segment (i.e. use a queue). Then by regularly checking each of the streams' relative position against the reference clock (using an average calculated over time, to help mask timer/timing errors), you subtly speed up or slow down playback to get back within some margin of error without the user noticing.

It's pretty complicated stuff to do right, especially on a protected-mode multi-threaded system where you're not able to touch hardware directly and are subject to the OS scheduler.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Video instead texture

Post by Apeirogon »

Chris wrote:
Apeirogon wrote:You mean something like
[...]
No. Audio is a continuous stream (it's constantly playing in the background), and video is subject to frame timing (it doesn't display on the screen right when you call to draw it). The act of preparing more audio or video takes a variable amount of time, so to avoid choppy playback you'll want to have it ready ahead of time and set to automatically play/display at the end of the last segment (i.e. use a queue). Then by regularly checking each of the streams' relative position against the reference clock (using an average calculated over time, to help mask timer/timing errors), you subtly speed up or slow down playback to get back within some margin of error without the user noticing.

It's pretty complicated stuff to do right, especially on a protected-mode multi-threaded system where you're not able to touch hardware directly and are subject to the OS scheduler.
TO HARD TO HARD!!!! MY DONT UNDARSTAND!!! You dont say me check what oscilations is curently...mmm oscilating in chosing audio channel, right!?
I start to think leave idea show intro video after loading engine.
User avatar
Rachael
Posts: 13558
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Video instead texture

Post by Rachael »

The best thing to do is to have scripted sequences where you use real objects as actors in the engine and make them do things based on cues.

Having a real video is not something I would advise. Even if you manage to get it working, you will never be able to get it working perfectly through all the limitations in the system.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Video instead texture

Post by Apeirogon »

If I could scripted this
https://youtu.be/RtAH7kGEqic?t=30s
I wont asking about video.
User avatar
Rachael
Posts: 13558
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Video instead texture

Post by Rachael »

Yeah, that's just a wee tad beyond the scope of GZDoom.

Look - there is just no way to 100% ensure that the audio and video sequence will stay in sync with the current GZDoom code state. I think you're SOL, unless you want to do a hack job which only works under 100% perfect conditions, which in practical situations will almost never happen.
Post Reply

Return to “Mapping”