QUICK BREAKDOWN OF QUESTION:
I need to buffer a .FLV file to memory/array, saving each frame as BitmapData.
This way I can scroll through the video (forward and backward) without any lag.
I've got a problem here, and I'm stuck trying to figure it out..
In my application, I'm going to have an interactive video, which works like this:
When the app starts, a compressed .flv file is buffered and loaded into memory.
When it's loaded, the user can interact with the movie clip by clicking and dragging in the image.
The movie clip is a 360 degree render of an object, and the user will be able to rotate around it.
The buffered .flv is 2mb in size, and this is what the user sees when he's dragging/rotating in the image (to make it rotate smoothly). When the user releases the mouse button, the image will refresh with the corresponding image from the JPG folder (containing 360 pre-rendered images of the same animation, but in higher resolution).
- - -
I might not be the best person to explain my problem but I hope you guys will understand my problem.
A quick breakdown of what I need:
I've got a 360 degree render of an object (which makes a turn-table animation of the object) This is saved into two formats:
1x Compressed .FLV video for smooth rotation (using this low-res version when the user is rotating the view)
360x high-res .jpg images, one for each degree of the animation. This image is loaded whenever the user releases the mouse after rotating the view. That way, the user can rotate with ease, and still see the high-res version when he stops rotating.
- - -
Here is my current code that works, but this code buffers the FLV from the videoDisplay when it's drawn to the screen, which limits the BitmapData to captur ethe current resolution of the videoDisplay. If I scale my windows while buffering, the stored/buffered images will also be scaled, which leaves me with bitmaps stored with different resolutions in one array.
So I need to be able to store this flv to buffer/array before it's drawn on the screen, or at least be able to store the frames in it's original resolution (1280x720).
Does anyone have any good ideas? =D
Heres relevant parts of my code:
[Click the link for code]
Posting the code in this forum only made it into tables..
Sorry, lots of code here, but this should be all the relevant code you need to understand my problem
I really cant work out a sollution to this...
All I want is to be able to scrubb smoothly through a rendered movie consisting of 360 frames (this is a 360 degree render of an object, loopable).
When the user holds down the mouse button and moves, I want to scrub forwards/backwards the same frames as the mouse moves in pixels on the screen.
My example works, but it buffers the FLV while it's playing (after it's drawn and resized to fit the screen). I need to buffer it before it's resized...
How to do this? =)