I have this line in my code:
writer = cv.CreateVideoWriter(\'video.avi\', cv.CV_FOURCC(\'X\',\'V\',\'I\',\'D\'), 30 ,(480,800), 1)
Which output
It's not OpenCV that outputs this info. It's FFMPEG (which is called by OpenCV).
You can recompile FFMPEG to disable these debugs.
import os
import sys
saved_stdout, saved_stderr = sys.stdout, sys.stderr
sys.stdout = sys.stderr = open(os.devnull, "w")
writer = cv.CreateVideoWriter('video.avi', cv.CV_FOURCC('X','V','I','D'), 30 ,(480,800), 1)
sys.stdout, sys.stderr = saved_stdout, saved_stderr
print 'Now this will print to stdout'
Demo:
>>> import os
>>> import sys
>>> saved_stdout, saved_stderr = sys.stdout, sys.stderr
>>> sys.stdout = sys.stderr = open(os.devnull, "w")
>>> print 'hello world' # no output
>>> sys.stderr.write('Invisible Error!\n') # no ouput
>>> sys.stdout, sys.stderr = saved_stdout, saved_stderr
>>> print 'goodbye world'
goodbye world
>>> sys.stderr.write('Error!\n')
Error!