Project

airvideo

0.04
No commit activity in last 3 years
No release in over 3 years
Communicate with an AirVideo server, even through a proxy: Retrieve the streaming URLs for your videos.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

AirVideo for Ruby¶ ↑

Have you ever thought to yourself: I have AirVideo running on my computer and I enjoy it so much that not only have I bought the iPhone and iPad apps, I’d also love to be able to watch my video on my laptop too?

Me too! So I reverse engineered their communication protocol and came up with this. It’s a little hacky (and it’s certainly not been tested outside of Mac OS X 10.6) but it will give you the Streamable and Playable URLs of the videos on your AirVideo server from Ruby.

Care & Share¶ ↑

I know you know this, but the guys at InMethod don’t charge for their server. Purchases of their iPhone and iPad apps are how they get rewarded for their (epic, as I’m sure you’ll agree) efforts.

Please, buy their apps if you haven’t already, and send them an email or a forum post saying how much you love their software. If you’re a member of InMethod, come to Nottingham in the UK - I’ll buy you a pint.

Usage¶ ↑

I’d like to be able to write a shiny GUI for all this, but alas, I am crap at the GUI. So as it stands you’ll need to do this:

my_vids = AirVideo::Client.new('me.dyndns.org',45631,'YOUR PASSWORD')
# => <AirVideo Connection: me.dyndns.org:45631>
my_vids.ls
# => [<Folder: TV Shows>, <Folder: Movies>, <Folder: Music Videos>]
my_vids.ls[2].cd

# Bear in mind that the AirVideo::Client instance keeps track of where you are, like a console.
my_vids.ls
# => [<Video: Star Guitar>, <Video: A Glorious Dawn>, <Video: Stylo (Featuring Mos Def & Bobby Womack)>]

sagan = my_vids.ls[1]
# => <Video: A Glorious Dawn>
# Now you can select a video and get the streaming URL
sagan.url
# => "http://me.dyndns.org:45631/path_to_your.m4v"

# You can also specify (basic, for now) details as to how you want that file live transcoded to you!
my_vids.max_width = 640
my_vids.max_height = 480
sagan.live_url
# => "http://me.dyndns.org:45631/path_to_your_live_converting_resized.m4v"

# On a mac you can do this, but I'm sure you handsome folk can figure out how to do something similar on other OSes.
`open -a "QuickTime Player" "#{sagan.url}"`

If you have the ENV variable set (to something like ‘myproxy.com:8080’) then everything will be piped through there too.