Giter VIP home page Giter VIP logo

mp4composer-android's People

Contributors

andressantiago avatar anthonycr avatar asakahara avatar atsuko-fukui avatar charliechristensen avatar esmasui avatar khoben avatar mahsky avatar masayukisuda avatar tapos-datta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mp4composer-android's Issues

App Crash on flip video file

java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:483)
at java.lang.Integer.valueOf(Integer.java:611)
at com.daasuu.mp4compose.composer.Mp4Composer.getVideoRotation(Mp4Composer.java:268)
at com.daasuu.mp4compose.composer.Mp4Composer.access$200(Mp4Composer.java:25)
at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:153)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)

Progress stuck at 51%

onProgress is struck at 51% any help?

I am trying to do a light compression via this library, Thanks

new Mp4Composer(input, pathOutput)
                .size(480, 640)
//                .fillMode(FillMode.PRESERVE_ASPECT_FIT)
                .videoBitrate(2000000)
//                .filter(new GlWatermarkFilter()) // filter cho man hinh video
                .listener(new Mp4Composer.Listener() {

                    @Override
                    public void onProgress(double progress) {
                        Log.d("PROGRESS COMPRESSION", "onProgress = " + progress);
                        sendEvent(getReactApplicationContext(), "proGress", progress);
                    }

                    @Override
                    public void onCompleted() {
                        event.putString("path", pathOutput);
                        promise.resolve(event);
                    }

                    @Override
                    public void onCanceled() {
                        Log.d("Destroy", "onCanceled");
//                        processing.invoke("Falied");
                    }

                    @Override
                    public void onFailed(Exception exception) {
                        event.putString("path", "");
                        promise.resolve(event);
                    }
                })
                .start();

LOG:

-01 20:07:00.952 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5
2019-08-01 20:07:01.146 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5037244050436803
2019-08-01 20:07:01.228 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.504452661703318
2019-08-01 20:07:01.341 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5059096268881526
2019-08-01 20:07:01.394 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5081010457460086
2019-08-01 20:07:01.506 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:01.895 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:02.036 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:02.986 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:03.113 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:03.944 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:04.083 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:04.918 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:05.049 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:06.003 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:06.139 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:06.920 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:07.047 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:07.975 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:08.110 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:09.040 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:09.169 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:09.956 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:10.086 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:10.956 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:12.781 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:12.925 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734

Overlay bitmap on portrait video

I am trying to overlay bitmap over a portrait video but "srcVideoResolution" field detects the width and height of video wrongly. After taking a 1080p portrait video and inspecting "srcVideoResolution" field, the width and height were opposite ( width: 1920, height: 1080 ).

Could not use on API level 16 or below

Is there any way to use this lib in API level 18 And lower ?

I am facing this issue :
Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.github.MasayukiSuda:Mp4Composer-android:v0.1.9] /home/emir/.gradle/caches/transforms-1/files-1.1/Mp4Composer-android-v0.1.9.aar/801bab196cd1e1e62921fc80fb8b12c3/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="com.daasuu.mp4compose" to force usage (may lead to runtime failures)

Error on VideoComposer.release()

First of all, allow me to thank you for your hard work and making this awesome library.

What would be the reason for crashing with illegal state exception on VideoComposer.release() , on

Line 146 if (decoderStarted) decoder.stop();

or

Line 151 if (encoderStarted) encoder.stop();

The error comes from Mp4ComposerEngine, line 147
throw new Error("Could not shutdown mediaExtractor, codecs and mediaMuxer pipeline.", e);

How to gracefully handle this error in the app?

Display wrong on surface view.

Hello Sir, I try to modify your code for showing effect on screen. I am a layman on gles/opengl。 I just merge your encodersurface.java and decoder.java into a displaysurface.
I set surface view to fit video aspect ratio when start play .
for the test video , it is width 996 height 1328 on screen.
the test video is recorded from phone camera which is 640*480 rotation 90.
after getScaleAspectFit. returned scale on x and y are both 1.0,
but on screen display, video filled good at x demension. but at y demension, it is narrowed, and display in a square aspect ratio.
I try to increase scale value on y demension, but it is cuted on the top.
could you tell me how to solve it? why convert video in background is good. do I need to use custom fill mode to scale and translate y direction? how to determine the scale factor?

Overlay bitmap on video captured by device camera

Hey,thankyou for your library.It's been a great help. Just one problem i encounter - while overlaying logo on video captured by device camera . I'm overlaying logo on top left, it's showing on top right and in opposite direction. This might have something to do with video's resolution. I guess, first you're overlaying the logo then rotating & changing its resolution. Please help how to resolve the issue.

How Can be Combine Both ExoPlayer Filters and Mp4Composer?

I am trying to show filters on Video on Real time - Exoplayer is Perfect
Then I have to Apply that filter to video and save the new video - Mp4Composer Working Fine

