Hi,
With some try now I can use ExifTool with -stay_open option and everything is good.
I add these parameters:
'-stay_open'
'true'
'-@'
'-'
and then I excute it.
For getting Metadata I will add -s and filename each one with a LineEnding and then I pass -execute with LineEnding and I will check output and everything works.
So Now I want to pass stream not filename to ExifTool but if I write stream to input with or without LineEnding I will not get any output and it will freeze.
If Im doing it wrong or it doesnt support file stream please tell me and if not is there any example anywhere for it?
You are using the stdin stream for commands, so it can't be used for the file too. The commands must come from the command line or a disk file if you want to stream the image data.
- Phil
Sure I do!
I managed to use it with stream without -stay_open option.
I send stream to stdin an close the input and wait for result and get stdout but with -stay_open option and passing -execute with LineEnding it will never give me any result.
I just did what I did before -stay_open option and if I pass file name before execute it works very good but if I write file in input and pass execute nothing will happen.
Am I doing something wrong or miss something?
Is there any working demo in any language like C,C++,Java,Delphi,Pascal or anything I can learn from it?
You missed something: The -stay_open option keeps the input open for command-line arguments.
I wrote a C++ wrapper class that uses the -stay_open option here (http://owl.phy.queensu.ca/~phil/cpp_exiftool/).
- Phil
Yes I know that and I dont close it but my problem is :
When I pass all parameters except file I will have 2 options:
1-pass the file name with LineEnding and then pass -execute with LineEnding. Everything will work and its OK.
2-pass file stream and then pass -execute with LineEnding. nothing happen and there is no result. I also tested without LineEnding and nothing happen again.
Also I saw your code and it use filename and my question is :
How can I pass file stream (not file name) to ExifTool in StayOpen mode and is there any sample in any language?
You keep asking the same question, so my answer will be the same. I think we have a communication problem. :(
- Phil
QuoteYou missed something: The -stay_open option keeps the input open for command-line arguments.
You said it keeps input open and I know that but how is effects sending file stream? Or asking like this,can I send file stream and if yes how?
Thanks for your ExifTool and helps.
You can't send your command-line arguments via the same stream as your file if you want the argument stream to stay open.
- Phil
So with ExifTool stay-open option w can not send stream of file an just file name accepted .
It what I understand from your answer and the fact that I could find any demo or example.