bytedeco/javacv

ScreenCapture on Windows using new FFmpegFrameGrabber("screen-capture-recorder");

Open

#31 opened on 2014年8月24日

GitHub で見る
 (19 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

Apparently ffmpeg supports screen capture on Windows according to this: https://trac.ffmpeg.org/wiki/Capture/Desktop

Attempting to do so using:

        FrameGrabber grabber = new FFmpegFrameGrabber("screen-capture-recorder");// As well as FFmpegFrameGrabber("UScreenCapture");
        grabber.setFormat("dshow");
        grabber.setFrameRate(30);
        grabber.start();

Results in:

run:
Exception in thread "main" org.bytedeco.javacv.FrameGrabber$Exception: avformat_open_input() error -5: Could not open input "screen-capture-recorder". (Has setFormat() been called?)
    at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:368)
    at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:318)
    at testarea.JavaCVDemo.main(JavaCVDemo.java:40)
[dshow @ 154dc160] Malformed dshow input string.
[dshow @ 154dc160] Malformed dshow input string.
Java Result: 1
BUILD SUCCESSFUL (total time: 9 seconds)

This may possibly have something to do with(maybe???): https://trac.ffmpeg.org/wiki/DirectShow#Specifyinginputframerate

This is here as a resource in case other people experience this error and wish to look into it, as well as a reminder to myself to do so in the future. If you find any solutions or fixes, please let me know.

コントリビューターガイド