Now I want to Combine both Solution How can do that?

I am getting error while doing so

Could not get attrib or uniform location for uMVPMatrix at com.daasuu.epf.filter.GlFilter.getHandle(GlFilter.java:219) at com.daasuu.epf.filter.GlFilter.setUpSurface(GlFilter.java:235) at com.daasuu.epf.composer.DecoderSurface.<init>(DecoderSurface.java:64) at com.daasuu.epf.composer.VideoComposer.setUp(VideoComposer.java:75) at com.daasuu.epf.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:103) at com.daasuu.epf.composer.Mp4Composer$1.run(Mp4Composer.java:160) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)

Any plans to merge your filtering version with mp4composer?

Hi,

Are there any plans to merge mp4 composer with your filter supporting version and merge also the exoplayer filters into the same project. I am using all of them together and there are some fixes done on MP4Composer with are totally missing from your fork?

Regards

Get Single frame

Hello friend!! Can you give me solution to grab single frame from mp4 video without MetadataRetriever(it get only keyframes on Android 6) , may be with MediaCodec Api?

Overlay with changing Bitmap

Hello! Thank you for solution! Is your library can to overlay video with transparent layer in size of video frame and change it in time with Canvas?

have problem for rotate video to ROTATION_270

Hello, I rotation for landscape video with rotate right 90 but after use this library video is rotated 180

This is the result about this
https://drive.google.com/file/d/14yM3f0qyWn8mheBJzifTrH7ZSy0UZuLS/view?usp=sharing

and this is my code in kotlin

Mp4Composer(input, output)
                .rotation(Rotation.ROTATION_270)
                .size(720, 1280)
                .videoBitrate(4000 * 1000)
                .listener(object: Mp4Composer.Listener {
                    override fun onFailed(exception: Exception?) {
                        listener.onFailureRotation()
                        Log.d("onFailed rotate", exception.toString())
                    }

                    override fun onProgress(progress: Double) {
                        Log.d("onProgress rotate", (progress*100).toString())
                    }

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

                    override fun onCompleted() {
                        Log.d("onCompleted rotate", "onCompleted()")
                        listener.onSuccessRotation()
                    }

                }).start() 

Multi Trim

I was trying to do a multi trim of a video. I have a video of 60 sec and I wanted 6 of 10 secs.

I tried to do the trimming of the video in parallel but is not working properly. I have to do it in sequence but is kind of slow, do you have any suggestion on how may I do this?

The Error that I am having is this

2019-11-27 11:47:48.640 26711-27167/com.puzio.fantamaster E/Mp4Composer: Unable to compose the engine
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueInputBuffer(Native Method)
        at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2569)
        at com.daasuu.mp4compose.composer.VideoComposer.drainExtractor(VideoComposer.java:175)
        at com.daasuu.mp4compose.composer.VideoComposer.stepPipeline(VideoComposer.java:130)
        at com.daasuu.mp4compose.composer.Mp4ComposerEngine.runPipelines(Mp4ComposerEngine.java:242)
        at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:126)
        at com.daasuu.mp4compose.composer.Mp4Composer$2.run(Mp4Composer.java:268)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
2019-11-27 11:47:48.644 26711-27168/com.puzio.fantamaster E/Mp4ComposerEngine: Could not shutdown mediaExtractor, codecs and mediaMuxer pipeline.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:2067)
        at com.daasuu.mp4compose.composer.VideoComposer.release(VideoComposer.java:158)
        at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:137)
        at com.daasuu.mp4compose.composer.Mp4Composer$2.run(Mp4Composer.java:268)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)


android.media.MediaCodec$CodecException: Error 0xfffffc0e

Hello, this error is reported when compressing the video.
Android Log:
E/Mp4Composer: This devicel cannot codec with that setting. Check width, height, bitrate and video format. android.media.MediaCodec$CodecException: Error 0xfffffc0e at android.media.MediaCodec.native_configure(Native Method) at android.media.MediaCodec.configure(MediaCodec.java:2023) at android.media.MediaCodec.configure(MediaCodec.java:1951) at com.daasuu.mp4compose.composer.VideoComposer.setUp(VideoComposer.java:81) at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:107) at com.daasuu.mp4compose.composer.Mp4Composer$2.run(Mp4Composer.java:268) 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)

Your Log:
D/Mp4Composer: rotation = 0 D/Mp4Composer: rotation = NORMAL D/Mp4Composer: inputResolution width = 544 height = 962 D/Mp4Composer: outputResolution width = 720 height = 1273 D/Mp4Composer: fillMode = PRESERVE_ASPECT_FIT D/Mp4Composer: bitrate=6874200

LUT filter

Hi, i'm trying to apply LUT image filter by extending GlFilter class, but it's not working. It just overlay LUT image on whole video/image. Below is my fragment shader code and LUT image. Please help me debug this issue.

