Copy link to clipboard
Copied
Dear all,
I noticed that AS3 is able to take a snapshot out from a webcam & save it as a .jpg but is AS3 capable of recording a video with a webcam and save it to a local disk/network server? any video format is fine with me as long it can be played with window media player...
-Zainu
Copy link to clipboard
Copied
http://www.joristimmerman.be/wordpress/2008/12/18/flvrecorder-record-to-flv-using-air/
Copy link to clipboard
Copied
Hi relaxatraja,
Thanks for the link.
I tested out their air application and look through their source code. Any video records which are more than 30seconds lags the computer and there is no sound recording (or maybe there is, because I dont have any mics connected to my system). Their method of saving the clip is taking up all of the RAM and it is unable to be viewed in window media player. I guess as3 isnt the best method to record a video clip and save it?
Copy link to clipboard
Copied
AS3 is good, but I hope to get better method than the method in the given link.
Copy link to clipboard
Copied
>_< yeah if that link is the only method for saving a video clip, I have no choice but to stop doing this video recording feature in my application. Hope there is a better way to record clips and save it without lagging the computer..
Thanks relaxatraja,
-Zainuu
Copy link to clipboard
Copied
There's a way now - you can capture sound too, from mic or dynamic Flash sounds or mix it all together. Also supports realtime encoding using threading. Also supports AIR for Windows/Mac, where the code is much faster because it's native. (Warning: shamelessly promoting my own lib - but there's a free version )
Copy link to clipboard
Copied
@_falcan0, I'm going to have a look at your stuff, but just curious - can you get better quality / resolution than when using FMS? It amazes me that on my win 8 laptop, using a Logitech C920, I can capture 1920x1080 video at 30 fps using the built in Windows Camera app. It's awesome... I cannot even come close to that resolution when using Flash and FMS on the same machine/camera. About the best I can do is nice quality H264 at maybe 800x450 - 24fps. And then I also have the problem that FMS doesn't like video and audio on the same stream or quality is terrible, so I have two files - video and audio that need to be combined into one...
Also - I see you have an ANE for AIR. I would love for someone to use the Canon camera API to allow recording from a DSLR instead of a webcam. I mentioned this earlier in a post because there is an ANE that wraps both Canon and Nikon API's, from Monday8am, but I've had no luck with it - it crashes a lot. Where I work, we do a ton of photobooth stuff and a major concern, as of late, is quality. So, I've been researching using a DSLR and have had little success.
Copy link to clipboard
Copied
Had a quick look - decent quality but too small resolution to be able to tell anything, and the audio was poor quality... At least from an initial glance the quality with FMS is much better.
Copy link to clipboard
Copied
Hi dmennenoh - did you check the web version only? Sorry didn't see your earlier post.
The video encoding quality is x2 smaller there on purpose to achieve quick encoding in web Flash Player. So when encoding 800x600, it encodes at 400x300. This scaling can be set to any value though. The web version is really agressive to keep realtime encoding in Flash possible. You've got to realize that there is an entire video encoder almost in AS3 (more precisely its AVM2 bytecode which is more optimized than normal AS3 but executed by the same virtual machine as other Flash scripts). Even simple jpeg encoders in AS3 had problems with speed and had to be rewritten to Alchemy...so imagine how video encoder does in terms of performing.
That's not the case of AIR extension though (which also my lib includes). The FlashyWrappers AIR extension is provided as ANE compiled into native code. So recording there is at full resolution(1:1) and much faster even.
Naturally FMS / Flash webcam solution (if you're looking for webcam recording only) would be better using normal Flash Players libs, because they are calling native code, like my ANE, so therefore they are faster and can afford to record at higher resolutions etc. The reason I created the Flash plugin wasn't to be better than FMS but provide a video encoder which can be used to do anything, not only recording webcam. For example to capture Flash stage if you need to capture workflow/animation/gameplay in Flash game or feed it custom bitmaps etc. You can't do that with Flash / FMS, or even in AIR.
As for the earlier question you asked about Canon camera API, not familiar with their API's, but sure, in theory it would be possible to create an ANE for that and send the images to Flash. Not sure why you're having crashes...if you're interested let me know at info@rainbowcreatures.com, I can take a look.
Copy link to clipboard
Copied
OH, OK then! That sounds great. I'll take a look at the ANE for sure. Will report back...
I may send you an email too, getting a DSLR to work instead of a webcam is a priority of mine.
Copy link to clipboard
Copied
If you doing this for a desktop app, the proper way to record video is to use Flash Media Server. You can use FMS on the web too, but you'lI need a server or pay for someone elses. Anyway, if for desktop, you can use the free developer edition of FMS 4.5 which allows up to 10 connections - which is likely 9 more than you will need.
You can then record either FLV or F4V (H264), in any length you want.