I’m trying to write some client software that can play .avi videos,
either in a window or full screen, as well as display photos. What is
the best way to do this in Ruby? A library that works across platforms
would be perfect, failing which, either Windows or Linux would do.
I’m trying to write some client software that can play .avi videos,
either in a window or full screen, as well as display photos. What is
the best way to do this in Ruby? A library that works across platforms
would be perfect, failing which, either Windows or Linux would do.
Thanks,
Arun
The simplest thing you could do if you are targeting Windows platforms
is look into the command line options for Windows Media Player and the
Microsoft Pain apps. I have done some scripting that opens up Windows
Media Player to play a selected media file and automatically close
when done. I don’t have code handy right now, but googling Microsoft’s
Knowledgebase should show you the proper command line options (http:// support.microsoft.com/KB/241422). Plus if you just pass the proper
graphic file to Microsoft Paint as a command line argument that should
achive something similar. Basically invoking Ruby’s system() method
will facilitate this. Of course you could try all of the win32ole
stuff, but this would seemingly complicate matters beyond what’s
needed. Just my $0.02 US…
The simplest thing you could do if you are targeting Windows platforms
is look into the command line options for Windows Media Player and the
Microsoft Pain apps. I have done some scripting that opens up Windows
Media Player to play a selected media file and automatically close
when done.
You could do something similar using mplayer, which would allow you to
target both windows and linux (and mplayer has lots and lots of command
line options available).
If you want to write your own mediaplayer then using the ruby/gstreamer
bindings is probably the easiest way, although that would be linux
specific.
I’m trying to write some client software that can play .avi videos,
either in a window or full screen, as well as display photos. What is
the best way to do this in Ruby? A library that works across platforms
would be perfect, failing which, either Windows or Linux would do.
Thanks,
Arun
You want cross platform?
You should use VLC player for the .avi files, nothing is more cross
platform than that. It’s a full blown app already with GUI hooks for
many platforms. Open source, so you can use it and abuse it.
Displaying photos? It can probably do that too.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.