FRAGMENT_SHADER = "#extension GL_OES_EGL_image_external : require\n" + "precision mediump float;\n" + "uniform mediump sampler2D lutTexture; \n" + "uniform sampler2D sTexture; \n" + "varying vec2 vTextureCoord; \n" + "vec4 sampleAs3DTexture(vec3 uv) {\n" + " float width = 16.;\n" + " float sliceSize = 1.0 / width;\n" + " float slicePixelSize = sliceSize / width;\n" + " float sliceInnerSize = slicePixelSize * (width - 1.0);\n" + " float zSlice0 = min(floor(uv.z * width), width - 1.0);\n" + " float zSlice1 = min(zSlice0 + 1.0, width - 1.0);\n" + " float xOffset = slicePixelSize * 0.5 + uv.x * sliceInnerSize;\n" + " float s0 = xOffset + (zSlice0 * sliceSize);\n" + " float s1 = xOffset + (zSlice1 * sliceSize);\n" + " vec4 slice0Color = texture2D(lutTexture, vec2(s0, uv.y));\n" + " vec4 slice1Color = texture2D(lutTexture, vec2(s1, uv.y));\n" + " float zOffset = mod(uv.z * width, 1.0);\n" + " vec4 result = mix(slice0Color, slice1Color, zOffset);\n" + " return result;\n" + "}\n" + "void main() {\n" + " vec4 pixel = texture2D(sTexture, vTextureCoord);\n" + " vec4 gradedPixel = sampleAs3DTexture(pixel.rgb);\n" + " gradedPixel.a = pixel.a;\n" + " pixel = gradedPixel;\n" + " gl_FragColor = pixel;\n " + "}";

lut

Error when applying effect to a Camera captured video.

Hi there , I hope you're doing fine. I am facing an issue when I try to Apply effect on a video which is captured by camera. I have tested this on Android Emulator with Android version 9.0 and also tested on a real device with Android version 8.1.
I also imported the sample project, and it also has this issue. Kindly test your sample project app with newly recorded video from camera.
Below is the error log :

E/Mp4ComposerEngine: Could not shutdown mediaExtractor, codecs and mediaMuxer pipeline.
java.lang.IllegalStateException
at android.media.MediaCodec.native_stop(Native Method)
at android.media.MediaCodec.stop(MediaCodec.java:2084)
at c.c.a.e.j.c(VideoComposer.java:166)
at c.c.a.e.g.a(Mp4ComposerEngine.java:137)
at c.c.a.e.f$b.run(Mp4Composer.java:268)
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:764)
E/f: Unable to compose the engine
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2698)
at c.c.a.e.j.f(VideoComposer.java:227)
at c.c.a.e.j.d(VideoComposer.java:122)
at c.c.a.e.g.a(Mp4ComposerEngine.java:242)
at c.c.a.e.g.a(Mp4ComposerEngine.java:126)
at c.c.a.e.f$b.run(Mp4Composer.java:268)
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:764)
E/ProgressBarActivity: onFailed()
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2698)
at c.c.a.e.j.f(VideoComposer.java:227)
at c.c.a.e.j.d(VideoComposer.java:122)
at c.c.a.e.g.a(Mp4ComposerEngine.java:242)
at c.c.a.e.g.a(Mp4ComposerEngine.java:126)
at c.c.a.e.f$b.run(Mp4Composer.java:268)
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:764)

Multiple datasources

Is it possible to add support for multiple datasources and combine them into a single output?

Null Resolution in GlOverlayFilter

I am using ExoPlayerFilter to show filters and Mp4Composer for rendering. Thank you so much for your libraries. They are awesome!

I am trying to insert an image in a video.

The error I get is this:
Attempt to invoke virtual method 'int com.daasuu.mp4compose.Resolution.width()' on a null object reference

I have obtained the same error using GlWatermarkFilter and using this example class:

import android.graphics.Bitmap
import android.graphics.Canvas
import com.daasuu.mp4compose.filter.GlOverlayFilter

class GlSticker(private val bitmap: Bitmap) : GlOverlayFilter() {

    override fun drawCanvas(canvas: Canvas) {
        canvas.drawBitmap(bitmap, 0f, 0f, null)
    }
}

Any idea to resolve the null pointer?

cannot save video with filter

Hello,

I have some problem for save video with filter and I don’t sure what cause for this problem then I discuss with you about this for find solution to solve this.

android.media.MediaCodec$CodecException: Error 0xfffffc03
  at android.media.MediaCodec.native_configure(Native Method)
  at android.media.MediaCodec.configure(MediaCodec.java:577)
  at com.daasuu.mp4compose.composer.VideoComposer.setUp(VideoComposer.java:86)
  at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:102)
  at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:158)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
  at java.lang.Thread.run(Thread.java:818)

