zeropointnine / leelib Goto Github PK
View Code? Open in Web Editor NEWOpen-source AS3 library, including Flv Encoder
Home Page: http://www.zeropointnine.com/blog
Open-source AS3 library, including Flv Encoder
Home Page: http://www.zeropointnine.com/blog
Hi there, I’ve tried your code but the video gets saved as a flv file in my documents folder but the problem i’m facing is that the video plays too fast, can you please help me out?
cam = Camera.getCamera();
cam.setMode(640, 480, 15);
vid = new Video(cam.width, cam.height);
vid.attachCamera(cam);
private function startRecording(e : MouseEvent) : void
{
this.addEventListener(flash.events.Event.ENTER_FRAME, enterFrame);
_baFlvEncoder = new ByteArrayFlvEncoder(stage.frameRate);
_baFlvEncoder.setVideoProperties(OUTPUT_WIDTH, OUTPUT_HEIGHT);
_baFlvEncoder.start();
bt.removeEventListener(MouseEvent.CLICK, startRecording);
}
public function enterFrame(evt:flash.events.Event):void
{
var bmpData:BitmapData = new BitmapData(OUTPUT_WIDTH, OUTPUT_HEIGHT, false, 0xFFFFFFFF);
bmpData.draw(vid);
_baFlvEncoder.addFrame(bmpData,null);
bmpData.dispose();
}
private function stopRecording(e : Event) : void
{
this.removeEventListener(flash.events.Event.ENTER_FRAME, enterFrame);
var fileRef:FileReference = new FileReference();
fileRef.save(_baFlvEncoder.byteArray, “test.flv”);
_baFlvEncoder.kill();
}
Hello ! Could you do an exemple "ready-to-go" , i'm a newbie in actionscript , but i'm really interested by your work ! 👍
Thank you
import leelib.util.MicRecorderUtil;
should be:
import leelib.util.flvEncoder.MicRecorderUtil;
Hi,
first of all, thanks for the great lib.
I wanted to use it on bigger resolution than 320x240, but if I capture the webcam, on the resolution of setter up to, like this:
Camera.drawToBitmapData(BitmapData);
the output video is speed up and no audio, just some noise on the end of the recording.
You tested on bigger resolution than 320x240?
What is the problem of this?
thanks for the help
When i call seek() on the encoded FLV, it freezes.
My Netstream playback plays using the following approach:
ns.play(null); ns.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN);
ns.appendBytes(bytes);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.