1

我正在尝试使用此库将 waterMark 添加到视频中,但我无法获得所需的结果,如库https://github.com/MasayukiSuda/Mp4Composer-android中所示。谁能指出或帮助我如何解决它谢谢我的尝试

 mp4Composer = new Mp4Composer(videoItem.getPath(), videoPath)
            // .rotation(Rotation.ROTATION_270)
            .size(720, 720)
            .fillMode(FillMode.PRESERVE_ASPECT_FIT)
            .filter(new GlWatermarkFilter(BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_launcher_background), GlWatermarkFilter.Position.LEFT_BOTTOM))
            .mute(muteCheckBox.isChecked())
            .flipHorizontal(flipHorizontalCheckBox.isChecked())
            .flipVertical(flipVerticalCheckBox.isChecked())
            .listener(new Mp4Composer.Listener() {
                @Override
                public void onProgress(double progress) {
                    Log.d(TAG, "onProgress = " + progress);
                    runOnUiThread(() -> progressBar.setProgress((int) (progress * 100)));
                }

我尝试添加这一行: filter(new GlWatermarkFilter(BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_launcher_background), GlWatermarkFilter.Position.LEFT_BOTTOM))

4

0 回答 0