-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
illegalstateexception : Failed to add the track to the muxer while replacing audio of video #245
Comments
It works with AAC file but not an Mp3 file |
Audio track encoding has to be compatible with H.264/AVC encoding. That is why AAC works and MP3 doesn't. |
Can you provide some sample how we do this. I am trying to add overlay audio over video which previously contains some audio , It created a mp4 file with no video and the new audio removing old auido, can you guide me what needs to be changed, I am trying this code Also this has been requested earlier by other developers, please provide documentation for various use cases, the demo files are good but better documentation like simple samples with just the uri to be used and mediaTransformer and various parameters it needs will be helpful, we have to go through demo code and try to modify it . For novice developers like me the learning curve gets a bit steep for some of the complex execution of this great library.
|
I am Trying this code Trying to replace the audio of a Video , both the files have sound
I am getting this error
illegalstateexception : Failed to add the track to the muxer
Also how can we overlay audio keeping video's audio modifying the below code (I want to pass just the URI's, i have referred the demo code , but I have never used databinding and dnot plan to use it a simple implementation example will be helpful)
Unsupported mime 'audio/mpeg'
2023-01-22 11:31:41.946 5631-8853 TransformationJob com.own.litrown E Transformation job error
java.lang.IllegalStateException: Failed to add the track to the muxer
at android.media.MediaMuxer.nativeAddTrack(Native Method)
at android.media.MediaMuxer.addTrack(MediaMuxer.java:658)
at com.linkedin.android.litr.io.MediaMuxerMediaTarget.addTrack(MediaMuxerMediaTarget.java:116)
at com.linkedin.android.litr.transcoder.PassthroughTranscoder.processNextFrame(PassthroughTranscoder.java:79)
at com.linkedin.android.litr.TransformationJob.processNextFrame(TransformationJob.java:211)
at com.linkedin.android.litr.TransformationJob.transform(TransformationJob.java:108)
at com.linkedin.android.litr.TransformationJob.run(TransformationJob.java:77)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
The text was updated successfully, but these errors were encountered: