nonoitall
5th November 2007, 07:41
I'm trying to write a front-end for Avs2YUV in Java specifically meant for some custom scene change marking. Reading video information from stdout is all well and good; it works perfectly. But, I also need the front-end to know the length of the script in frames, which is proving problematic. That information is (supposed to be) sent from Avs2YUV through stderr, and for some reason, it's not making its way to my front-end.
I wrote a dummy program in C++ that just spits out blank frames to stdout and prints some info to stderr. It worked fine in my front-end, and the front-end received the data printed to stderr.
Further investigation revealed some (possibly related?) quirks. When I run Avs2YUV from the console (using the same parameters as my front-end) and I don't redirect stderr, I always see the information printed to it. But, when I redirect stderr to a file on a drive other than the drive that the current directory is on, I get a blank file. If the file is on the same drive as the current directory, the information gets printed correctly.
My dummy program worked properly, regardless of the location of the file to which stderr was redirected, so it would seem that this problem has something to do with Avs2YUV, but I honestly can't fathom what's causing it, or, more importantly, how to work around it.
I wrote a dummy program in C++ that just spits out blank frames to stdout and prints some info to stderr. It worked fine in my front-end, and the front-end received the data printed to stderr.
Further investigation revealed some (possibly related?) quirks. When I run Avs2YUV from the console (using the same parameters as my front-end) and I don't redirect stderr, I always see the information printed to it. But, when I redirect stderr to a file on a drive other than the drive that the current directory is on, I get a blank file. If the file is on the same drive as the current directory, the information gets printed correctly.
My dummy program worked properly, regardless of the location of the file to which stderr was redirected, so it would seem that this problem has something to do with Avs2YUV, but I honestly can't fathom what's causing it, or, more importantly, how to work around it.