首页 > 解决方案 > java.lang.RuntimeException:MediaMuxer 创建失败

问题描述

android 9 版本出现以下错误,但所有其他版本都可以正常工作。

java.lang.RuntimeException: MediaMuxer creation failed

这是我的java代码。

String outputPath = mOutputPath;
Log.d(TAG, "output file is " + outputPath);

try {
    mMuxer = new MediaMuxer(outputPath, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4);
} catch (IOException ioe) {
    throw new RuntimeException("MediaMuxer creation failed", ioe);
}

标签: javaandroid

解决方案


推荐阅读