MASM32 - Implementing video - windows

I want to add a video to my game in MASM32. I looked it up on the web, and got zero results. How do I add a video in MASM32 and display it out on screen?

Short answer... It can be done... but it's not going to be easy. You'll probably want to use ffdshow (very good compatibility with all popular video formats), then learn about COM (common-object-model) programming (in MASM32) first. Then read this post to try Yves's approach.

Related

How can I do what this app does? How is this technique called?

recently I saw an app in the playstore:
https://play.google.com/store/apps/details?id=com.donalddraws.app
(Not trying to make this political, I couldnt find another example)
Basically, you give an image of a given size to the app and the app will put the image inside the video, resizing and transforming the image automatically so it looks like it is part of the video.
So the programmer have to let the app know where the image should be placed and how it should be transformed.
Example video: https://www.youtube.com/watch?v=Zvf3yeZYUiI
I tried searching information, but couldnt find much, maybe I am not using the right terms.
It probably looks like a broad question, but I'm just looking for the name of the technique or a small introduction (preferably Python, but other languages would be fine too).
Thank you!

Processing – What is the fastest way to generate an animated .gif-file out of Processing 2?

i am not shure, if there are many Processing-people inside Stackoverflow, anyway:
What is the fastest way to generate an animated .gif-file out of Processing 2?
Thanks in advance!
You've got a couple of options:
Use the gifAnimation library
Save an image sequence from Processing, then encode a gif with an external tool (like ImageMagick,GIMP, Photoshop, etc.)
Also check out this answer for more details
George's answer is correct if you want to do this programatically, and it's what you should do if you care about gif quality.
Another quick and dirty alternative is to capture your screen directly.
I use a tool called ScreenToGif. You can record your sketch directly, without any exporting or encoding on your end.
Here is another question with a bunch of similar tools.

Video Mixing Renderer 9 quality issue

I have a fairly simple question. Or at least I thought I would be simple to solve but couldn't find any answers online.
Anyway
I used this example form MSDN to play a file using DirectShow:
How To Play a File.
It's really simple with only a few lines of code and it works.
Then after some research I managed to create a VMR9 filter and add it to the graph. This also worked.
There's just one thing
When I play a video file using the VMR9 filter the quality looks worse in VMR9.
I tried changing it with IVMRMixerControl9::SetMixingPrefs but nothings seems to change. IVMRMixerControl9::SetMixingPrefs does actually return S_OK.
dwPrefs &= ~MixerPref9_FilteringMask;
dwPrefs |= MixerPref9_BiLinearFiltering;
Or am I using the wrong filter?
edit: problem solved
I just did a comparison with Media Player Classic by putting it on VMR9 (windowed) mode. It gave me the same quality. So if I want better quality am gonna have to use EVR (enhanced video rendering) instead of VMR9 (Video Mixing Renderer 9).
VMR-7/VMR-9 quality issues are a long standing problem:
Poor Picture Quality with VMR9 as renderer
VMR9 scaling issues on Vista
EVR is suggested to be used instead, to get proper/nicer scaling and visual picture quality.
In Windows Vista and later, applications should use the EVR if the hardware supports it. Otherwise, fall back to the VMR-9 or VMR-7. The EVR offers better performance and better video quality than previous renderers. Also, it is designed to work with the Desktop Window Manager (DWM).
Better performance is questionable, and EVR is sadly having its own issues though, but when output quality is in question EVR is the answer.

Animation tools

I realize this is not strictly programming related, but hopefully you will let me get away with it.
My group is trying to put together a very short (2 minutes or so) "film" about a new feature to our product. The feature is trying to solve a particular problem a lot of our customers have. We do not want to go with live action for displaying the description of the problem we are trying to solve because we feel that the production value of anything we could come up with would be incredibly low and turn off our viewers. So we would like to make an animation (basically floating clip-art that is animated moving from place to place) while we have someone narrate the problem description.
While flash seems to be a good solution I have some problems with it:
I need to capture this in a movie format like avi
It needs to be captured in 1080p, 720p and regular TV def.
Does anyone have a suggestion for a piece of software that can get me where I need to go?
Free is good, but I think I could get my boss to lay down some scratch for this.
Thanks!
For just some basic here-is-the-screen-this-is-a-slide kinda thing you could use Windows MovieMaker, free and standard.
And here you have some tips on how to create your own screen-captured-AVI file for input.

what language/libraries an app that has a video preview window?

I want to make a simple assistant for putting together AviSynth scripts. This would be a windows desktop application that would have a "preview" screen of an avi movie, which would give you a timeline, play, fast-forward, rewind, advance and go back frame-by-frame. The program would need to know the frame number of the current frame in the player and its filename.
What language is best suited for this? I know PHP ( I understand that this is not a contender ) and am familiar with Java. My thought is that the biggest hurdle with this project will be finding a library for the video playing features. With a cursory glance, no Java video libraries jumped out at me. My next thought would be c++ for this.
The output of this program would be an AviSynth script, a plaintext file which looks like this:
AviSource("myAvi.avi")
Crop(0, 0, 320, 240)
Blur(0.1)
There are a few tool kits that can do tihs:
C#: DirectShow (DirectX)
Java: JMF
If you have Avisynth installed, the only thing you need for preview (If I understood, that's your need) is something that can decode uncompressed video. It would open like a normal file. I'm sure there are video players implemented fairly well in Java, but I don't know how much functionallity from them you need. Anyway parsing scripts is not easy - I recommend you not to try to if you don't need to.
EDIT: I'm sorry, I thought you needed a very specific app, but from what you seem to need, you don't need to code anything, use AVSP!
Please watch this video, it shows how straightforward it is. It has advanced functions such as auto-completion, (even from your own auto-loading scripts!) syntax coloring, macros, automtic importing, drag&drop (of a video, for instance - just drag it to the video and AVSP makes the loading) scrit preview with zoom and all stuff, you can use automatic or custom sliders (you can make a slider that re-writes a number on the script in real time, for instance for hue/luminosity/contrast/etc. that would be cumbersome to control via script), checkboxes & radio buttons (for boolean values, etc...), text fields that alter strings in real time, and basically anything you need... Please check it out.
Also, VirtualDubMod is OLD.
And yep, AVSP is free, both gratis and libre! =)

Resources