RubyTube is a Ruby script for BeOS or Haiku that determines the actual URL of a YouTube Flash video from its access page, and passes it to vlc to play. The video is streamed, rather than having to be downloaded to your computer, and—unlike TubePositive—RubyTube doesn’t use another website to decode the page. At the moment, though, it can only understand YouTube pages, not other Flash sites.
With a full RubyTube setup and using NetPositive, you can simply drag a YouTube link from the browser onto a ‘drop window’ and have it play the video. With other browsers, such as WebPositive, you’ll have to copy and paste the link into the window, but otherwise processing is the same.
This package only has the RubyTube script itself (and this README). It will work under both BeOS R5 or later and Haiku. To use it, you obviously need to have both Ruby and vlc installed. You can get them from BeBits for BeOS, or for Haiku use installoptionalpackage.
It is also really intended to work with ‘Ycon’—a utility that lets you drop links dragged from NetPositive, or simply copied and pasted from other places, into its window and have their contents decoded and passed to RubyTube. If you don’t install this, RubyTube will still run from a Terminal, either with the page URL passed as a command-line argument or pasted in response to a prompt. You can get Ycon from BeBits at http://www.bebits.com/app/4566.
For maximum convenience, RubyTube is set up as a ‘Xicon’ script, so if you have Xicon installed you can just click on the RubyTube icon and have it start (with a Terminal window for messages). Without Xicon, the script can still be invoked as-is from the command-line, but you can’t just click on it to start because custom Xicon attributes interfere. Xicon is available from http://www.bebits.com/app/843 (there are separate BeOS and Haiku versions because of slight differences in directories).
Ruby and vlc should be installed somewhere in your shell search path— such as in /boot/common/bin for Haiku, or /boot/home/config/bin for Haiku or BeOS. This should be done automatically by whatever installation method you use.
Ycon should also be in the search path. There is no installation script for this—just move or copy it to a suitable place. The ‘bedrop.rb’ Ruby script in the Ycon package is needed by RubyTube, and should be moved to somewhere in the Ruby library hierarchy —for example /boot/common/lib/ruby/site_ruby in Haiku.
Xicon can be anywhere, but requires that you run the Install icon in the package before the system will see it.
RubyTube itself can also be anywhere, but you will probably want it handy, or with a handy link such as in the Apps-Menu folder.
If you have installed all the components as above, you can just start it like any other app. It will open both the Ycon window at top-left of the screen, and a Terminal window to display progress messages.
To play a YouTube video, drag (from NetPositive) or copy and paste (from other browsers) the relevant link into the Ycon window, and wait a few seconds for vlc to start. This can actually be quite a few seconds (while vlc starts and prebuffers some of the stream) so be patient. If something has gone wrong, you may be able to glean something from the output in the Terminal window. Even more information can be found in vlc’s own message window if you want to dig.
You may also see apparently irrelevant errors like “seek failed” that don’t actually cause problems. And vlc itself may occasionally crash because of the ‘miscompile’ problem that it reports; if it does, just try again (no need to restart RubyTube) and it will probably work.
You can drop another link into the window before the first has finished, but it won’t get processed until the playing vlc instance has been closed. I’ve found no way to tell it to quit automatically when done, so you will have to click vlc’s close gadget to proceed.
If you wish to run it without Xicon, you can open a Terminal and run it from there. The Terminal must either have the folder containing RubyTube as its current directory, or RubyTube must be in the shell search path. It will open the Ycon window as above, and progress messages will appear in the Terminal.
If you don’t have Ycon installed either, you will have to run it entirely from the command-line. You can either enter “RubyTube youtube-url”, or just enter “RubyTube”, and it will prompt you for URLs (which you can paste in).
RubyTube is copyrighted free software by Pete Goodeve and is released under the same licence as Ruby. See the Ruby licence at:
http://www.ruby-lang.org/en/LICENSE.txt
RubyTube may be freely copied in its entirety providing this notice, all source code, all documentation, and all other files are included.
RubyTube is Copyright© 2010 by Pete Goodeve