Capture video without sound in Windows Store App - windows-store-apps

I want to write a Windows Store App that can capture video (without any sound) and take pictures. Imagine a digital camera: you can preview the picture on the screen of your device before pushing the button which takes the pic.
The problem I'm facing now is the fact that the Windows.Media.Capture namespace has only classes for objects that capture video with sound (CameraCaptureUI, MediaCapture). I'm not troubled by the objects' capabilities, but by the fact that I will have to include in the manifest of the app the Microphone capability and it does not make sense for the app to use it. I need a class that uses only the Webcam capability.
Any ideas?

I found the answer and I thought I should share it. I'm sorry for answering my own question, but here goes:
One can specify in the settings of the MediaCapture object, when initializing it, that it will use only the Video part:
var mediaCaptureMgr = new MediaCapture();
var captureSettings = new MediaCaptureInitializationSettings();
captureSettings.StreamingCaptureMode = StreamingCaptureMode.Video;
await mediaCaptureMgr.InitializeAsync(captureSettings);
RTFM!

Related

DotNetBrowser Video Capture isn't working

I am newly working with DotNetBrowser. wanted to record video using the webcam. is there any way to do that using Dotnetbrwser?
IMediaDevices mediaDevices = engine.MediaDevices;
IEnumerable<MediaDevice> videoDevices = mediaDevices.VideoCaptureDevices;
IEnumerable<MediaDevice> audioDevices = mediaDevices.AudioCaptureDevices;
browser = engine.CreateBrowser ();
In fact, DotNetBrowser does not perform video capturing directly. However, you can consider creating a web page that uses WebRTC MediaStream Recording API and displaying it in DotNetBrowser.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API
Here is an example of the web page that captures the video from the web camera:
https://webrtc.github.io/samples/src/content/getusermedia/record/
https://github.com/webrtc/samples/tree/gh-pages/src/content/getusermedia/record
In case of any further questions, feel free to contact us at customer-care#teamdev.com.

AS3: Recording sound as they are output/played

I understand how to record microphone input in AS3 from this doc.
Is it possible to record sound exactly as they are being output/played?
The reason is I applied some sound transform (via the global SoundMixer) to sounds that are currently playing; and I also want to record this sound data while it is being played.
I just saw this question, to clarify, I am not trying to record just all sounds on the user's computer (which is not possible). My flash app has a Youtube player in it (via their AS3 API), and it's playing some sounds. I applied transforms using SoundMixer.soundTransform, and I want to record what's being played when the user is playing it.
Thanks in advance.
Just a passing suggestion.. on my desktop it seems ABLE to record sound into Flash from a different tab playing Youtube (HTML5).. I don't know how it's doing that!!
I allow microphone here.. (none actually plugged in, and speaker out has in-ear headphones)
http://code.tutsplus.com/tutorials/create-a-useful-audio-recorder-app-in-actionscript-3--active-5836
PS: Anyone trying this must reduce Windows volume since anything above 10-20% is distorted audio into the Flash app.
And this HTML5 youtube trailer was recorded fine into the Wav file produced by Flash app above
http://www.youtube.com/watch?v=MVt32qoyhi0
So after a quick search it seems my Realtek Audio is classed as a Full-Duplex soundcard and also within its own control panel I have an option called "Multi-streaming" which is enabled/ticked. I think Full-Duplex is enough to do this though. Try options within your soundcard's own settings software. Don't know about your end-users. Some hardware will do it, some wont, there is no all-round solution outside of AIR (which makes desktop apps out of your AS3 code).

Rendering not working with MediaElement windows RT

I need to take thumbnail from Video playing with MediaElement
For this i learn there is RenderTargetBitmap in windows 8.1 API
RenderTargetBitmap a = new RenderTargetBitmap();
await a.RenderAsync(myMedia);
thumb.Source = a;
and second way i got with help of WinRTXamlToolkit.Composition toolkit which do rendring with WriteableBitmapRenderExtensions class
WriteableBitmap w = await WriteableBitmapRenderExtensions.Render(myMedia);
thumb.Source = w;
Both these methods are working with all UIElement but not with MediaElement
only black screen is visible when source this to Image object.
Can any one tell me why? and how can i take thumbnail from video?
It seems like the methods you mentioned might be limited in that regard. I'd still try RenderTargetBitmap but with something overlaid on top of the MediaElement. I believe if you place anything on top of a MediaElement, like a 0.01 opacity, 1x1 sized, black rectangle - it will switch to run in some different rendering mode where it is possible RenderTargetBitmap would be able to render it. Otherwise I think someone discussed here a while back a question of capturing a frame from a video stream. IIRC it is a pretty involved process though, involving using DirectX or Media Foundation and quite a bit of native code.

Accurate sound input in Actionscript?

I want to create a swf or air app that takes an input and displays a graphic representation of it.
The graphic side is fine for the moment, but its always using an mp3 for example
var sound:Sound = new Sound (new URLRequest("myMP3.mp3"));
- i want it to be able to take a 'live' audio feed. How would I do that and is there a better way than using the microphone input?
thanks
dai2
Microphone input is probably the easiest way and using flash player 10.1 or AIR 2.0 you can do this. Take a look at http://www.adobe.com/devnet/air/flex/articles/using_mic_api.html
It's not as easy as using SoundMixer.computeSpectrum but offers the possibility (+ more). You'll for instance most likely want to run the data through FFT to use in visualization

AS3 Camera selection

Has anyone build a AS3 Camera-Select-algorithm, ready to use?
With MacBooks you have the problem that the build-in webcam is not rightly choosen from the webplayer.
You have to select the USP-Cam by youself from the list
DV Video
IIDC FireWire Video
USB Video Class Video
by
camera = Camera.getCamera("2");
THNX!
I found kind of a workaround here
You cant actually set the camera programatically. The best you can do is prompt the user to set it next to a video panel to show them if the camera they've chosen actually works. example here: http://www.neave.com/webcam/
to prompt them to change cameras you use:
Security.showSettings(SecurityPanel.CAMERA)
there is no event to wait for, though you can poll your video panel's bitmap data for changes and prompt the user behind the security panel when you think they've chosen the right camera.
Having done battle with this problem, I would suggest that everyone use this library.
https://github.com/cataclysmicrewind/CameraDetection/
Flash + webcam should = easy + awesome.
Unfortunately, it is pain + suffering.