opencv mp3标头丢失了

时间:2014-03-25 02:42:15

标签: c++ opencv mp3

您好,我是openCV库的新手。刚刚安装在今天,我正在尝试做一些基本的东西,比如在窗口中显示图片并在窗口中显示视频。 我得到了这两个工作,但当我尝试显示视频播放没有声音,我得到以下
[mp3 @ 0x107808800]标题丢失了  在控制台中。我如何添加MP3标题,以便播放声音? 这是我的代码

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;
}

1 个答案:

答案 0 :(得分:0)

你不能。

音频被丢弃(这是你收到的信息),而且无法再次检索。