View Full Version : besweet commandline redirection weirdness
Doom9
28th February 2005, 22:22
I'm trying to catch BeSweet stdout output in my own application. For some wicked reason, even though I redirect besweet's stdout and read from it, the data seems to be dumped another way (I see it in my debugger output window). Only when encoding is done can I read from stdout. What is besweet doing differently from other applications?
And when I redirect stderr as well, besweet won't even start encoding.
johnman
28th February 2005, 23:33
Maybe a stupid question, since im not really into cli programming,
but cant this be some buffering that gets flushed at the end?
Doom9
1st March 2005, 10:25
no.. the commandline is written to someplace (I see it in the debugger output). besweet doesn't encode if I redirect both stdout and stderr and not read from either one.
stax76
1st March 2005, 14:43
never worked in that area but found some links, hope it helps
http://www.codeproject.com/info/search.asp?cats=2&cats=3&cats=4&cats=5&searchkw=RedirectStandardOutput&Submit1=Search&author=&sd=11%2F15%2F1999&ed=3%2F1%2F2005&HK=on
http://groups.google.de/groups?hl=de&lr=&q=RedirectStandardOutput+group%3A*dotnet*&btnG=Suche
Doom9
1st March 2005, 15:04
@stax: since you know C#, perhaps you could have a quick look here: http://forum.doom9.org/showthread.php?s=&threadid=90753
it's the source... you can compare AudioEncoder.cs to VideoEncoder.cs (that one works as it should).
I already know how stdout redirection should work (I'm using it for 3 other programs at work.. works like a charm - and VideoEncoder also works.. so does MP4Muxer (well.. it did, MP4Muxer is untested and contains a lot of new code)), yet the 2nd article on codeproject will provide handy because it deals with something else I've been trying to achieve (the event callbacks for the encoder status updates).
DSPguru
4th March 2005, 13:05
useful data is dumped always to one of the two :
- stdout
- logfile pointer
and "transcoding...."-like messages are dumped to stderr.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.