24kHz audio file problem: unsupported bitrate 64000












-1















I use alexa audio tags a lot. I know that now audio tags support 24kHz audio files so tried converting my audio files from 16kHz. I used the provided command in the docs to do so:



ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 <output-file.mp3>


But when I try to play this file, I get an invalid response error, saying: Error: The audio is of an unsupported bitrate 64000. By looking into file details I clearly see, that bitrate is 48kbps and sample rate is 24kHz. I don't see any value where it would say 64 or anything close to it.



If I encode my file back to 16kHz it plays fine again.



It seems that there is a problem with this command, because if I encode my files using audacity, they work with 24kHz. I still would prefer to use ffmpeg, because I need to encode a lot of files.



I am asking, not about file format, format is correct. I need files in 24kHz sample rate and that is what causes issues. I saw another question about similar problem and others having the discussion there about sample rates, but no one was able to encode file to be 24kHz using ffmpeg.



Did anyone had any luck on encoding files to 24kHz using ffmpeg?










share|improve this question

























  • Possible duplicate of What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

    – szatmary
    Nov 26 '18 at 14:11











  • That question asks about format MPEG. I ask about bit rate, these are two separate issues, even though I see that some users discussed this there, but still, question was about different thing and there was no answer given regarding bit rate.

    – R. Vait
    Nov 26 '18 at 14:19








  • 1





    I'm not exactly sure why you want to resample from a 16kHz source to 24kHz. Anyway, try adding the -abr 1 output option. For such low bitrates using LAME's average bitrate mode is the recommended method according to hydrogenaud.io. If that doesn't work try using lame itself.

    – llogan
    Nov 26 '18 at 18:37








  • 1





    @R.Vait Also try the -write_xing 0 output option in ffmpeg, although I doubt it will help in this case.

    – llogan
    Nov 27 '18 at 19:28








  • 1





    If you use @LordNeckbeard I will be notified of your replies (this isn't necessary in all situations so refer to help center for more info). I'm not sure of the technical reasons for that behavior: never got motivated to looked into it, but there are some related bug reports: #2697, #3599, #4214.

    – llogan
    Nov 28 '18 at 19:28
















-1















I use alexa audio tags a lot. I know that now audio tags support 24kHz audio files so tried converting my audio files from 16kHz. I used the provided command in the docs to do so:



ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 <output-file.mp3>


But when I try to play this file, I get an invalid response error, saying: Error: The audio is of an unsupported bitrate 64000. By looking into file details I clearly see, that bitrate is 48kbps and sample rate is 24kHz. I don't see any value where it would say 64 or anything close to it.



If I encode my file back to 16kHz it plays fine again.



It seems that there is a problem with this command, because if I encode my files using audacity, they work with 24kHz. I still would prefer to use ffmpeg, because I need to encode a lot of files.



I am asking, not about file format, format is correct. I need files in 24kHz sample rate and that is what causes issues. I saw another question about similar problem and others having the discussion there about sample rates, but no one was able to encode file to be 24kHz using ffmpeg.



Did anyone had any luck on encoding files to 24kHz using ffmpeg?










share|improve this question

























  • Possible duplicate of What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

    – szatmary
    Nov 26 '18 at 14:11











  • That question asks about format MPEG. I ask about bit rate, these are two separate issues, even though I see that some users discussed this there, but still, question was about different thing and there was no answer given regarding bit rate.

    – R. Vait
    Nov 26 '18 at 14:19








  • 1





    I'm not exactly sure why you want to resample from a 16kHz source to 24kHz. Anyway, try adding the -abr 1 output option. For such low bitrates using LAME's average bitrate mode is the recommended method according to hydrogenaud.io. If that doesn't work try using lame itself.

    – llogan
    Nov 26 '18 at 18:37








  • 1





    @R.Vait Also try the -write_xing 0 output option in ffmpeg, although I doubt it will help in this case.

    – llogan
    Nov 27 '18 at 19:28








  • 1





    If you use @LordNeckbeard I will be notified of your replies (this isn't necessary in all situations so refer to help center for more info). I'm not sure of the technical reasons for that behavior: never got motivated to looked into it, but there are some related bug reports: #2697, #3599, #4214.

    – llogan
    Nov 28 '18 at 19:28














-1












-1








-1








I use alexa audio tags a lot. I know that now audio tags support 24kHz audio files so tried converting my audio files from 16kHz. I used the provided command in the docs to do so:



ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 <output-file.mp3>


But when I try to play this file, I get an invalid response error, saying: Error: The audio is of an unsupported bitrate 64000. By looking into file details I clearly see, that bitrate is 48kbps and sample rate is 24kHz. I don't see any value where it would say 64 or anything close to it.



If I encode my file back to 16kHz it plays fine again.



It seems that there is a problem with this command, because if I encode my files using audacity, they work with 24kHz. I still would prefer to use ffmpeg, because I need to encode a lot of files.



I am asking, not about file format, format is correct. I need files in 24kHz sample rate and that is what causes issues. I saw another question about similar problem and others having the discussion there about sample rates, but no one was able to encode file to be 24kHz using ffmpeg.



Did anyone had any luck on encoding files to 24kHz using ffmpeg?










share|improve this question
















I use alexa audio tags a lot. I know that now audio tags support 24kHz audio files so tried converting my audio files from 16kHz. I used the provided command in the docs to do so:



ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 <output-file.mp3>


But when I try to play this file, I get an invalid response error, saying: Error: The audio is of an unsupported bitrate 64000. By looking into file details I clearly see, that bitrate is 48kbps and sample rate is 24kHz. I don't see any value where it would say 64 or anything close to it.



If I encode my file back to 16kHz it plays fine again.



It seems that there is a problem with this command, because if I encode my files using audacity, they work with 24kHz. I still would prefer to use ffmpeg, because I need to encode a lot of files.



I am asking, not about file format, format is correct. I need files in 24kHz sample rate and that is what causes issues. I saw another question about similar problem and others having the discussion there about sample rates, but no one was able to encode file to be 24kHz using ffmpeg.



Did anyone had any luck on encoding files to 24kHz using ffmpeg?







audio ffmpeg alexa






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 14:40







R. Vait

















asked Nov 26 '18 at 8:37









R. VaitR. Vait

1841113




1841113













  • Possible duplicate of What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

    – szatmary
    Nov 26 '18 at 14:11











  • That question asks about format MPEG. I ask about bit rate, these are two separate issues, even though I see that some users discussed this there, but still, question was about different thing and there was no answer given regarding bit rate.

    – R. Vait
    Nov 26 '18 at 14:19








  • 1





    I'm not exactly sure why you want to resample from a 16kHz source to 24kHz. Anyway, try adding the -abr 1 output option. For such low bitrates using LAME's average bitrate mode is the recommended method according to hydrogenaud.io. If that doesn't work try using lame itself.

    – llogan
    Nov 26 '18 at 18:37








  • 1





    @R.Vait Also try the -write_xing 0 output option in ffmpeg, although I doubt it will help in this case.

    – llogan
    Nov 27 '18 at 19:28








  • 1





    If you use @LordNeckbeard I will be notified of your replies (this isn't necessary in all situations so refer to help center for more info). I'm not sure of the technical reasons for that behavior: never got motivated to looked into it, but there are some related bug reports: #2697, #3599, #4214.

    – llogan
    Nov 28 '18 at 19:28



















  • Possible duplicate of What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

    – szatmary
    Nov 26 '18 at 14:11











  • That question asks about format MPEG. I ask about bit rate, these are two separate issues, even though I see that some users discussed this there, but still, question was about different thing and there was no answer given regarding bit rate.

    – R. Vait
    Nov 26 '18 at 14:19








  • 1





    I'm not exactly sure why you want to resample from a 16kHz source to 24kHz. Anyway, try adding the -abr 1 output option. For such low bitrates using LAME's average bitrate mode is the recommended method according to hydrogenaud.io. If that doesn't work try using lame itself.

    – llogan
    Nov 26 '18 at 18:37








  • 1





    @R.Vait Also try the -write_xing 0 output option in ffmpeg, although I doubt it will help in this case.

    – llogan
    Nov 27 '18 at 19:28








  • 1





    If you use @LordNeckbeard I will be notified of your replies (this isn't necessary in all situations so refer to help center for more info). I'm not sure of the technical reasons for that behavior: never got motivated to looked into it, but there are some related bug reports: #2697, #3599, #4214.

    – llogan
    Nov 28 '18 at 19:28

















Possible duplicate of What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

– szatmary
Nov 26 '18 at 14:11





Possible duplicate of What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

– szatmary
Nov 26 '18 at 14:11













That question asks about format MPEG. I ask about bit rate, these are two separate issues, even though I see that some users discussed this there, but still, question was about different thing and there was no answer given regarding bit rate.

– R. Vait
Nov 26 '18 at 14:19







That question asks about format MPEG. I ask about bit rate, these are two separate issues, even though I see that some users discussed this there, but still, question was about different thing and there was no answer given regarding bit rate.

– R. Vait
Nov 26 '18 at 14:19






1




1





I'm not exactly sure why you want to resample from a 16kHz source to 24kHz. Anyway, try adding the -abr 1 output option. For such low bitrates using LAME's average bitrate mode is the recommended method according to hydrogenaud.io. If that doesn't work try using lame itself.

– llogan
Nov 26 '18 at 18:37







I'm not exactly sure why you want to resample from a 16kHz source to 24kHz. Anyway, try adding the -abr 1 output option. For such low bitrates using LAME's average bitrate mode is the recommended method according to hydrogenaud.io. If that doesn't work try using lame itself.

– llogan
Nov 26 '18 at 18:37






1




1





@R.Vait Also try the -write_xing 0 output option in ffmpeg, although I doubt it will help in this case.

– llogan
Nov 27 '18 at 19:28







@R.Vait Also try the -write_xing 0 output option in ffmpeg, although I doubt it will help in this case.

– llogan
Nov 27 '18 at 19:28






1




1





If you use @LordNeckbeard I will be notified of your replies (this isn't necessary in all situations so refer to help center for more info). I'm not sure of the technical reasons for that behavior: never got motivated to looked into it, but there are some related bug reports: #2697, #3599, #4214.

– llogan
Nov 28 '18 at 19:28





If you use @LordNeckbeard I will be notified of your replies (this isn't necessary in all situations so refer to help center for more info). I'm not sure of the technical reasons for that behavior: never got motivated to looked into it, but there are some related bug reports: #2697, #3599, #4214.

– llogan
Nov 28 '18 at 19:28












1 Answer
1






active

oldest

votes


















0














Thanks LordNeckbeard for the suggestion to use lame instead of ffmpeg.
So in order to encode files and have them in 24kHz you can use this command:



lame -b48 --resample 24 input.mp3 output.mp3


Alexa doesn't complain about files encoded like this. Also as mentioned in the question, you can still use audacity, but I prefer to use CLI, because I always have to encode batch of files.



Still if anyone figures out how to do it with ffmpeg please share it.



EDIT:



Thanks again to LordNeckbeard for the suggestion to add -write_xing 0 flag to ffmpeg command, now it works too.



The command to achieve 24kHz audio files with ffmpeg is:



ffmpeg -i input.mp3 -codec:a libmp3lame -ac 2 -ar 24000 -b:a 48k -write_xing 0 output.mp3





share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53477305%2f24khz-audio-file-problem-unsupported-bitrate-64000%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Thanks LordNeckbeard for the suggestion to use lame instead of ffmpeg.
    So in order to encode files and have them in 24kHz you can use this command:



    lame -b48 --resample 24 input.mp3 output.mp3


    Alexa doesn't complain about files encoded like this. Also as mentioned in the question, you can still use audacity, but I prefer to use CLI, because I always have to encode batch of files.



    Still if anyone figures out how to do it with ffmpeg please share it.



    EDIT:



    Thanks again to LordNeckbeard for the suggestion to add -write_xing 0 flag to ffmpeg command, now it works too.



    The command to achieve 24kHz audio files with ffmpeg is:



    ffmpeg -i input.mp3 -codec:a libmp3lame -ac 2 -ar 24000 -b:a 48k -write_xing 0 output.mp3





    share|improve this answer






























      0














      Thanks LordNeckbeard for the suggestion to use lame instead of ffmpeg.
      So in order to encode files and have them in 24kHz you can use this command:



      lame -b48 --resample 24 input.mp3 output.mp3


      Alexa doesn't complain about files encoded like this. Also as mentioned in the question, you can still use audacity, but I prefer to use CLI, because I always have to encode batch of files.



      Still if anyone figures out how to do it with ffmpeg please share it.



      EDIT:



      Thanks again to LordNeckbeard for the suggestion to add -write_xing 0 flag to ffmpeg command, now it works too.



      The command to achieve 24kHz audio files with ffmpeg is:



      ffmpeg -i input.mp3 -codec:a libmp3lame -ac 2 -ar 24000 -b:a 48k -write_xing 0 output.mp3





      share|improve this answer




























        0












        0








        0







        Thanks LordNeckbeard for the suggestion to use lame instead of ffmpeg.
        So in order to encode files and have them in 24kHz you can use this command:



        lame -b48 --resample 24 input.mp3 output.mp3


        Alexa doesn't complain about files encoded like this. Also as mentioned in the question, you can still use audacity, but I prefer to use CLI, because I always have to encode batch of files.



        Still if anyone figures out how to do it with ffmpeg please share it.



        EDIT:



        Thanks again to LordNeckbeard for the suggestion to add -write_xing 0 flag to ffmpeg command, now it works too.



        The command to achieve 24kHz audio files with ffmpeg is:



        ffmpeg -i input.mp3 -codec:a libmp3lame -ac 2 -ar 24000 -b:a 48k -write_xing 0 output.mp3





        share|improve this answer















        Thanks LordNeckbeard for the suggestion to use lame instead of ffmpeg.
        So in order to encode files and have them in 24kHz you can use this command:



        lame -b48 --resample 24 input.mp3 output.mp3


        Alexa doesn't complain about files encoded like this. Also as mentioned in the question, you can still use audacity, but I prefer to use CLI, because I always have to encode batch of files.



        Still if anyone figures out how to do it with ffmpeg please share it.



        EDIT:



        Thanks again to LordNeckbeard for the suggestion to add -write_xing 0 flag to ffmpeg command, now it works too.



        The command to achieve 24kHz audio files with ffmpeg is:



        ffmpeg -i input.mp3 -codec:a libmp3lame -ac 2 -ar 24000 -b:a 48k -write_xing 0 output.mp3






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 28 '18 at 9:42

























        answered Nov 27 '18 at 12:18









        R. VaitR. Vait

        1841113




        1841113
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53477305%2f24khz-audio-file-problem-unsupported-bitrate-64000%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Create new schema in PostgreSQL using DBeaver

            Deepest pit of an array with Javascript: test on Codility

            Costa Masnaga