How to extract aac audio from an mp4 file to m4a












11














How can I extract the aac audio from an mp4 file?



I tried with ffmpeg and -acodec copy but if i use mp4 as output it will still encode the video and I get the same file size.



If I use m4a as output it will somehow still encode the video and I get almost the same filesize.



With aac as output I can't open the file in puddletag although the file size suggests the video was stripped



Thanks in advance










share|improve this question





























    11














    How can I extract the aac audio from an mp4 file?



    I tried with ffmpeg and -acodec copy but if i use mp4 as output it will still encode the video and I get the same file size.



    If I use m4a as output it will somehow still encode the video and I get almost the same filesize.



    With aac as output I can't open the file in puddletag although the file size suggests the video was stripped



    Thanks in advance










    share|improve this question



























      11












      11








      11


      6





      How can I extract the aac audio from an mp4 file?



      I tried with ffmpeg and -acodec copy but if i use mp4 as output it will still encode the video and I get the same file size.



      If I use m4a as output it will somehow still encode the video and I get almost the same filesize.



      With aac as output I can't open the file in puddletag although the file size suggests the video was stripped



      Thanks in advance










      share|improve this question















      How can I extract the aac audio from an mp4 file?



      I tried with ffmpeg and -acodec copy but if i use mp4 as output it will still encode the video and I get the same file size.



      If I use m4a as output it will somehow still encode the video and I get almost the same filesize.



      With aac as output I can't open the file in puddletag although the file size suggests the video was stripped



      Thanks in advance







      ffmpeg avconv mp4 aac






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 31 '16 at 15:00

























      asked Mar 22 '14 at 16:59









      Turtlepurple

      4711614




      4711614






















          3 Answers
          3






          active

          oldest

          votes


















          18














          I finally found the solution myself in using mp4 or m4a as output format and adding -vn to prevent also copying the video.



          ffmpeg -i input.mp4 -vn -c:a copy output.m4a


          (Source: https://superuser.com/a/706622/180675)



          Seems simple now :]



          Fast and lossless stripping






          share|improve this answer































            3














            Another option:



            MP4Box -add infile.mp4#audio outfile.m4a


            MP4Box is part of the gpac package.






            share|improve this answer





























              0














              Just for fun, you can also do it by using vlc. The script below strips all *.mp4 files in the current directory to *.m4a. There are some error messages which can be ignored.



              #!/bin/bash

              quote="
              executable="/usr/bin/vlc"
              argument3=vlc://quit

              #parameters
              accessvalue=file
              muxvalue=mp4

              for x in *.mp4; do
              inputname="${x}"
              strippedname=${x%.mp4}
              outputname=${strippedname}.m4a
              quote_outputname=${quote}./${outputname}${quote}
              echo ${inputname}
              echo ${quote_outputname}
              qtranscode=#transcode{vcodec=none}: # rm this commnt, cont' nxt line !!
              standard{access=$accessvalue,mux=$muxvalue,dst=${quote_outputname}}
              argument1="$inputname"
              argument2=--sout=$qtranscode
              "$executable" -I dummy "$argument1" "$argument2" "$argument3"
              done





              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "89"
                };
                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%2faskubuntu.com%2fquestions%2f437798%2fhow-to-extract-aac-audio-from-an-mp4-file-to-m4a%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                18














                I finally found the solution myself in using mp4 or m4a as output format and adding -vn to prevent also copying the video.



                ffmpeg -i input.mp4 -vn -c:a copy output.m4a


                (Source: https://superuser.com/a/706622/180675)



                Seems simple now :]



                Fast and lossless stripping






                share|improve this answer




























                  18














                  I finally found the solution myself in using mp4 or m4a as output format and adding -vn to prevent also copying the video.



                  ffmpeg -i input.mp4 -vn -c:a copy output.m4a


                  (Source: https://superuser.com/a/706622/180675)



                  Seems simple now :]



                  Fast and lossless stripping






                  share|improve this answer


























                    18












                    18








                    18






                    I finally found the solution myself in using mp4 or m4a as output format and adding -vn to prevent also copying the video.



                    ffmpeg -i input.mp4 -vn -c:a copy output.m4a


                    (Source: https://superuser.com/a/706622/180675)



                    Seems simple now :]



                    Fast and lossless stripping






                    share|improve this answer














                    I finally found the solution myself in using mp4 or m4a as output format and adding -vn to prevent also copying the video.



                    ffmpeg -i input.mp4 -vn -c:a copy output.m4a


                    (Source: https://superuser.com/a/706622/180675)



                    Seems simple now :]



                    Fast and lossless stripping







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 22 at 17:28









                    Martin Thornton

                    2,51751830




                    2,51751830










                    answered Mar 22 '14 at 16:59









                    Turtlepurple

                    4711614




                    4711614

























                        3














                        Another option:



                        MP4Box -add infile.mp4#audio outfile.m4a


                        MP4Box is part of the gpac package.






                        share|improve this answer


























                          3














                          Another option:



                          MP4Box -add infile.mp4#audio outfile.m4a


                          MP4Box is part of the gpac package.






                          share|improve this answer
























                            3












                            3








                            3






                            Another option:



                            MP4Box -add infile.mp4#audio outfile.m4a


                            MP4Box is part of the gpac package.






                            share|improve this answer












                            Another option:



                            MP4Box -add infile.mp4#audio outfile.m4a


                            MP4Box is part of the gpac package.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jun 4 '14 at 16:58









                            ʇsәɹoɈ

                            20917




                            20917























                                0














                                Just for fun, you can also do it by using vlc. The script below strips all *.mp4 files in the current directory to *.m4a. There are some error messages which can be ignored.



                                #!/bin/bash

                                quote="
                                executable="/usr/bin/vlc"
                                argument3=vlc://quit

                                #parameters
                                accessvalue=file
                                muxvalue=mp4

                                for x in *.mp4; do
                                inputname="${x}"
                                strippedname=${x%.mp4}
                                outputname=${strippedname}.m4a
                                quote_outputname=${quote}./${outputname}${quote}
                                echo ${inputname}
                                echo ${quote_outputname}
                                qtranscode=#transcode{vcodec=none}: # rm this commnt, cont' nxt line !!
                                standard{access=$accessvalue,mux=$muxvalue,dst=${quote_outputname}}
                                argument1="$inputname"
                                argument2=--sout=$qtranscode
                                "$executable" -I dummy "$argument1" "$argument2" "$argument3"
                                done





                                share|improve this answer




























                                  0














                                  Just for fun, you can also do it by using vlc. The script below strips all *.mp4 files in the current directory to *.m4a. There are some error messages which can be ignored.



                                  #!/bin/bash

                                  quote="
                                  executable="/usr/bin/vlc"
                                  argument3=vlc://quit

                                  #parameters
                                  accessvalue=file
                                  muxvalue=mp4

                                  for x in *.mp4; do
                                  inputname="${x}"
                                  strippedname=${x%.mp4}
                                  outputname=${strippedname}.m4a
                                  quote_outputname=${quote}./${outputname}${quote}
                                  echo ${inputname}
                                  echo ${quote_outputname}
                                  qtranscode=#transcode{vcodec=none}: # rm this commnt, cont' nxt line !!
                                  standard{access=$accessvalue,mux=$muxvalue,dst=${quote_outputname}}
                                  argument1="$inputname"
                                  argument2=--sout=$qtranscode
                                  "$executable" -I dummy "$argument1" "$argument2" "$argument3"
                                  done





                                  share|improve this answer


























                                    0












                                    0








                                    0






                                    Just for fun, you can also do it by using vlc. The script below strips all *.mp4 files in the current directory to *.m4a. There are some error messages which can be ignored.



                                    #!/bin/bash

                                    quote="
                                    executable="/usr/bin/vlc"
                                    argument3=vlc://quit

                                    #parameters
                                    accessvalue=file
                                    muxvalue=mp4

                                    for x in *.mp4; do
                                    inputname="${x}"
                                    strippedname=${x%.mp4}
                                    outputname=${strippedname}.m4a
                                    quote_outputname=${quote}./${outputname}${quote}
                                    echo ${inputname}
                                    echo ${quote_outputname}
                                    qtranscode=#transcode{vcodec=none}: # rm this commnt, cont' nxt line !!
                                    standard{access=$accessvalue,mux=$muxvalue,dst=${quote_outputname}}
                                    argument1="$inputname"
                                    argument2=--sout=$qtranscode
                                    "$executable" -I dummy "$argument1" "$argument2" "$argument3"
                                    done





                                    share|improve this answer














                                    Just for fun, you can also do it by using vlc. The script below strips all *.mp4 files in the current directory to *.m4a. There are some error messages which can be ignored.



                                    #!/bin/bash

                                    quote="
                                    executable="/usr/bin/vlc"
                                    argument3=vlc://quit

                                    #parameters
                                    accessvalue=file
                                    muxvalue=mp4

                                    for x in *.mp4; do
                                    inputname="${x}"
                                    strippedname=${x%.mp4}
                                    outputname=${strippedname}.m4a
                                    quote_outputname=${quote}./${outputname}${quote}
                                    echo ${inputname}
                                    echo ${quote_outputname}
                                    qtranscode=#transcode{vcodec=none}: # rm this commnt, cont' nxt line !!
                                    standard{access=$accessvalue,mux=$muxvalue,dst=${quote_outputname}}
                                    argument1="$inputname"
                                    argument2=--sout=$qtranscode
                                    "$executable" -I dummy "$argument1" "$argument2" "$argument3"
                                    done






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Nov 8 at 13:41









                                    dessert

                                    22k56097




                                    22k56097










                                    answered Apr 24 at 9:10









                                    oscar1919

                                    43236




                                    43236






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Ask Ubuntu!


                                        • 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.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • 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%2faskubuntu.com%2fquestions%2f437798%2fhow-to-extract-aac-audio-from-an-mp4-file-to-m4a%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

                                        數位音樂下載

                                        When can things happen in Etherscan, such as the picture below?

                                        格利澤436b