Hi Monks!

I'm new here, so please forgive me if I posted this to the wrong section, or if I unknowingly violate some posting rule(s). Below is a writeup of some background information about what I want to acheive, and some specific questions on what technologies I should look at to design a smooth video player frontend in Perl. Feel free to skip the 'Background' chapter if you're psychic ;-)

Background

I have been using Perl on and off for, oh maybe 6-7 years; mostly for processing text, migrating between databases, web automation, bulk image/file processing, a little mod_perl, the occasional Tk GUI, even some Curses stuff. In short I use Perl to solve relatively simple day-to-day problems; I am - in no sense of the words - a professional programmer. Actually I create multimedia shows for a living - the kind with lots of high-end projectors, plasma screens, holographic audio, moving lights, smoke, lasers and other cool stuff that I enjoy.

So basically what I want to do is build a replacement for (a subset of the features of) a BeOS-based video playback unit that I own (but do not particularily enjoy): Roland Edirol PR-50. There are several reasons why I wish to take on this project:

All the hard parts are already done (ie windowing toolkit, video playback), and what I plan on doing is advancing my skills by gluing together existing components into a usable piece of equipment, this will include some video scaling hardware, audio converters, extenders, and other stuff in addition to the software I discuss here. It is a hobby project and not related to or sponsored by my employer in any way.

What I need - Final product vision

I need two programs that run on individual displays on the same computer; one being the control GUI, the other video output. The control GUI will allow user to import video files and organize them into an arbitrary number of palettes (9x9 matrixes of thumbnails representing video clips), and configure a few parameters for each clip like in/out time, audio volume, aspect ratio (depending on chosen back-end and how practical it is to implement). Once a video is placed on a palette, playback can be started instantly on the output display by left-clicking on its thumbnail. Right-click will load the media file and pause on frame 0. That's about all I need.

Edit: Sorry, just discovered the readmore tag. Applied.

What are my options?

  1. Socket interface to VideoLAN VLC via rc/telnet interfaces: While this could potentially be a neat, simple cross-platform solution, unfortunally it requires a lot of ugly hacks to complete. Resulting playback will not be on par with the Edirol since VLC is not frame accurate ('jerking' on start/pause etc); also it is very difficult to maintain accurate state information about the player. http interface unexplored, since the showstoppers are, eventually, not problems with the rc/telnet interface, but with the VLC core.
  2. Socket interface to Guliverkli's Media Player Classic via http remote control interface. Seems like a solid option, initial testing indicate this will work. It is Win32 only, though, and if I lock to a platform I would prefer Linux.
  3. Win32::MCI::MultiMedia; I have barely tested this to confirm that I can play a video on Win32. I have not acheived fullscreen playback nor tested on-the-fly capabilities. I'd rather use MPC if I go for Win32.
  4. Video::Xine; From what I can gather (without testing)*, it should be possible to run the GUI on one display and an X11::Fullscreen Video::Xine player on the other. Communications could be via IPC(?) or sockets.
  5. GStreamer; This seems to be a good option, though I must admit I need to research this library more. From what I can tell (without testing)* it is be possible to acheive video playback in fullscreen; so I can communicate with the player process via IPC/sockets here also.
  6. The POGL page on Wikipedia has a sentence mentioning that it's possible to map video frames to OpenGL textures via ffmpeg.
  7. Gtk2::Ex::MplayerEmbed seems (without testing)* obsolete and lacking support for vital options

* I am currently defragging in order to resize partition and install Linux to get started with this - it will take some time before I'm up and running, though, as I need to backup the system etc.

The Most Important Questions

  1. Did I miss something when it comes to Perl's video playback capabilities? Are there other options except those listed I should explore?
  2. I have not found any examples or people stating they actually use the POGL-ffmpeg magic; I don't need 3d transformations on video playback, but it would certainly be an interesting addition. Is it practical to acheive full-framerate video playback in this way? Comments?
  3. Will either of the options allow me to 'overlay' the contents of the video output as a live thumbnail preview in the GUI application? This question particularily relates to GStreamer and Video::Xine.
  4. Obviously if I remote control VLC/other player, sockets will be necessary. But using GStreamer or Video::Xine, is it necessary to do the IPC/Socket thing to communicate between two distinct GUI/player processes? Or is it possible to control two windows on two displays from one single application, started on one of said displays?
  5. I plan on using POE; Are there any particular Gotchas I should consider with POE+GStreamer, POE+Video::Xine, POE+IPC?
  6. I plan on using Tk::Zinc to create a smooth/fancy GUI; Are there any particular Gotchas I should consider with Zinc+(POE|GStreamer|Video::Xine|IPC|POGL)?
  7. Using Video::Xine, GStreamer (or the mythical POGL-ffmpeg binding); will any of these provide frame-accurate playback, i.e. allow me to seek to a specific video frame and pause there?
  8. Which of the options would you rate as the most reliable/mature for production work?
  9. Ideally it should also be possible to do "dual channel", i.e. a quad head setup with two independent control/output displays. Are any of the approaches particularily well or not-well suited for this?
  10. Any particular reasons why this is or is not a suitable task for Perl? ;-)

That sums up some of the questions on my mind, I thank you for reading, and in advance for your comments and suggestions. I will definetly post more specific in the SoPW section during the Linux experiments. Defrag done, on to the backups..

All the best! :-)


In reply to Creating a video player frontend in Perl - what are my options? by rocklee

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.