ffmpeg import plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg import plugin

William Day-3
Hello All,

I have been using an effective but awkward combination of ffmpeg and
named pipes to import compressed video into ImageJ on gnu/linux

mkfifo /tmp/video.raw
ffmpeg -i video.avi -f rawvideo -pix_fmt gray - > /tmp/video.raw < /dev/null &

then using the ImageJ command 'import raw' to read the 8-bit gray data
from the named pipe.

This whole process is much faster than converting the compressed avi
to raw and then importing the converted files. It seems like this
would be something quite easy to wrap up into a plugin. I was unable
to find an existing plugin which does this, so I thought I would ask
how difficult it would be to write this plugin and where to start - is
there a plugin I could simply modify and recompile?

William
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg import plugin

dscho
Hi,

On Thu, 23 Jul 2009, William Day wrote:

> I have been using an effective but awkward combination of ffmpeg and
> named pipes to import compressed video into ImageJ on gnu/linux
>
> mkfifo /tmp/video.raw
> ffmpeg -i video.avi -f rawvideo -pix_fmt gray - > /tmp/video.raw < /dev/null &
>
> then using the ImageJ command 'import raw' to read the 8-bit gray data
> from the named pipe.
>
> This whole process is much faster than converting the compressed avi to
> raw and then importing the converted files. It seems like this would be
> something quite easy to wrap up into a plugin. I was unable to find an
> existing plugin which does this, so I thought I would ask how difficult
> it would be to write this plugin and where to start - is there a plugin
> I could simply modify and recompile?

I have something preliminary since last December, trying to think of ways
how to make it work with plain ImageJ on different platforms.

However, for technical reasons I think I'll have to make this a Fiji-only
plugin: an environment variable has to be set to the path where the native
libraries sit, and this variable has to be set _before_ Java is started.

Ciao,
Dscho