hpricot provides a nice dom traversal library for web scraping. When using hpricot to parse xml docs, I discovered that Hpricot automatically downcases xml nodes. XML files generated by Microsoft Excel generate nodes with capital letters.
example:
becomes:
doc:/workbook
kind of a small thing, that I’m documenting for myself.
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
Spent a little time working on the brand identity for MoveUp2One.
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