Windows video support

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Windows video support

by Roody_Yogurt » Tue Mar 03, 2015 12:43 pm

Great news! So exciting having all of these new versions to test!

by RealNC » Tue Mar 03, 2015 12:17 pm

The previous version wasn't working with videos that had sound (most videos in FB don't have sound, but a few do).

This is now fixed. ESC also skips videos now:

http://83.212.107.13/~realnc/hugor/test ... eo-w32.zip

by Roody_Yogurt » Mon Mar 02, 2015 3:43 am

That sounds good to me! I'll send Kent this way to see if he has any other thoughts.

by RealNC » Mon Mar 02, 2015 3:21 am

OK then. From Hugor's perspective, actually any format is fine, with the aforementioned exception of segmented mp4 files.

However, I'm looking into using libVLC for video support on Windows (it seems to work much better for Windows compared to the current gstreamer backend.) At that point, you would be able to play any video in Hugor that you are able to play in VLC (which would cover 99% of what's out there.)

But what I'm worried about is "video support overkill." Having just a few good formats being officially supported is a good thing. Non-segmented MP4 and MKV (and the current AVI support) are a good set of container formats to support. But those are just container formats. More important is what goes *in* them. A good set of video and audio codecs that should be supported would be:

Video: ISO MPEG4 (for example H.264, DivX 4/5 and XviD)
Audio: MP3, AAC, AC3, DTS

I'd recommend these because they have native support in Windows/Mac, but are also well supported on Linux through gstreamer/ffmpeg/libvlc. (And who knows, someone could someday port Hugo to smartphones, and those codecs are also well supported there.) They are usually also first-class citizens in pretty much every video editor. So they're a good subset to support.

by Roody_Yogurt » Mon Mar 02, 2015 2:30 am

Well, to some extent, Hugor is becoming *the* official Hugo interpreter. Just last night, while discussing video behavior, Kent took a look at his old code, and there were all these bits for supporting old crazy platforms like Windows NT 4.0. I just don't think he'll have the time to update the official terps anytime soon, and if he did, it'd involve throwing out so much old code and a big overhaul.

It's nice you have his future development in mind, but really, I think Hugor is going to be the only game in town for a while (especially if people put videos in their games, as the official interpreter hangs horribly in video-using games in recent versions of Windows).

But yeah, both mkv and mp4 is cool, too.

by RealNC » Mon Mar 02, 2015 2:22 am

Well, there's no reason not to support both. mp4 is handled by most Windows versions already (important for Kent's interpreter; he wouldn't have to do much to add playback code for mp4).

So he'd only have to treat mkv in a special way (either by including a codec in the interpreter, or by requiring users to add such a codec on their own, or by specifying Windows 8.1 as the minimum requirement for mkv support.)

by Roody_Yogurt » Mon Mar 02, 2015 2:08 am

Yeah, I only discussed mp4 format with Hugo just because it's so widely used, but I'm sure mkv would be perfectly fine. Ok, mkv it is!

by RealNC » Mon Mar 02, 2015 2:05 am

RealNC wrote:If mp4 is preferred, it must be non-segmented, otherwise looping isn't gonna work (the video will just hang after playing once.)
Correction:

When I say looping, I mean seamless looping. Where the video is made in such a way that it seems continuous when looped. Hugor does seamless, frame-perfect looping where no pause is detectable at the loop point.

Normal looping, that is just stopping the video and starting it again would work just fine. But then, it would not be seamless. You'd see a pause between each loop. That would be the only way to do it with segmented mp4 files.

by RealNC » Mon Mar 02, 2015 1:58 am

Roody_Yogurt wrote:I also talked to him about how you had no problem getting .mp4 (and other formats) working in your initial video tests of Hugor, and he's completely agreeable to official .mp4 support.
Looping mp4 files is difficult when they are segmented. The gstreamer decoder is unable to loop such files, and there's no fix in sight.

The best container format to support is mkv (it's better than mp4 to begin with.) Even Microsoft added support in Windows 8.1 for it.

If mp4 is preferred, it must be non-segmented, otherwise looping isn't gonna work (the video will just hang after playing once.)

by Roody_Yogurt » Sun Mar 01, 2015 6:25 pm

My confusion in all of this is that I could easily imagine an instance where Kent would have run the video in the background and used a timed loop to check for the ESCAPE_KEY as the video ran, at which point he'd clear the video with 'video 0' (and for some reason the key press wasn't being read correctly in Hugor), but no, you're right that he actually just hardcoded skipping-by-ESCAPE into the interpreter.

I also talked to him about how you had no problem getting .mp4 (and other formats) working in your initial video tests of Hugor, and he's completely agreeable to official .mp4 support.

by Roody_Yogurt » Sun Mar 01, 2015 12:12 am

Kent has verified that, yes, that is handled terp-side! So, cool!

by Roody_Yogurt » Sat Feb 28, 2015 2:59 am

That sounded right, but looked it up in the Hugo Manual to be sure:
video [repeat] <resfile>, <res>[, <vol>, <bkground>]
So yeah, without a true <bkground> argument, it's supposed to wait until the video is finished before doing anything.

by RealNC » Sat Feb 28, 2015 2:52 am

Roody_Yogurt wrote:Interesting. I wouldn't have guessed that's on the interpreter side, either, but I suppose that makes some sense.
Just to make sure: when you "output" a video in hugo code and have it set to foreground mode, then effectively the game stops executing at that line until that call returns, right? There's no way for the game to scan a keycode in and abort the video when ESC is pressed.

by Roody_Yogurt » Sat Feb 28, 2015 2:32 am

RealNC wrote:Oh. I didn't even know that this was possible. I'll add that. Like some of the other things in Hugo, this too is interpreter controlled, not game controlled, so it wasn't obvious.
Interesting. I wouldn't have guessed that's on the interpreter side, either, but I suppose that makes some sense.

by RealNC » Sat Feb 28, 2015 2:24 am

Roody_Yogurt wrote:Out of curiosity, I tried it out with Steam's broadcasting functionality just to see if it worked at all. Interestingly, it *does* broadcast the videos (and nothing but). I'm sure that's not entirely unexpected.

I'm assuming it's completely not worth it to have an option to throw the entire window to some screen capturer/renderer that'd work with broadcasting software, but on the off chance there are efficient and somewhat simple ways to do that, I just thought I'd mention I think that'd be cool!
You mean only the video is captured? Hm, that makes sense, since Direct3D is used to render the video, while the rest is simple win32 GUI stuff like in other apps. I assume that most screen capture software is not able to capture GUI stuff unless you tell it to capture the entire desktop.

Rendering the entire game output to a D3D surface instead of just the video would most probably fix that. But I don't know how involved that would be. It's something to keep in mind though. Which I will.

I did run into my first issue. When things like FB's intro movies are being played, it's supposed to be possible to hit Escape to skip through them. Probably not a huge deal if that's not possible but would be nice.
Oh. I didn't even know that this was possible. I'll add that. Like some of the other things in Hugo, this too is interpreter controlled, not game controlled, so it wasn't obvious.

by Roody_Yogurt » Sat Feb 28, 2015 1:36 am

I did run into my first issue. When things like FB's intro movies are being played, it's supposed to be possible to hit Escape to skip through them. Probably not a huge deal if that's not possible but would be nice.

by Roody_Yogurt » Fri Feb 27, 2015 4:16 pm

Well, I've only opened it up so far, but I'm already impressed that it improves upon the official Hugo interpreter by now throwing up an annoying crash message when you close the game while a video is looping.

I've been meaning to replay through the entirety of Future Boy! for years. Hopefully this will be the right motivation for me.

Out of curiosity, I tried it out with Steam's broadcasting functionality just to see if it worked at all. Interestingly, it *does* broadcast the videos (and nothing but). I'm sure that's not entirely unexpected.

I'm assuming it's completely not worth it to have an option to throw the entire window to some screen capturer/renderer that'd work with broadcasting software, but on the off chance there are efficient and somewhat simple ways to do that, I just thought I'd mention I think that'd be cool!

by Ice Cream Jonsey » Fri Feb 27, 2015 10:54 am

Holy shit! Holy shit!!

Holy shit!

I do have Future Boy!. It occurs to me that I may only have it on CD, ha. I'm going to try to make trying this over the weekend a priority!

Windows video support

by RealNC » Fri Feb 27, 2015 10:34 am

I've ported the Linux video support to Windows. (Mac users are out of luck at this moment.)

It would be nice if others could test this to see if it works on anything else than my own PC:

http://83.212.107.13/~realnc/hugor/test ... -video.zip

I assume people here already have a copy of "Future Boy" to test this with?

Top