Closed danryu closed 11 years ago
Which version of ruby 1.9 did you tried? This is not an error but a compatibility issue with older ruby versions (before 1.9).
Hi! This is what my default interpreter is now:
dan@mango:/var/lib/gems/1.8/gems/airstream-0.3.4$ ruby -v ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
I'm running Ubuntu 12.04 x64, I thought the apt 1.9 ruby would be OK .... Any help in getting this running much appreciated ... kudos for the tool, by the way!
Hi dan!
did you try running: ruby /var/lib/gems/1.8/gems/airstream-0.3.4/bin/airstream
it seems your system is using ruby 1.8 anyway, 1.9 should be OK
Wow ... this is really getting complicated .... when did Ruby get so hard?
dan@mango:~$ ruby /var/lib/gems/1.8/gems/airstream-0.3.4/bin/airstream
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require': cannot load such file -- airstream (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
from /var/lib/gems/1.8/gems/airstream-0.3.4/bin/airstream:3:in '
thx - this error shows your ruby 1.9 has no gem airstream installed, i'm not that into ubuntus ruby version handling but i would recommend installing rbenv (on user-level) and ruby-build, you can do by:
sudo apt-get install zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev libavahi-compat-libdnssd-dev git clone git://github.com/sstephenson/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile echo 'eval "$(rbenv init -)"' >> ~/.profile $SHELL git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv install 1.9.3-p362 rbenv global 1.9.3-p362
echo "ruby version should be version 1.9.3-p362" ruby --version gem install airstream rbenv exec airstream --version
also see https://github.com/sstephenson/rbenv, http://www.stehem.net/2012/05/08/how-to-install-ruby-with-rbenv-on-ubuntu-12-04.html
I had no idea Ruby versioning was so sensitive. Anyway, I installed with rbenv as you suggested, and now it works.
airimg seems to work fine - I tried some pngs and jpegs. airstream makes a connection, as the AppleTV shows the grey spinning circle, and "loading...." is echoed in the terminal but eventually times out with "An error occurred loading this content" on the AppleTV. I've tried a range of mp4 files, including H264/AAC content, and the results are always as above.
netstat shows port 7000 listening while airstream is running, and there are no firewalls on the LAN. Curious!
From time to time I also recieved the "An error occurred..." message, but I couldn't figure the problem out yet. Anyway after hitting back to the atv menu and restarting the airstream command, it should work.
Have you tried any remote files? Try: rbenv exec airstream "http://techslides.com/demos/sample-videos/small.mp4"
No password protection was on the atv, I did check that .... I didn't get a chance to do a remote file test, and I'm gone from the device now .... Thanks for the tips. Good luck with any development you do on it!
I have this same problem, I can load the remote URL you referenced, even when downloaded as a local file, but not a larger local mp4 / h264 file. It feels like Apple TV times out receiving data for the larger local file, as the small.mp4 you referenced starts much slower when streamed as a local file.
I get no error, the airstream process seemingly tries forever after Apple TV has thrown an error. I installed first against Ubuntu's system ruby, but have now set up an rbenv with the version you specified and am running rbenv exec airstream.
UPDATE : If I expose large mp4 files via http on the local network via basic Apache2, they play great. In this case, does it simply pass a URL to the output instead of pushing bytes?
yup. I had the same issue as bitmonk. Set up a simple Apache server. But instead of feeding "localhost" to airstream, I had to use the IP on the local network, http://192.168.2.... and it worked like a champ.
I wanted to check out how well this worked - looks promising - but I just got this back. Tried with both ruby 1.8 and 1.9 as default interpreters.
This is a fresh install, first run "out of the box".
dan@mango:/var/lib/gems/1.8/gems/airstream-0.3.4$ airstream --version /usr/local/bin/airstream:19:in `load': /var/lib/gems/1.8/gems/airstream-0.3.4/bin/airstream:6: odd number list for Hash (SyntaxError) reciever: '192.168.1.8', ^ /var/lib/gems/1.8/gems/airstream-0.3.4/bin/airstream:6: syntax error, unexpected ':', expecting '}' reciever: '192.168.1.8', ^ /var/lib/gems/1.8/gems/airstream-0.3.4/bin/airstream:6: syntax error, unexpected ',', expecting $end from /usr/local/bin/airstream:19