bytedeco/javacv

OutputStream seeking, video length (duration) determination problems

Open

#839 geöffnet am 23. Nov. 2017

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (1.583 Forks)batch import
help wantedquestion

Repository-Metriken

Stars
 (6.985 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

When using

mFrameRecorder.setFormat("matroska");

and File

    public FFmpegFrameRecorder(File file, int imageWidth, int imageHeight) {
        this((File)file, imageWidth, imageHeight, 0);
    }

recording works ok.

When using OutputStream

    public FFmpegFrameRecorder(OutputStream outputStream, int imageWidth, int imageHeight) {
        this(outputStream.toString(), imageWidth, imageHeight);
        this.outputStream = outputStream;
    }

 DocumentFile newFile = mDocumentFileDir.createFile("video/mkv", "test.mkv");
        try {
            pfd = mContext.getContentResolver().openFileDescriptor(newFile.getUri(), "rw");
            mOutputStream = new FileOutputStream(pfd.getFileDescriptor());
            mFrameRecorder = new FFmpegFrameRecorder(mOutputStream, videoWidth, videoHeight);

            //I close `mOutputStream/pfd` after stopping ffmpeg recording

recording also works ok, I can watch recorded video using android MX Player, but it cannot determine the length of the video and because MX Player doesn't know the length, I can't seek though the video

33134840-705864c0-cfa9-11e7-9b12-75f2f6b49103

Is this a known issue?

Contributor Guide