Video input for IDL on Macs [message #80547] |
Mon, 18 June 2012 06:44  |
David Grier
Messages: 35 Registered: July 2010
|
Member |
|
|
Dear Folks,
I've been working on an IDL object that reads images frame-by-frame from
video files. This complements IDL's capabilities for video output, and
(greatly) extends the video input capabilities of the IDLffMJPEG2000
object to work with any video source rather than just mjpeg files.
My object works flawlessly on linux systems, but is giving me trouble
under MacOS. The object's source code is freely available at
http://physics.nyu.edu/grierlab/software/dgggrmplayer__defin e.pro
I'm hoping that an interested colleague might help me get this up
and running on MacOS as well. Here's the idea:
1. Use SPAWN to open the video source with mencoder,
the open-source video translation program.
2. Have mencoder write the video frame-by-frame to a
named pipe (a fifo) as raw video data.
3. Read each the raw video data from the fifo into IDL using READU.
Benefits of this approach include (1) being able to read any video
format recognized by mplayer/mencoder (2) without having to build any
additional external libraries.
The problem under MacOS is that frames are truncated -- only a few video
lines make the trip through the fifo in any frame. I'm guessing that
there's some buffer size that I need to set somewhere somehow.
For the life of me, I can't find the solution. Can you?
All the best,
David
|
|
|