Padding color when using FillMode.PRESERVE_ASPECT_FIT

Hi. Thank you so much for the library.
When i use FillMode.PRESERVE_ASPECT_FIT to "force" the library to compose a square video with .size(outputHeight, outputHeight), the resulting video will have paddings (on the top&bottom / left&right) just like what i expected. But, the padding was black. How can i change the color of those paddings?

Playing Mp4Composed Video not working

Playing Video after applying am getting this error

E/ExoPlayerImplInternal: Internal runtime error. java.lang.IllegalStateException at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2632) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1024) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:573) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:172) at android.os.HandlerThread.run(HandlerThread.java:65)

Missing trim in RemixAudioComposer

When using the option to Trim, some videos are processed incorrectly and show a static frame for the duration of the not trimmed audio.
This happens because the class RemixAudioComposer does not trim audio at all. The functionality is incomplete.
In this class the variables trimStartUs, trimEndUs, addPrimingDelay, frameCounter and primingDelay are doing nothing.

As a workaround I'm doing next in the RemixAudioComposer, but I'm not sure if is a terrible solution:

if (muxCount == 1){
	boolean write = (bufferInfo.presentationTimeUs >= trimStartUs)
			&& ((bufferInfo.presentationTimeUs <= trimEndUs) || (trimEndUs <= 0L));

	if (write){
		muxer.writeSampleData(SAMPLE_TYPE, encoder.getOutputBuffer(result), bufferInfo);
	}
}

have problem with null rotation

Hello,

I have problem with user cannot upload video because application crash with this

Fatal Exception: java.lang.NumberFormatException: null
       at java.lang.Integer.parseInt(Integer.java:483)
       at java.lang.Integer.valueOf(Integer.java:611)
       at com.daasuu.mp4compose.composer.Mp4Composer.getVideoRotation(Mp4Composer.java:268)
       at com.daasuu.mp4compose.composer.Mp4Composer.access$200(Mp4Composer.java:25)
       at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:153)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:762)

and this is my code in kotlin

Mp4Composer(input, output)
                .rotation(Rotation.ROTATION_270)
                .size(720, 1280)
                .videoBitrate(4000 * 1000)
                .listener(object: Mp4Composer.Listener {
                    override fun onFailed(exception: Exception?) {
                        listener.onFailureRotation()
                        Log.d("onFailed rotate", exception.toString())
                    }

                    override fun onProgress(progress: Double) {
                        Log.d("onProgress rotate", (progress*100).toString())
                    }

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

                    override fun onCompleted() {
                        Log.d("onCompleted rotate", "onCompleted()")
                        listener.onSuccessRotation()
                    }

                }).start() 

Issue

05-21 18:03:07.914 20105-20260/com.daasuu.mp4composer W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Movies/201805_21-180307filter_apply.mp4: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:455)
at java.io.RandomAccessFile.(RandomAccessFile.java:247)
at java.io.RandomAccessFile.(RandomAccessFile.java:128)
at android.media.MediaMuxer.(MediaMuxer.java:145)
at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:66)
at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:195)
05-21 18:03:07.915 20105-20260/com.daasuu.mp4composer W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:187)
at libcore.io.IoBridge.open(IoBridge.java:441)
05-21 18:03:07.916 20105-20260/com.daasuu.mp4composer W/System.err: ... 8 more
05-21 18:03:07.916 20105-20260/com.daasuu.mp4composer D/SAMPLE: onFailed()

Android 5 encoding error

