comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Video input for IDL on Macs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Video input for IDL on Macs [message #80547] Mon, 18 June 2012 06:44 Go to next message
David Grier is currently offline  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
Re: Video input for IDL on Macs [message #81387 is a reply to message #80547] Sat, 08 September 2012 04:53 Go to previous message
David Grier is currently offline  David Grier
Messages: 35
Registered: July 2010
Member
Dear Folks,

I found the bug. Now it's possible to read frames from video files on both
linux and MacOS systems. The video-reading object spawns standard installations
of mplayer and mencoder to transcode just about any video file into raw video frames
and to write the frames one at a time to a named pipe (fifo). It then uses
native IDL commands to read frames from the fifo. No DLL.

The code for the video-reading object is available for download under the GPL at

http://physics.nyu.edu/grierlab/software/dgggrmplayer__defin e.pro

The next challenge is to get this thing to read frames from cameras.
Suggestions are warmly invited.

TTFN,

David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Off-kilter z-axis label in function graphics?
Next Topic: Re: Problem starting non IDL program with SPAWN

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:49:51 PDT 2025

Total time taken to generate the page: 0.28905 seconds