Skip to content
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

Default encoder for format amr (codec amr_nb) is probably disabled. Please choose an encoder manually. #265

Open
HappyWYQ opened this issue Apr 19, 2024 · 0 comments

Comments

@HappyWYQ
Copy link

how to enable amr encoder when using version 3.5.0?

version 3.5.0 occured this error,but version 3.1.1 is ok.
11:00:34.733 [main] DEBUG ws.schild.jave.ConversionOutputAnalyzer - Input Line (5): <Automatic encoder selection failed for output stream #0:0. Default encoder for format amr (codec amr_nb) is probably disabled. Please choose an encoder manually.>

this is my java code

            //Audio Attributes
            AudioAttributes audio = new AudioAttributes();

// audio.setCodec("libmp3lame");
// audio.setCodec("libopencore_amrnb");
audio.setBitRate(12200);
audio.setChannels(1);
audio.setSamplingRate(8000);

            //Encoding attributes
            EncodingAttributes attrs = new EncodingAttributes();
            attrs.setInputFormat("amr");
            attrs.setOutputFormat("amr");
            attrs.setAudioAttributes(audio);

            //Encode
            String[] audioEncoders = encoder.getAudioEncoders();
            System.out.println("======="+JSONObject.toJSONString(audioEncoders));
            encoder.encode(new MultimediaObject(source), target, attrs);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant