[英]opencv mp3 header missing
Hi i'm new to the openCV library. 嗨,我是openCV库的新手。 Just really installed in today and i was trying to do some basic stuff like show a picture in a window and show a video in a window. 今天才真正安装,我正在尝试做一些基本的事情,例如在窗口中显示图片并在窗口中显示视频。 I got both of these to work but when i try and show the video it plays without sound and i get the following 我让这两个都正常工作,但是当我尝试显示视频而没有声音播放时,我得到以下信息
[mp3 @ 0x107808800] Header missing [mp3 @ 0x107808800]标头缺失
in the console. 在控制台中。 How do i add the mp3 header so it plays with sound? 如何添加mp3标头,使其具有声音播放? here is my code 这是我的代码
int main(int argc, const char * argv[])
{
if (argc<2) {
printf("not enough arguments");
return -1;
}
//create a window
namedWindow(windowName,WINDOW_AUTOSIZE);
Mat frame;
//capture video from file
VideoCapture capture;
capture.open(argv[1]);
int run=1;
while (1) {
//make play and pause feature
if (run !=0) {
capture>>frame;
imshow(windowName, frame);
}
char c=waitKey(33);
if (c=='p') {
run=1;
}
if (c=='s') {
run=0;
}
if (c ==27 || c=='q') {
break;
}
}
return 0;
}
you can't . 你不能。
audio gets discarded (that's the message you get), and there's no way to retrieve it again. 音频将被丢弃(这就是您收到的消息),并且无法再次检索它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.