I'm using the Python bindings for OpenCV and have run into a little annoyance using CreateVideoWriter where when I call the function, it prints something similar to the below to the console and I can't seem to surpress it or ideally redirect it into a variable.
Output #0, avi, to 'temp/Temp.0433.avi':
Stream #0.0: Video: mjpeg, yuvj420p, 320x240, q=2-31, 9830 kb/s, 90k tbn, 25
tbc
The command I'm using for testing is this:
self.file = cvCreateVideoWriter(nf,CV_FOURCC('M','J','P','G'),self.fps,cvSize(320,240),1)
Although in the long run this app will have a control GUI its currently console based, the function is called every minute so this means its difficult to present even a simple menu or more useful status information without this call filling up the console.
Just wondering if anyone has experienced the same and/or has any ideas how I might be able to prevent this happening or can offer pointers as to what I'm doing wrong?
sys.stdout.writetodef dummy(_): passbefore calling it and restoring it later.