Log in

View Full Version : xvid_encraw console output buffer problem


madhatter300871
10th January 2012, 20:45
Hi

I run xvid_encraw from my own script and redirect its stdout and stderr. The problem is that stderr isnt returned when the output is redirected until the stderr buffer is full. (I think !!)

I think I know why, but would like someone to confirm.

I have looked at the source code for xvid_encraw and can see that when progress is returned every nth frame there is no new line character at the end of the line i.e. "\n".

I can't seem to compile the xvid sources in visual studio c++, it complains that it cant open the file xvidcore.dll.a

Can any one offer any advice ?

PS. I know this isn't strictly an encoding question but i think this is the best forum to ask.

madhatter300871
11th January 2012, 00:01
Done it !

In case anybody is interested in my solution... I have recompiled xvidencraw.exe from the latest source code and have made my own minor change, I have set the stderr to be flushed after it is written to when progress is reported to the console. The "\n" line terminator was not the solution, flushing the output was.

Now I can access my redirected output on the fly instead of waiting for stderr buffer to become full.... now my progress bar works properly :)