c++ - Disable OpenCV VideoWriter output -
when create video opencv's videowriter
class, outputs in terminal :
output #0, avi, 'video.avi': stream #0.0: video: mpeg4, yuv420p, 512x384, q=2-31, 12582 kb/s, 90k tbn, 24 tbc
i'd disable have no idea how this.
"mute" console while. ref.
#include <iostream> #include <fstream> int main ( int argc, char** argv ) { std::streambuf* cout_sbuf = std::cout.rdbuf(); // save original sbuf std::ofstream fout("temp"); std::cout<<"a\n"; std::cout.rdbuf(fout.rdbuf()); // redirect 'cout' 'fout' std::cout<<"b\n"; std::cout.rdbuf(cout_sbuf); // restore original stream buffer std::cout<<"c\n"; return 0; }
console output:
a c
Comments
Post a Comment