Screen Capture control - screen-capture

Is there any control (To use in a c# project) to record user activities and then encoding it to a video file?

as i understand a video file is a collection of static image frames. You can use this tool's api from http://www.vcskicks.com/ScreenShotTaker.zip, which essentially shows you the mechanism of capturing the screen. So what you may have to do is, automatically capture images in a loop according to a set frame rate and then export it to a video. I'm not sure of how to create a media stream, but you have the library to do the screen capture.

Related

Save picture of current screen to disk AS3

I want to add a button to my flash game (AS3) and on click it saves a picture of the current users whole screen and saves it to pictures/disk automatically, but I don't know how to do that, I know how to add the button to the UI and add a click event and all that, just need to know how to make it save a picture of the current screen to disk (doesn't have to be just the flash screen, can be the WHOLE screen of the users pc, either way works!)
I was on my way writing you the answer but I found this post have a better explaination: Is it possible to capture the screen and save the image in actionscript 3?
"Yes, it's possible.
Draw some display object to a BitmapData (the stage, for example) and crop it if neccesary (the second param of BitmapData::draw will help you out here).
Then, convert the raw pixel data to JPEG or PNG using some encoder. I'm sure up to this point, this is what those tutorials will explain you how to do.
Now, the third step is different but simple enough. Instead of sending the image data to a server side script, use a FileReference object. Since Flash Player 10, it has a method called save, that prompts the user to save a file locally.
Since this is a desktop app, you could also make it an AIR app. This will give more direct access to the file system and other features, in case you need them."

capture currently playing audio with HTML5?

Is there any way to capture the soundcard's currently playing audio with getUserMedia? As in, whatever audio is currently playing on the system. I'm pretty sure it can only access the microphone. I'm unaware if you are able to access the current soundcard output, without jacking the input to the output with something like soundflower.
The getUserMedia method is part of the html5 media-capture-streams specification, it will return the MediaStream object provided to it (by the user/browser). The wave output (or your default playback device) won't, or rather shouldn't, be available because it isn't a capture/input device. So, as you mentioned in your question, the way you could do this would be to use something like: 'soundflower' or 'virtual audio cables' to relay the output you wanted into a virtual input device and capture that instead.
W3 Specification: http://www.w3.org/TR/mediacapture-streams/
Alternative apps: http://alternativeto.net/software/soundflower/

Creating video with MediaCapture with differing Preview and Record streams

I'm trying to create a Windows Store application that allows the UI to be captured and overlaid on video coming from a web camera.
I'm using the MediaCapture class to manage the video capture process. I've created a MFT (based on the Grayscale sample) that allows me to accomplish this in a basic manner. This MFT has been added as an effect to the Record Stream of the MediaCapture class, and I'm able to create a video file with the UI overlaid on the camera video easily enough. (Easily is a relative term)
The problem that I've hit is that the overlay from the MFT is showing up in the preview stream, which is also being displayed on screen. So the UI is being displayed normally, and also in the video stream. This is a bad result, as I don't want the effect applied to the preview stream and don't want the user to see the UI in the video preview, only in the resulting recording.
Is there a way to make the MediaCapture class use the effect only on the record stream, and not the preview stream?
If there is not an easy way to do this, can this be implemented by creating a custom sink? The MediaCapture could record to the custom sink, and the custom sink would add the overlay and save to video?
With some cameras (USB webcams in particular), record/preview/photo all come from the same video stream. So applying an effect to one applies the effect to all. Whether video streams are identical or independent is given by MediaCapture.MediaCaptureSettings.VideoDeviceCharacteristic.
So in your case, using a custom sink seems the way to go. IMFSinkWriter can be used to encode frames after adding the overlay.
For reference, code snippet adding an effect to preview+record for any type of camera (effectively the opposite of what you are trying to do):
MediaCapture capture = ...;
await capture.AddEffectAsync(MediaStreamType.VideoPreview, "Extensions.MyEffect", null);
// If preview and record are different streams, also add the effect there
if ((capture.MediaCaptureSettings.VideoDeviceCharacteristic != VideoDeviceCharacteristic.AllStreamsIdentical) &&
(capture.MediaCaptureSettings.VideoDeviceCharacteristic != VideoDeviceCharacteristic.PreviewRecordStreamsIdentical))
{
await capture.AddEffectAsync(MediaStreamType.VideoRecord, "Extensions.MyEffect", null);
}

as3 air convert sequence of bitmaps to flv

It's posible convert an image sequence (jpg, png) to .flv (or .mp4 instead), using AS3/AIR?
I'm developing an app. This app must record video on an Android tablet.
As the "CameraUI" class doesn't permit to put images/design over the camera capture, and I need to overlay branded design,
I'm trying to save a sequence of bitmaps using this Starling extension (Using this extension I can overlay desing and it's manage a good performance).
My idea is take the generated image sequence, convert it to video, and then to delete the original bitmap files.
Any idea?
Thanks.
Yes this is possible. FLV is an open format. Easiest way is to create raw flv. Otherwise you need to search for the proper compression (there are libraries online).
For the first one, there are a few very old posts, but I think the idea is the same. Few can be found here:
http://www.zeropointnine.com/blog/simpleflvwriteras-as3-class-to-create-flvs/
http://www.joristimmerman.be/wordpress/2008/12/18/flvrecorder-record-to-flv-using-air/
Try to search for 'flv recorder'. There are few out, even with compression and audio.

How can I emulate live video streaming

I'm interested in uploading a series of files to my web server and directing viewers to page which will autoplay the videos from a specific point dependent on the current time. My intention is to create the illusion of a live stream or actual TV channel, where they are unable to control the playback, but will return to the same point if they refresh the page.
I'm having difficulty finding answers, since it's descriptively so close to an actual webcast.
Here's my thought process on a solution.
Use the JavaScript Date Object API to capture the current time
Include your video with preload set to true, and controls false
Then use onLoad() and setup your video in JS
$(video).get(0).currentTime = XX; //You need an algorithm based on the time & length of video
$(video).get(0).play();