Opencv play mp4 but there is no sound
-
Hi everyone !
I use Qt5, and opencv play mp4 file, has a good picture, but I want more sound then I need to do something more
VideoCapture cap1("/storage/emulated/0/Download/QV5.mp4"); while(true) { Mat ft; if (cap1.read(ft)) { cv::resize(ft,ft, Size(300, 300),INTER_AREA); // thay đổi kích thước QImage img= QImage((const unsigned char*)(ft.data), ft.cols,ft.rows, QImage::Format_BGR888); // hiển thị ui->label_2->setPixmap(QPixmap::fromImage(img)); // show lên label } QCoreApplication :: processEvents (); }Thanks!
-
Hi,
Either use QtMultimedia or VLC or even ffmpeg. OpenCV is not a multimedia playback library.