Skip to content

ofVideoPlayer "unable to call GetConnectedMediaType" (Windows) #5114

@YuyQuan

Description

@YuyQuan

I attempted to load and play a simple mp4 file and this is was the log reads:

unable to call GetConnectedMediaType
[ error ] ofDirectShowPlayer:  Cannot load video of this file type.  Make sure you have codecs installed on your system.  OF recommends the free K-Lite Codec pack.

Despite being able to play mp4's on the the desktop, I downloaded the standard codec package from: http://www.codecguide.com/download_kl.htm

And it did nothing.

Here is the full code

void ofApp::setup(){
    vid.load("video.mp4");
        //vid.loadMovie("video.mp4");
}

//--------------------------------------------------------------
void ofApp::update(){
    vid.update();
}


void ofApp::draw(){
    vid.draw(100, 100);
}


void ofApp::keyPressed(int key){
    switch (key)
    {
    case 'a':

        vid.play();
        break;

    default:
        break;
    }
}

and of course in ofApp.h there is

ofVideoPlayer vid;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions