Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to run video file using a video player

is there any way to run a video file using the default media player installed in the system?

running the below posted code does not run the video player that should be used to play the .avi file, the below code just open the .avi file and provide some data about the each frame.

how to let video player plays the provided video file Code:

static final String aviPath = "C:\\private\\ArbeitsOrdner_19_Mar_2015\\AVIs\\parabole.avi";

public static void main(String[] args) {

    vCapture = new VideoCapture();
    matFrame = new Mat();
    clonedFrame = new Mat();

    try {;
    } catch (Exception e1) {
        System.out.println("no video found.");
        try {
        } catch (Exception e2) {
            System.out.println("No WEB_CAM attached.");

    if (vCapture.isOpened()) {
        while (vCapture.grab()) {

            if (!matFrame.empty()) {
                System.out.println("grabbed frame");
                System.out.println("frame size: " + matFrame.size());
                clonedFrame = matFrame.clone();
        } vCapture.release();