Just created this open source video player styled like hulu. It’s adapted and rewritten code from: http://chrisbrimelow.com/blog/?p=15 . Some of the changes I made were pretty basic including separating the ui from some of the nitty gritty stuff that drives the video. There’s also file streaming capabilities built into the player.
To take advantage of streaming video, I’m running nginx with flv-streaming-module compiled into my install. Seems to work pretty well and handles tons of connections simultaneously.
Source code on github for this video project is located here: http://github.com/elguapo1611/opthumb-videoplayer/tree/master
When uploading a video to a site, there’s definitely use for keyframe images as previews. I was thinking about using the nginx streaming-flv module to feed up individual frames of a video, but I concluded that exporting the required frames as pngs or jpegs is way more practical. Once again, I’m using ffmpeg to grab individual frames from an flv and xport as pngs. Heres the code:
ffmpeg -i awards.flv -vcodec png -vframes 1 -ss 120 -an -f rawvideo -s 320×240 testoutput.png
Just tried filtering states using Actionscript 3′s new E4X xml schema. If you try filtering your xml nodes based on Attributes, you can run into issues if the attribute lists aren’t consistent among sibling nodes. By placing your code in try-catch statement to prevent any messyness. IE…..
try{
_xml.datapoints.data.(@state==”NY”);
}catch(e:Error){
trace(“error occured”);
}
Trying to load a bitmap crossdomain without the correct policy file. Because of this, I can’t access the bitmapData within the loaded document which makes scaling the photos look horrible. I’m going to try loading the ByteArray and translating it directly to a bitmap. However, I’m not sure if this gets around the crossdomain issue.
update:
So…. loading the bitmapData as a byteArray using the netStream class seems to work. I’m going to do a little load testing to see how fast this method is before proceeding. Here are some resources:
update:
Although at first glance the previous solution seemed to work, it looks like I am still unable to use bitmapData.draw() on the display object that’s created. I wrapped the some console logging around each step of the conversion process and it looks like everything goes to crap at: oBitmapData.draw(oSource, oMatrix) where oSource is the loaded file in a Loader class that I have forced a type convertion on. The struggle continues.