如何从 Android 中的视频文件分离音频流比特率?

How to detach audio stream bitrate from video file in Android?

我想从视频文件中获取音频比特率并保存。 是否可以使用 ffmpeg 从视频文件中单独获取音轨比特率?
如果可能的话该怎么做?...任何建议将不胜感激。

也许这对你有帮助:

    @Override
    public void onProgress(String message) {

        Log.e("ryeure", "onProgress: ");


        String findWithinHorizon = new Scanner(message).findWithinHorizon(Pattern.compile(".?fltp,\s([0-9]*)\skb/s"), 0);

        Log.e("ryeure", "onProgress: findwithinhorizon---" + findWithinHorizon);


        if (findWithinHorizon != null) {
            String intValue = findWithinHorizon.replaceAll("[^0-9]", "");

            result_audioBitrate = Integer.parseInt(intValue) * 1000;
        }

    }

    @Override
    public void onFailure(String message) {

        Log.e("ryeure", "onFailure: onfailure--" + result_audioBitrate);


        audio_origin_bitrate.setText("Origin bitrate : " + result_audioBitrate + " kb/s");
        audio_new_bitrate.setText("New bitrate : " + result_audioBitrate + " kb/s");
    }