GPUVideo-android icon indicating copy to clipboard operation
GPUVideo-android copied to clipboard

Unable to save video after applying effects

Open aahanverma00710 opened this issue 5 years ago • 1 comments

W/System.err: java.lang.IllegalStateException: Could not get attrib or uniform location for oTexture at com.daasuu.gpuv.egl.filter.GlFilter.getHandle(GlFilter.java:153) at com.app.feedgoals.widget.CustomOverlayFilter.onDraw(CustomOverlayFilter.java:82) at com.daasuu.gpuv.egl.filter.GlFilter.draw(GlFilter.java:121) at com.daasuu.gpuv.egl.filter.GlFilterGroup.draw(GlFilterGroup.java:102) at com.daasuu.gpuv.composer.DecoderSurface.drawImage(DecoderSurface.java:286) W/System.err: at com.daasuu.gpuv.composer.VideoComposer.drainDecoder(VideoComposer.java:195) at com.daasuu.gpuv.composer.VideoComposer.stepPipeline(VideoComposer.java:109) at com.daasuu.gpuv.composer.GPUMp4ComposerEngine.runPipelines(GPUMp4ComposerEngine.java:170) at com.daasuu.gpuv.composer.GPUMp4ComposerEngine.compose(GPUMp4ComposerEngine.java:113) at com.daasuu.gpuv.composer.GPUMp4Composer$1.run(GPUMp4Composer.java:188) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) This is the error

GPUMp4Composer = GPUMp4Composer(videoURi!!.path, videoPath) .rotation(Rotation.NORMAL) .size(1080, 720) .fillMode(FillMode.PRESERVE_ASPECT_FIT) .filter(GlFilterGroup(glFilterList)) .mute(false) .listener(object : GPUMp4Composer.Listener { override fun onProgress(progress: Double) { // runOnUiThread { progress_bar.visibility = View.VISIBLE } }

                override fun onCompleted() {
                    runOnUiThread {
                        exportMp4ToGallery(applicationContext, videoPath!!)
                    }

                }

                override fun onCanceled() {
                    Log.d("VideoEditingActivity", "onFailed()")
                }

                override fun onFailed(exception: java.lang.Exception) {
                    Log.d("VideoEditingActivity", "onFailed()")
                }
            }).start()

aahanverma00710 avatar Aug 06 '20 16:08 aahanverma00710

This should fix.

https://github.com/MasayukiSuda/GPUVideo-android/issues/17#issuecomment-513577624

In summary use a different filter to save the video than one created to show the video.

anunayarunav avatar Aug 16 '20 11:08 anunayarunav