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
This terminal command will remove any files with a file extension of .svn. This is a nice way to clean up repos.
find . -name ‘.svn’ | xargs rm -rf
Spent a little time working on the brand identity for MoveUp2One.
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
One of my friends just passed along an interesting tool called Snap and Drag: http://www.yellowmug.com/snapndrag/ . Some of it’s keyfeatures include taking screen shots off of dvds playing in iDVD. Extremely handy.
Decided to write a simple script for exporting all my video content to streaming .flvs:
in batchconvert.rb
path = “.”
#contains = Dir.new(basedir).entries
videos = Dir["#{path}/*.mov"]
videos.each do |f|
puts “converting #{f}”
newFile = f.gsub(“.mov”, “.flv”)
system(“ffmpeg -i #{f} -ar 22050 -s 640×480 -b 500000 #{newFile}”)
system(“flvtool2 -U #{newFile}”)
end
To run this command, open up the Terminal and navigate to your video directory. Then run:
ruby batchconvert.rb
This script doesn’t include any switches or options for files other than .movs.
Files: batchconvert
Every flash developer has used the Flash IDE to debug and test his/her application. Simple test the movie and you get a quick preview of your application. However, the player in the flash IDE isn’t a standard player. Here’s a list of things that will surely grow as my testing continues: