bytedeco/javacv

FrameGrabber with inputstream

Open

#1,395 opened on Apr 1, 2020

View on GitHub
 (24 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Now in Android 10, we cannot use file path, instead URI only. so to create a frame grabber, i have to do this:

    inputStream = context.getContentResolver().openInputStream(uri);
    frameGrabber = new FFmpegFrameGrabber(inputStream);
    frameGrabber.start();

I found two issues:

  1. sometimes the start() will stuck there.
  2. Saw some exceptions: Non-fatal Exception: org.bytedeco.javacv.FrameGrabber$Exception avformat_open_input() error -2: Could not open input "java.io.BufferedInputStream@db63d24". (Has setFormat() been called?)

Contributor guide