hello i wrote working app , but it not work on android 5, 5.1 throws onFailed exception null object, my LOGS:
2075 E SoftVideoEncoderOMXComponent egor.faceintro Unsupported pixel format 0x2
09-08 12:45:48.587 1970 2075 E SoftAVCEnc egor.faceintro Error in extractGraphicBuffer
09-08 12:45:48.587 1970 2074 E ACodec egor.faceintro [OMX.google.h264.encoder] ERROR(0x80001001)
09-08 12:45:48.588 1970 2074 E ACodec egor.faceintro signalError(omxError 0x80001001, internalError -2147483648)
09-08 12:45:48.588 1970 2074 E ACodec egor.faceintro [OMX.google.h264.encoder] ERROR(0x80001001)
09-08 12:45:48.588 1970 2074 E ACodec egor.faceintro signalError(omxError 0x80001001, internalError -2147483648)
09-08 12:45:48.588 1970 2073 E MediaCodec egor.faceintro Codec reported err 0x80001001, actionCode 0, while in state 6
09-08 12:45:48.588 1970 2073 E MediaCodec egor.faceintro Codec reported err 0x80001001, actionCode 0, while in state 0
09-08 12:45:48.691 1970 2074 W GraphicBufferSource egor.faceintro Dropped back down to Loaded without Executing
09-08 12:45:48.691 1970 2074 D egor.faceintro HostConnection::get() New Host Connection established 0xe310b170, tid 2074
09-08 12:45:48.693 1970 2084 E MPEG4Writer egor.faceintro The number of recorded samples is 0
09-08 12:45:48.693 1970 2084 W MPEG4Writer egor.faceintro 0-duration samples found: 1
09-08 12:45:48.693 1970 2084 W MPEG4Writer egor.faceintro 0-duration samples found: 1
09-08 12:45:48.693 1970 2084 I MPEG4Writer egor.faceintro Received total/0-length (0/0) buffers and encoded 0 frames. - Video
09-08 12:45:48.693 1970 2085 I MPEG4Writer egor.faceintro Received total/0-length (13/0) buffers and encoded 13 frames. - Audio
09-08 12:45:48.693 1970 2085 I MPEG4Writer egor.faceintro Audio track drift time: 0 us
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Video track stopping
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Video track source stopping
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Video track source stopped
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Video track stopped
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Audio track stopping
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Audio track source stopping
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Audio track source stopped
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Audio track stopped
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Duration from tracks range is [0, 301859] us
09-08 12:45:48.694 1970 2072 D MPEG4Writer egor.faceintro Stopping writer thread
09-08 12:45:48.697 1970 2083 D MPEG4Writer egor.faceintro 0 chunks are written in the last batch
09-08 12:45:48.697 1970 2072 D MPEG4Writer egor.faceintro Writer thread stopped
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro Failed to release mediaMuxer.
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro java.lang.IllegalStateException: Failed to stop the muxer
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at android.media.MediaMuxer.nativeStop(Native Method)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at android.media.MediaMuxer.stop(MediaMuxer.java:225)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at android.media.MediaMuxer.release(MediaMuxer.java:345)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:153)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at com.daasuu.mp4compose.composer.Mp4Composer$100000001.run(Mp4Composer.java:197)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-08 12:45:48.705 1970 2072 E Mp4ComposerEngine egor.faceintro at java.lang.Thread.run(Thread.java:818)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro java.lang.IllegalStateException
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at com.daasuu.mp4compose.composer.VideoComposer.drainEncoder(VideoComposer.java:207)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at com.daasuu.mp4compose.composer.VideoComposer.stepPipeline(VideoComposer.java:108)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at com.daasuu.mp4compose.composer.Mp4ComposerEngine.runPipelines(Mp4ComposerEngine.java:173)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:124)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at com.daasuu.mp4compose.composer.Mp4Composer$100000001.run(Mp4Composer.java:197)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-08 12:45:48.705 1970 2072 W System.err egor.faceintro at java.lang.Thread.run(Thread.java:818)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro onFailed()
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro java.lang.IllegalStateException
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at com.daasuu.mp4compose.composer.VideoComposer.drainEncoder(VideoComposer.java:207)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at com.daasuu.mp4compose.composer.VideoComposer.stepPipeline(VideoComposer.java:108)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at com.daasuu.mp4compose.composer.Mp4ComposerEngine.runPipelines(Mp4ComposerEngine.java:173)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:124)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at com.daasuu.mp4compose.composer.Mp4Composer$100000001.run(Mp4Composer.java:197)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-08 12:45:48.707 1970 2072 E mp4 egor.faceintro at java.lang.Thread.run(Thread.java:818)
09-08 12:45:49.692 1970 1992 W EGL_emulation egor.faceintro eglSurfaceAttrib not implemented
09-08 12:45:49.692 1970 1992 W OpenGLRenderer egor.faceintro Failed to set EGL_SWAP_BEHAVIOR on surface 0xeb922900, error=EGL_SUCCESS
09-08 12:45:51.863 1970 1992 W EGL_emulation egor.faceintro eglSurfaceAttrib not implemented
09-08 12:45:51.863 1970 1992 W OpenGLRenderer egor.faceintro Failed to set EGL_SWAP_BEHAVIOR on surface 0xef3632a0, error=EGL_SUCCESS
09-08 12:45:54.042 1970 1992 W EGL_emulation egor.faceintro eglSurfaceAttrib not implemented
09-08 12:45:54.042 1970 1992 W OpenGLRenderer egor.faceintro Failed to set EGL_SWAP_BEHAVIOR on surface 0xeb921d60, error=EGL_SUCCESS
09-08 12:45:55.445 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:45:55.595 501 840 D system HostConnection::get() New Host Connection established 0xdf392cd0, tid 840
09-08 12:45:55.615 569 569 E EGL_emulation tid 569: eglCreateSyncKHR(1215): error 0x3004 (EGL_BAD_ATTRIBUTE)
09-08 12:45:55.848 569 569 E EGL_emulation tid 569: eglCreateSyncKHR(1215): error 0x3004 (EGL_BAD_ATTRIBUTE)
09-08 12:45:55.877 569 569 D SurfaceFlinger setOrientation, mFbdev=0xf708c0c0, mFbDev->setOrientation=0x0, orientation=0
09-08 12:45:55.877 569 569 E SurfaceFlinger setOrientation: can't set orientation
09-08 12:45:55.879 501 791 I ActivityManager system Config changes=480 {1.0 310mcc270mnc en_US ldltr sw384dp w384dp h567dp 320dpi nrml port finger qwerty/v/v dpad/v s.8}
09-08 12:45:55.924 501 501 V ActivityManager system Display changed displayId=0
09-08 12:45:55.927 501 603 I InputReader system Reconfiguring input devices. changes=0x00000004
09-08 12:45:55.927 501 603 I InputReader system Device reconfigured: id=1, name='Genymotion Virtual Input', size 768x1280, orientation 0, mode 1, display id 0
09-08 12:45:55.930 501 523 W art system Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService.activityPaused(android.os.IBinder) from ActivityManagerService.java:6438 waiters=0 for 169ms
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier disableMessage: msg_type = 0x10
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier CAMERA_MSG_PREVIEW_FRAME
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier **** Currently enabled messages:
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier CAMERA_MSG_ERROR
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier CAMERA_MSG_FOCUS
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier CAMERA_MSG_ZOOM
09-08 12:45:55.952 124 622 V EmulatedCamera_CallbackNotifier CAMERA_MSG_PREVIEW_METADATA
09-08 12:45:55.952 124 622 V EmulatedCamera_Camera doStopPreview
09-08 12:45:55.952 124 622 V EmulatedCamera_Device stopDeliveringFrames
09-08 12:45:55.952 124 622 V EmulatedCamera_Device stopWorkerThread
09-08 12:45:55.952 124 622 V EmulatedCamera_Device Stopping emulated camera device's worker thread...
09-08 12:45:55.992 926 1107 W EGL_emulation com.android.launcher3 eglSurfaceAttrib not implemented
09-08 12:45:55.992 926 1107 W OpenGLRenderer com.android.launcher3 Failed to set EGL_SWAP_BEHAVIOR on surface 0xed2a0e80, error=EGL_SUCCESS
09-08 12:45:56.009 124 622 V EmulatedCamera_Device Emulated camera device's worker thread has been stopped.
09-08 12:45:56.009 124 622 V EmulatedCamera_GenyDevice stopDevice
09-08 12:45:56.011 124 622 V EmulatedCamera_GenyDevice stopDevice: Geny camera device 'front' is stopped
09-08 12:45:56.011 124 622 V EmulatedCamera_Preview stopPreview
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier disableMessage: msg_type = 0x10
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier CAMERA_MSG_PREVIEW_FRAME
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier **** Currently enabled messages:
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier CAMERA_MSG_ERROR
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier CAMERA_MSG_FOCUS
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier CAMERA_MSG_ZOOM
09-08 12:45:56.011 124 625 V EmulatedCamera_CallbackNotifier CAMERA_MSG_PREVIEW_METADATA
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier disableMessage: msg_type = 0xffff
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_ERROR
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_SHUTTER
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_FOCUS
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_ZOOM
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_PREVIEW_FRAME
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_VIDEO_FRAME
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_POSTVIEW_FRAME
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_RAW_IMAGE
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_COMPRESSED_IMAGE
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_RAW_IMAGE_NOTIFY
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier CAMERA_MSG_PREVIEW_METADATA
09-08 12:45:56.012 124 626 V EmulatedCamera_CallbackNotifier **** Currently enabled messages:
09-08 12:45:56.012 124 626 V EmulatedCamera_Camera doStopPreview
09-08 12:45:56.012 124 626 V EmulatedCamera_Camera cancelPicture
09-08 12:45:56.012 124 626 V EmulatedCamera_Camera releaseCamera
09-08 12:45:56.012 124 626 V EmulatedCamera_Camera doStopPreview
09-08 12:45:56.012 124 626 V EmulatedCamera_GenyDevice disconnectDevice
09-08 12:45:56.013 124 626 V EmulatedCamera_GenyDevice disconnectDevice: Disonnected from device 'front'
09-08 12:45:56.013 124 626 D HostConnection::get() New Host Connection established 0xf2d0e2e0, tid 626
09-08 12:45:56.014 124 626 V EmulatedCamera_Preview setPreviewWindow: current: 0xf2f1b1d0 -> new: 0x0
09-08 12:45:56.014 124 626 I CameraClient Destroying camera 1
09-08 12:45:56.014 124 626 V EmulatedCamera_Camera closeCamera
09-08 12:45:56.014 124 626 V EmulatedCamera_Camera doStopPreview
09-08 12:45:56.014 124 622 D NuPlayerDriver reset(0xf310c280)
09-08 12:45:56.015 124 1996 D NuPlayerDriver notifyResetComplete(0xf310c280)
09-08 12:45:56.017 124 622 D NuPlayerDriver reset(0xf310c1c0)
09-08 12:45:56.017 124 1998 D NuPlayerDriver notifyResetComplete(0xf310c1c0)
09-08 12:45:56.022 659 1174 W EGL_emulation com.android.systemui eglSurfaceAttrib not implemented
09-08 12:45:56.022 659 1174 W OpenGLRenderer com.android.systemui Failed to set EGL_SWAP_BEHAVIOR on surface 0xef607ee0, error=EGL_SUCCESS
09-08 12:45:56.093 659 1174 W EGL_emulation com.android.systemui eglSurfaceAttrib not implemented
09-08 12:45:56.093 659 1174 W OpenGLRenderer com.android.systemui Failed to set EGL_SWAP_BEHAVIOR on surface 0xef607f00, error=EGL_SUCCESS
09-08 12:45:56.108 501 528 I WindowManager system Screen frozen for +327ms due to Window{192beb59 u0 NavigationBar}
09-08 12:45:56.145 501 518 I ActivityManager system Killing 958:com.android.printspooler/u0a50 (adj 15): empty #17
09-08 12:45:56.145 501 518 W libprocessgroup system failed to open /acct/uid_10050/pid_958/cgroup.procs: No such file or directory
09-08 12:45:56.168 501 517 W libprocessgroup system failed to open /acct/uid_10050/pid_958/cgroup.procs: No such file or directory
09-08 12:45:56.429 1281 1762 W EGL_emulation com.aide.ui eglSurfaceAttrib not implemented
09-08 12:45:56.429 1281 1762 W OpenGLRenderer com.aide.ui Failed to set EGL_SWAP_BEHAVIOR on surface 0xe017f060, error=EGL_SUCCESS
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{1211eaae V.ED.... ......ID 110,13-239,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{227e03dc V.ED.... ......ID 110,13-160,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{3c34e5ef V.ED.... ......ID 110,13-160,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{17b6204f V.ED.... ......ID 110,13-263,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{66ee8fc V.ED.... ......ID 110,13-223,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{2993f20b V.ED.... ......ID 110,13-414,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{371e2b85 V.ED.... ......ID 110,13-329,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.461 1281 1281 W View com.aide.ui requestLayout() improperly called by android.widget.TextView{16f93dda V.ED.... ......ID 110,13-369,56 #7f0800a7 app:id/filebrowserEntryName} during layout: running second layout pass
09-08 12:45:56.542 1970 1970 W IInputConnectionWrapper egor.faceintro showStatusIcon on inactive InputConnection
09-08 12:45:58.188 501 528 I art system Explicit concurrent mark sweep GC freed 24601(1287KB) AllocSpace objects, 2(672KB) LOS objects, 33% free, 8MB/13MB, paused 380us total 25.980ms
09-08 12:45:58.341 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:45:58.648 1281 1762 W EGL_emulation com.aide.ui eglSurfaceAttrib not implemented
09-08 12:45:58.648 1281 1762 W OpenGLRenderer com.aide.ui Failed to set EGL_SWAP_BEHAVIOR on surface 0xdbde90c0, error=EGL_SUCCESS
09-08 12:45:59.084 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:45:59.325 501 518 W InputMethodManagerService system Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@3ef4d27c attribute=null, token = android.os.BinderProxy@242f22ca
09-08 12:45:59.805 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:46:00.115 1281 1762 W EGL_emulation com.aide.ui eglSurfaceAttrib not implemented
09-08 12:46:00.115 1281 1762 W OpenGLRenderer com.aide.ui Failed to set EGL_SWAP_BEHAVIOR on surface 0xe0886520, error=EGL_SUCCESS
09-08 12:46:01.067 1970 1982 D MPEG4Writer egor.faceintro Video track stopping
09-08 12:46:01.067 1970 1982 D MPEG4Writer egor.faceintro Audio track stopping
09-08 12:46:01.067 1970 1982 D egor.faceintro HostConnection::get() New Host Connection established 0xe3e0bdf0, tid 1982
09-08 12:46:01.288 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:46:01.385 1281 1762 W EGL_emulation com.aide.ui eglSurfaceAttrib not implemented
09-08 12:46:01.385 1281 1762 W OpenGLRenderer com.aide.ui Failed to set EGL_SWAP_BEHAVIOR on surface 0xe0886520, error=EGL_SUCCESS
09-08 12:46:01.409 501 915 W InputMethodManagerService system Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@1d2f9e81 attribute=null, token = android.os.BinderProxy@242f22ca
09-08 12:46:02.845 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:46:02.896 501 784 W InputMethodManagerService system Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@857fb26 attribute=null, token = android.os.BinderProxy@242f22ca
09-08 12:46:03.057 2109 2109 D AndroidRuntime
09-08 12:46:03.057 2109 2109 D AndroidRuntime >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-08 12:46:03.059 2109 2109 D AndroidRuntime CheckJNI is OFF
09-08 12:46:03.103 2109 2109 E memtrack Couldn't load memtrack module (No such file or directory)
09-08 12:46:03.103 2109 2109 E android.os.Debug failed to load memtrack module: -2
09-08 12:46:03.114 2109 2109 D AndroidRuntime Calling main entry com.android.commands.am.Am
09-08 12:46:03.131 2109 2109 D AndroidRuntime Shutting down VM
09-08 12:46:50.612 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:47:03.229 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:47:20.403 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:49:56.825 501 619 W AudioTrack system AUDIO_OUTPUT_FLAG_FAST denied by client
09-08 12:49:57.038 501 619 W

About video rotate

hi,I have a problem when i using this lib。

My src video is rotate=90,but composer file is alway rotate=0.

I access code,in class Mp4Composer line 173, the output rotate will add src rotate and setting rotate.

I think there's a problem here.

Trim?

Hi. this is a very good library but I with it has trim feature too.

Common filters between libraries

Seems like you use the same GlFilter in another libraries, but they are incompatible because have different package name. It is possible to place all GlFilter children in the same package or maybe in another library?

I meet issues when tried to apply com.daasuu.gpuv.egl.filter.GlFilter instead of com.daasuu.mp4compose.filter.GlFilter

Cannot apply fillMode as PRESERVE_ASPECT_CROP if fillModeCustomItem is null.

Hello,

First I want to thanks for your library.

But I was with some mistakes to apply fillMode as CROP in to decode/encode the video. I have verified that your math should be right when CROP enum was defined, but after more time in debug I saw that in MP4Composer when I have a null fillModeCustomItem it will always set fillMode to FIT otherwise to CUSTOM, so it will never be CROP.

If I change the enum to CROP after that validation, the video will be encoded as well.

I have made a fork to change that and use it in my project. Should I create a PR to it?

Thanks

FillMode center crop does not working

While we set the FilleMode(FillMode.PRESERVE_ASPECT_CROP) it does pick the video from the center I think it is not working correctly because Center crop meaning is to crop the resource from center

Adding GlFilterGroup

Is GlFilterGroup high on your priorities to add to the library? How would you go about implementing it? Based on ExoPlayerFilters, we would need to switch to using FBO's instead of passing SurfaceTexture to draw, right?

Composer is not cancelled

Hey,
Thank you for writing this library, it's super helpful.
I use version v0.3.4 and I've noticed that after calling composer.cancel() listener is still emitting progress values in onProgress() until I keep the app alive.
It may be that I call cancel on different thread that composer is operating, does it matter?

Stretch video

When i rotate video to 45 degree video get stretched height but width is ok

samsun j7 max FHD video watermark issue

E/Mp4Composer: This devicel cannot codec with that setting. Check width, height, bitrate and video format.
android.media.MediaCodec$CodecException: Error 0xffffec77
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:1943)
at android.media.MediaCodec.configure(MediaCodec.java:1872)
at com.daasuu.mp4compose.composer.VideoComposer.setUp(VideoComposer.java:108)
at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:109)
at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

Suggestion: Apply multiple filters in chain

Hello,
I have a suggestion that I think improve quality of the library. Right now we can only apply one filter. How about we chain them by making the output of one frame to input of another filter?

Not working on 1920x1080

I try to process a video with the resolution 1920x1080 captured from camera and has the error:

2019-02-09 19:21:33.761 11035-11704/ru.myapp.app E/ACodec:  configureCodec multi window instance fail  appPid : 11035
2019-02-09 19:21:33.765 11035-11704/ru.myapp.app E/ACodec: [OMX.qcom.video.decoder.avc] configureCodec returning error -5001
2019-02-09 19:21:33.765 11035-11704/ru.myapp.app E/ACodec: signalError(omxError 0x80001001, internalError -5001)
2019-02-09 19:21:33.765 11035-11703/ru.myapp.app E/MediaCodec: Codec reported err 0xffffec77, actionCode 0, while in state 3
2019-02-09 19:21:33.767 11035-11689/ru.myapp.app E/MediaCodec: configure failed with err 0xffffec77, resetting...

Mp4Composer.Listener.onFailed() called with Exception:

    android.media.MediaCodec$CodecException: Error 0xffffec77
        at android.media.MediaCodec.native_configure(Native Method)
        at android.media.MediaCodec.configure(MediaCodec.java:1884)
        at com.daasuu.mp4compose.composer.VideoComposer.setUp(VideoComposer.java:97)
        at com.daasuu.mp4compose.composer.Mp4ComposerEngine.compose(Mp4ComposerEngine.java:104)
        at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:196)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:762)

It's all ok with the resolution 1280x720.
Samsung Galaxy J5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.