bytedeco/javacv
View on GitHubOutputStream seeking, video length (duration) determination problems
Open
#839 opened on Nov 23, 2017
help wantedquestion
Repository metrics
- Stars
- (6,985 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
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

Is this a known issue?