Piping to exiftool on Windows

Started by Archive, May 12, 2010, 08:54:14 AM

Previous topic - Next topic

Archive

[Originally posted by fbuchinger on 2008-01-15 07:30:38-08]

Hello,

I'm developing a python script that extracts various metadata from images and I want to use exiftool as fallback solution, i.e. if my internal EXIF parser is unable to extract metadata from a file.

I want to communicate to exiftool via pipe and send the first 100kb data of every image to the stdin of exiftool, reading its results on stout. This is because my python script also opens images stored on HTTP or FTP servers.

Unfortunately, piping doesn't seem to work on Windows, I get a Broken Pipe Error. I also had no success when I tested the Piping Examples in the manual on a windows shell.

Does anyone know if piping to Exiftool works on Windows? Or are there better solutions than my approach?

Thanks,

Franz

Archive

[Originally posted by exiftool on 2008-01-15 11:58:01-08]

This is a good point.  I should test the piping examples in Windows and
adjust the windows documentation accordingly.  I will try this out myself
when I can, but in the mean time maybe someone else has an idea of how
piping works in Windows.

- Phil

Archive

[Originally posted by exiftool on 2008-01-17 13:47:28-08]

Sorry for the delay in responding.  I ran some tests in the Windows cmd
shell, and piping with commands like the following works fine for me:

Code:
type image.jpg | exiftool - | more

So this works from the Windows command line.  If you're having problems
implementing this from a command executed from within Python, there
may be other limitations.  I know, for instance, that Perl doesn't support
bi-directional pipes on filehandles if this is what you are trying to do.

- Phil