Make GZDoom play a production video when started? (MP4 file)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Make GZDoom play a production video when started? (MP4 file)
Hello. I was wondering if it would be possible to make a GZDoom mod play a MP4 video when my pk3 is launched. Its a production video. Would make it feel cinematic in a way. Would it also be possible to make it when any button or mouse click is pressed it skips it?
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Re: Make GZDoom play a production video when started? (MP4 f
Not at present. This had come up several times in the past, but has never been completely implemented due to a lack of interest by some of GZDoom's maintainers, and active opposition by others.
Re: Make GZDoom play a production video when started? (MP4 f
And opposition from me is quite fierce. I doubt I could actually stop the feature from being implemented if Graf really wanted it (not speaking for him, but he doesn't seem to be interested in it), but I would loudly voice my opinion against having it all the same.wildweasel wrote:and active opposition by others.
Re: Make GZDoom play a production video when started? (MP4 f
There was something like it sort-of in ZDoom many years ago but it was eventually taken out for the reasons alluded to in this thread (and the fact that it basically never worked properly anyway).
I think it's highly unlikely ever to appear as a feature (and I also agree that it's not a good feature to have - it just comes with too many problems). However, I did suggest a video-like feature a while back that already exists in a fork of GZDoom. There doesn't seem to be much interest there either but presumably the code already exists - but how good/portable it is, I have no idea.
viewtopic.php?f=15&t=63160
I think it's highly unlikely ever to appear as a feature (and I also agree that it's not a good feature to have - it just comes with too many problems). However, I did suggest a video-like feature a while back that already exists in a fork of GZDoom. There doesn't seem to be much interest there either but presumably the code already exists - but how good/portable it is, I have no idea.
viewtopic.php?f=15&t=63160
Re: Make GZDoom play a production video when started? (MP4 f
I have no strong feelings about the feature (I don't really care - in fact, in almost all commercial games I play, the first thing I do is look for a -nointro switch ;)) but I can somewhat see why videos would be better than, say, playing an overly-long ANIMDEF + audio, or fully scripting some animation in ACS... and that has to do with audio synchronization.
Depending on the user's hardware, it seems almost impossible to get a fully 1:1 sync between audio and visuals with the scripting tools in ZDoom. On really bad hardware, there is even noticable stuttering as the audio file is loaded into memory when played for the first time. This will create a disconnect between the audio and visuals, they'll no longer be in sync.
As has been discussed between me and dpJudas quite recently, there seems to be some jitter in ZDoom, and recent testing for a certain smooth weapons mod seems to confirm this jitter.
A pre-rendered video would at least ensure the picture and audio are completely in-sync. That's about the only benefit of having video player support in ZDoom I can think of.
Again, I'm not for or against. This feature is irrelevant to my modding needs. :P
Depending on the user's hardware, it seems almost impossible to get a fully 1:1 sync between audio and visuals with the scripting tools in ZDoom. On really bad hardware, there is even noticable stuttering as the audio file is loaded into memory when played for the first time. This will create a disconnect between the audio and visuals, they'll no longer be in sync.
As has been discussed between me and dpJudas quite recently, there seems to be some jitter in ZDoom, and recent testing for a certain smooth weapons mod seems to confirm this jitter.
A pre-rendered video would at least ensure the picture and audio are completely in-sync. That's about the only benefit of having video player support in ZDoom I can think of.
Again, I'm not for or against. This feature is irrelevant to my modding needs. :P
Last edited by Nash on Sat Jul 20, 2019 4:47 am, edited 1 time in total.
- StroggVorbis
- Posts: 866
- Joined: Wed Nov 08, 2017 4:23 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Make GZDoom play a production video when started? (MP4 f
@Nash
I think one of the reasons for the above mentioned problem is Doom's 35Hz tic rate. Since there are no half tics unlike ECWolf, you can't have something play exactly half a second (17.5 tics), either 17 or 18. The closest you could go without remainder would be 7 tics or 1/5th of a second. If the rate was just one tic higher, you could have half and quarter seconds.
I think one of the reasons for the above mentioned problem is Doom's 35Hz tic rate. Since there are no half tics unlike ECWolf, you can't have something play exactly half a second (17.5 tics), either 17 or 18. The closest you could go without remainder would be 7 tics or 1/5th of a second. If the rate was just one tic higher, you could have half and quarter seconds.
Re: Make GZDoom play a production video when started? (MP4 f
Sometimes I'd get mini-stutter as the audio file is loaded into memory to be played for the first time, so there's also that. That is enough to desynchronize what you see on-screen VS what you hear.
- 22alpha22
- Posts: 308
- Joined: Fri Feb 21, 2014 5:04 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Montana, USA
Re: Make GZDoom play a production video when started? (MP4 f
I was once tried experimenting with videos through single frames animated through ANIMDEFS. I could get it looking reasonably good and the audio sync wasn't terribly hard but just a 30 second video added 30 megs to my project's size which for a single 30 sec video was completely unacceptable. Converted into the bink format, I could reduce the filesize to 6 megs or less audio included. I considered learning C or a variant so I could add bink video playback to my own build of GZDoom, but when I considered licensing costs for distributing bink, that plan kinda went kaput.
Re: Make GZDoom play a production video when started? (MP4 f
You're touching on one of the other main obstacles to introducing video playback there too: which codecs?, must be license compatible, work on all platforms...22alpha22 wrote:when I considered licensing costs for distributing bink, that plan kinda went kaput.
Re: Make GZDoom play a production video when started? (MP4 f
This problem is even worse than that. There's about 200 million different codecs, and once you introduce one, someone will want their favourite codec introduced for "convenience purposes"... then someone else will see that codec was included, so they'll want their convenient codec... 1 becomes 2... 2 becomes 10... 10 becomes 100... 100 quickly becomes 500... next thing you know GZDoom's distribution size is 200 megs. All for what? A feature that some people (like me) absolutely despise when they see it in other games anyhow? One that will see very little use no matter what?Enjay wrote:You're touching on one of the other main obstacles to introducing video playback there too: which codecs?, must be license compatible, work on all platforms...
Totally not worth it. Slippery slope problem is real here. Fuck dat shit - simple as that.
Also, distribution bloat of GZDoom due to a pointless feature like this is a great way to ensure that the archive gets removed, too. No fucking way I am putting that crap on the server with as limited space as it has.
- Chris
- Posts: 2969
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Make GZDoom play a production video when started? (MP4 f
To clarify, the most typically used decoder libs are from FFmpeg (libavcodec, libavformat, etc), which handle almost any audio and video format under the sun. As of this writing, the total size for all its shared libs is about 25 to 30MB (which could be shrunk down some if you static link and/or disable the really obscure formats). Currently, GZDoom's download size is roughly 10MB, so even in a really good case, you can expect that to be doubled.
On top of GZDoom itself, mods that make use of video can expect to see a large explosion in size. ~3 minutes of 720p 30fps webm (VP9) video is at least 17MB (more if you want cleaner quality than this file I have on hand). ~2 minutes of 1080p 30fps mp4 is about 53MB. Just for the video file. For comparison, KDiZD 1.2 is about 24MB, so a mega-mod like that would easily get doubled for a relatively small amount of video. A smaller-in-scope mod would be even worse.
I do recall there being a bit more discussion regarding a relatively simple format (ROQ or something?) intended for really short clips that could be added with little code bloat. I'm not sure where that discussion ended up. But I remember the general consensus being that you really should try to script any such sequence in real-time (using moving cameras, actor pawns, sound triggers, etc, like TITLEMAPs are usually done) instead of using prerendered video. That's not only much smaller in size, it also doesn't get locked to a fixed frame rate or screen size, and the visual and audio fidelity better matches what the player gets in-game.
On top of GZDoom itself, mods that make use of video can expect to see a large explosion in size. ~3 minutes of 720p 30fps webm (VP9) video is at least 17MB (more if you want cleaner quality than this file I have on hand). ~2 minutes of 1080p 30fps mp4 is about 53MB. Just for the video file. For comparison, KDiZD 1.2 is about 24MB, so a mega-mod like that would easily get doubled for a relatively small amount of video. A smaller-in-scope mod would be even worse.
I do recall there being a bit more discussion regarding a relatively simple format (ROQ or something?) intended for really short clips that could be added with little code bloat. I'm not sure where that discussion ended up. But I remember the general consensus being that you really should try to script any such sequence in real-time (using moving cameras, actor pawns, sound triggers, etc, like TITLEMAPs are usually done) instead of using prerendered video. That's not only much smaller in size, it also doesn't get locked to a fixed frame rate or screen size, and the visual and audio fidelity better matches what the player gets in-game.
Re: Make GZDoom play a production video when started? (MP4 f
This is the real deal killer, right here. The problems I listed above were miniscule compared to this.Chris wrote: On top of GZDoom itself, mods that make use of video can expect to see a large explosion in size. ~3 minutes of 720p 30fps webm (VP9) video is at least 17MB (more if you want cleaner quality than this file I have on hand). ~2 minutes of 1080p 30fps mp4 is about 53MB. Just for the video file. For comparison, KDiZD 1.2 is about 24MB, so a mega-mod like that would easily get doubled for a relatively small amount of video. A smaller-in-scope mod would be even worse.
I don't want to download a 200 mb wad that turns out to be a long ass video with a short barely interesting map and then another long ass video after that.
It's bad enough that digital waveform music (ie mp3/ogg) takes as much space as it does - but the trade-off is you get to enjoy it while your hands are on the keyboard and actually doing something...
If I wanted to watch videos on my computer, there's Youtube and Netflix for that. (And - if you're clever - you'll make good use of Youtube to promote your mod and show those pre-rendered storylines!)
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Make GZDoom play a production video when started? (MP4 f
And let's better not consider the patent minefield in that area...
Regarding file size, I could imagine that /idgames would implement a rule saying "no videos" to keep file sizes down to something reasonable.
Regarding file size, I could imagine that /idgames would implement a rule saying "no videos" to keep file sizes down to something reasonable.
Re: Make GZDoom play a production video when started? (MP4 f
Most of a game which avoid/dont want/etc using videos, using pictures with applied to it scale/roll/shader/etc. for replacing it.
Max payne for example use comics like "video" screens
https://www.youtube.com/watch?v=xmvaWRXj8ns
Or bunch of pictures which are juggles before player screen
https://www.youtube.com/watch?v=gpqtoLyNG-E
Not sure about this one...
Max payne for example use comics like "video" screens
https://www.youtube.com/watch?v=xmvaWRXj8ns
Or bunch of pictures which are juggles before player screen
https://www.youtube.com/watch?v=gpqtoLyNG-E
Not sure about this one...
Re: Make GZDoom play a production video when started? (MP4 f
Heh, I wonder how many people even realise that Strife has it's own little intro video?
The full version of Chex Quest has quite a lengthy intro, and an outro IIRC.
Not saying these should be supported, just remembering they exist.
The full version of Chex Quest has quite a lengthy intro, and an outro IIRC.
Not saying these should be supported, just remembering they exist.