Get microphone input VB.NET - vb.net

How can I get the input volume of the microphone intro a progressbar?
I need to do this without an API if I can.
Thank You!

May I please direct your attention to this article, which shows you how to use the nAudio dll to get input sound, and even shows you how to output it to a progressbar. It is in C#, but should be very easy to convert.

Related

Media Foundation - Custom Media Source & Sensor Profile

I am writing an application for previewing, capturing and snapshotting camera input. To this end I am using Media Foundation for the input. One of the requirements is that this works with a Black Magic Intensive Pro 4K capture card, which behaves similar to a normal camera.
Media Foundation is unfortunately unable to create an IMFMediaSource object from this device. Some research lead me to believe that I could implement my own MediaSource.
Then I started looking at samples, and tried to unravel the documentation.
At that point I encountered some questions:
Does anyone know if what I am trying to do is possible?
A Windows example shows a basic implementation of a source, but uses IMFSensorProfile. What is a Sensor Profile, and what should I use it for? There is almost no documentation about this.
Can somebody explain how implementing a custom media source works in terms of: what actually happens on the inside? Am I simply creating my own format, or does it allow me to pull my own frames from the camera and process them myself? I tried following the msdn guide, but no luck so far.
Specifics:
Using WPF with C# but I can write C++ and use it in C#.
Rendering to screen uses Direct3D9.
The capture card specs can be found on their site (BlackMagic Intensity Pro 4K).
The specific problem that occurs is that I can acquire the IMFActivator for the device, but I am not able to activate it. On activation, an MF_E_INVALIDMEDIATYPE error occurs.
The IMFActivator can tell me that the device should output a UYVY format.
My last resort is using the DeckLinkAPI, but since I am working with several different types of cameras, I do not want to be stuck with another dependency.
Any pointers or help would be appreciated. Let me know if anything is unclear or needs more detail.

How can i detect that something is plugged in to the audio jack with vb.net

Is there a way to do this in vb.net? I've searched everywhere but cant find any answers. Any help would be appreciated.
You can use endpoint device events
http://msdn.microsoft.com/en-us/library/dd370810%28v=VS.85%29.aspx
Sample code is only in C# but you can use any of the many C# to VB.NET code conversion tools to figure it out.

Video Embedding On Visual Basic

Hey I was wondering if it is possible to embed videos into a Visual Basic program and how I should do it. I'm pretty certain it is possible since you can import files and read them, and even play audio media. Thanks in advance for any help
Thom
You can use the Windows Media Player API to do anything it can.
This will tell you how.
http://msdn.microsoft.com/en-us/library/dd562852(v=vs.85).aspx

Create wmv-file from code?

I have a project where the requirements is that a end user will select a template, enter some information and then my program should create a wmv movie file that has the information entered encoded in the movie.
So from my perspective I would like to have a framework that allows me to add graphics and text to a movie. Something like this:
movie.addframes(framecount, templateimage)
movie.frame(x).drawtext(x,y,text,font,size,color)
movie.frame(x).drawRectangle(rect,color,bordersize)
movie.frame(x).drawImage(rect,borderstyle,bordersize, image,sizemode)
movie.save(filename,filetype)
Does this exists?
I have searched and only found information about ffmpeg that doesn't seem to do what I want.
I don't need it to be real-time encoding.
I don't care if the framework/library is expensive.
If there are information of how to do this with for example DirectX or DirectShow and pointing to real working vb.net examples, then ill be happy too. ;) (Believe me, I have tried to search and haven't found anything.)
I have not found any good information about how to use Windows Media Encoder for this, but It seems like Windows Media Encoder is the way to go if doing it myself..
you can use DirectShow, check Samples\Capture\CapWMV here

How to create a movie file (avi) using a set of jpeg files in VB?

As part of test automation framework building, I need to record the activities done by the user in a video.
Since i could not find a way to record a video directly in vb, i opted to capture a sequence of screen shots (print screens) and then convert it to a streaming video.
Please suggest a way to do the same.
thanks,
pkrg
maybe you can just run another program behind your application.
there are several programs like that.
it is not a professional way but easy way to do this... because probably these programs have already optimized their algorithms...
making avi with jpegs:
there are such a programs that do this too...
again you can search for it..
You can automate Windows Media Encoder there are some samples for C# and VB.NET in the SDK
I would recommend you to use CamStudio to record user activities of your program. It is also open-source.
if you want to roll your own, then
http://support.microsoft.com/?kbid=161299
Shows several ways to call windows api, to caputure the screen or parts of. Still I think you will have problems with the mouse cursor though. After capturing the screen you will have to draw the cursor in the correct position.