1

Video Compression Sample 视频压缩过程成功完成。但是压缩后的视频丢失了音频。

这个问题已经在 GitHub 问题中得到解答。 声音压缩后消失。答案是添加这样的依赖项。

implementation (group: 'com.googlecode.mp4parser', name: 'isoparser', version: '1.0.6') {force = true}

但这并不能解决音频问题

我试过的

{
    compile 'life.knowledge4:k4l-video-trimmer:1.0'
    compile 'org.mp4parser:isoparser:1.9.27'
}

运行时错误

Error: Program type already present: org.mp4parser.aspectj.internal.lang.annotation.ajcDeclarePrecedence

详细描述

Program type already present: org.mp4parser.aspectj.internal.lang.annotation.ajcDeclarePrecedence
    at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
    at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:101)
    at com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:122)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
    ... 49 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
    at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:65)
    at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43)
    at com.android.tools.r8.D8.run(D8.java:90)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:115)
    ... 54 more
Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: org.mp4parser.aspectj.internal.lang.annotation.ajcDeclarePrecedence
    at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116)
    at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74)
    at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:59)
    ... 57 more
4

1 回答 1

0

我在视频压缩器上试过这个SiliCompressor,效果很好,在这个版本中音频和视频运行良好。

https://github.com/Tourenathan-G5organisation/SiliCompressor/tree/v2.2.2

于 2020-04-16T12:32:26.157 回答