Setting ID3 title tag to be equal to MP3 file name












12














Has anyone got a bash script that will go through a media library and set the id3 title tag of each MP3 file to be equal to the file's name?



I'm open to other automated methods too. It can be a GUI application or anything that will do the job automatically.



An EasyTag method is noted here: How to rename bulk title tag in mp3 ID3 files —
Unfortunately, I don't understand the steps.










share|improve this question
























  • You may answer your own question. List the steps you found on ubuntuforums.org and cite your source. :) This will help future visitors to Superuser, in the case that the ubuntuforums.org link becomes unavailable.
    – iglvzx
    Mar 9 '12 at 4:45








  • 3




    Here are a few tips: 1) Don't clutter your question with "edit 1", "edit 2", etc. Resolve problems using comments. 2) If you find a solution, post it as an answer, as if you were trying to answer someone else's question. Don't put the answer into the question. That's not where people look for it :) Also, use blockquotes for anything you quote from somewhere else (see the formatting help).
    – slhck
    Mar 9 '12 at 8:34


















12














Has anyone got a bash script that will go through a media library and set the id3 title tag of each MP3 file to be equal to the file's name?



I'm open to other automated methods too. It can be a GUI application or anything that will do the job automatically.



An EasyTag method is noted here: How to rename bulk title tag in mp3 ID3 files —
Unfortunately, I don't understand the steps.










share|improve this question
























  • You may answer your own question. List the steps you found on ubuntuforums.org and cite your source. :) This will help future visitors to Superuser, in the case that the ubuntuforums.org link becomes unavailable.
    – iglvzx
    Mar 9 '12 at 4:45








  • 3




    Here are a few tips: 1) Don't clutter your question with "edit 1", "edit 2", etc. Resolve problems using comments. 2) If you find a solution, post it as an answer, as if you were trying to answer someone else's question. Don't put the answer into the question. That's not where people look for it :) Also, use blockquotes for anything you quote from somewhere else (see the formatting help).
    – slhck
    Mar 9 '12 at 8:34
















12












12








12


3





Has anyone got a bash script that will go through a media library and set the id3 title tag of each MP3 file to be equal to the file's name?



I'm open to other automated methods too. It can be a GUI application or anything that will do the job automatically.



An EasyTag method is noted here: How to rename bulk title tag in mp3 ID3 files —
Unfortunately, I don't understand the steps.










share|improve this question















Has anyone got a bash script that will go through a media library and set the id3 title tag of each MP3 file to be equal to the file's name?



I'm open to other automated methods too. It can be a GUI application or anything that will do the job automatically.



An EasyTag method is noted here: How to rename bulk title tag in mp3 ID3 files —
Unfortunately, I don't understand the steps.







linux bash script id3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 20 '17 at 10:17









Community

1




1










asked Mar 9 '12 at 4:22









MountainXMountainX

1,15451832




1,15451832












  • You may answer your own question. List the steps you found on ubuntuforums.org and cite your source. :) This will help future visitors to Superuser, in the case that the ubuntuforums.org link becomes unavailable.
    – iglvzx
    Mar 9 '12 at 4:45








  • 3




    Here are a few tips: 1) Don't clutter your question with "edit 1", "edit 2", etc. Resolve problems using comments. 2) If you find a solution, post it as an answer, as if you were trying to answer someone else's question. Don't put the answer into the question. That's not where people look for it :) Also, use blockquotes for anything you quote from somewhere else (see the formatting help).
    – slhck
    Mar 9 '12 at 8:34




















  • You may answer your own question. List the steps you found on ubuntuforums.org and cite your source. :) This will help future visitors to Superuser, in the case that the ubuntuforums.org link becomes unavailable.
    – iglvzx
    Mar 9 '12 at 4:45








  • 3




    Here are a few tips: 1) Don't clutter your question with "edit 1", "edit 2", etc. Resolve problems using comments. 2) If you find a solution, post it as an answer, as if you were trying to answer someone else's question. Don't put the answer into the question. That's not where people look for it :) Also, use blockquotes for anything you quote from somewhere else (see the formatting help).
    – slhck
    Mar 9 '12 at 8:34


















You may answer your own question. List the steps you found on ubuntuforums.org and cite your source. :) This will help future visitors to Superuser, in the case that the ubuntuforums.org link becomes unavailable.
– iglvzx
Mar 9 '12 at 4:45






You may answer your own question. List the steps you found on ubuntuforums.org and cite your source. :) This will help future visitors to Superuser, in the case that the ubuntuforums.org link becomes unavailable.
– iglvzx
Mar 9 '12 at 4:45






3




3




Here are a few tips: 1) Don't clutter your question with "edit 1", "edit 2", etc. Resolve problems using comments. 2) If you find a solution, post it as an answer, as if you were trying to answer someone else's question. Don't put the answer into the question. That's not where people look for it :) Also, use blockquotes for anything you quote from somewhere else (see the formatting help).
– slhck
Mar 9 '12 at 8:34






Here are a few tips: 1) Don't clutter your question with "edit 1", "edit 2", etc. Resolve problems using comments. 2) If you find a solution, post it as an answer, as if you were trying to answer someone else's question. Don't put the answer into the question. That's not where people look for it :) Also, use blockquotes for anything you quote from somewhere else (see the formatting help).
– slhck
Mar 9 '12 at 8:34












7 Answers
7






active

oldest

votes


















17














EasyTAG is indeed a great tool for this problem. I found my answer here. In terms of how to use it, the best reference turns out to be EasyTAG’s own documentation.




Open EasyTag, navigate to a folder with music files in it, select all
the files in the folder, or all the files you want to tag, click on
the "Scan Files" button (you'll have to hover over them to figure out
which one it is).



Then, make sure the scanner dropdown is set to "Fill Tag," then in the
Fill Tag field, make the appropriate edits until the example below the
field looks like what you're looking for. If you need further help as
to what to put in the Fill Tag field, click on the "?" button for the
legend (listing of what the different possible codes are to translate
with) and hit the mask button to list some starting points.



When you're happy with the results, click the "Scan Files" button (in
the Scan Files dialog box, not the one you originally clicked to get
where you are...the icons look the same) and your changes will be
applied. If you are not getting Artist or Album name, simply select
all that you want to change, enter the data and click the little
button next to that field and all files that are selected will the
filled in or changed to that artist or album. This works in most
fields.



When you're done, click the save button and you're done.



PS: The CDDB scanner often works pretty well, if you have full albums
that you're trying to tag, or at least commercially available song
files.



PPS: I am apparently half awake still. According to what you wrote in
your original post, try this in the Fill Tag field:



%n. %a - %t



Here's the section that is relevant to this question:






1.2.2. Automatically with “Fill Tag” scanner:



Some conditions to use this mode:




  • files sorted by albums

  • filenames or parent directory contain tag information (artist, album, title, …)

  • empty or not correct tags


The “Fill Tag” scanner uses a pattern to associate words in the filename and directories with the tag entries. By this way, the tag fields can be completed automatically by pressing the “green” button in the scanner window or the toolbar. If the tag is partially completed, use the option “Overwrite fields when scanning tag” in the “Scanner” tab of the “Preferences” window, to replace all fields by the new values.



Each code correspond to a field, following theses rules :



Strings associated with code    Will fill the field
%a
Artist
%b
Album
%c
Comment
%p
Composer
%r
Copyright
%e
Encoded by
%g
Genre
%i
None! (used to ignore a string)
%l
Number of tracks
%o
Original artist
%n
Track
%t
Title
%u
URL
%y
Year


Note : to avoid mistakes, it is recommended to use a code only one time in the pattern. Of course, like when tagging manually, only the selected files are processed by the scanner.
You can use the defined patterns in the list, or write yours own patterns to correspond to the format of yours file names and directories.
To avoid mistakes when selecting the right pattern, or writing it, a preview shows immediately the results before to apply the pattern.
If you need some help with the different codes, press the “Help” button (the lifebuoy) to display the legend of each code.
Also, if you want to save yours own patterns, edit or sort then, by pressing the “Mask” button an little editor will be shown on the scanner window.



Below an example of use of patterns :



a) the following filename :



“/mnt/MP3/EVANESCENCE – Fallen (2003) – Rock/01. Going Under.mp3”

b) with the pattern :

“%a - %b (%y) - %g/%n. %t”

c) you will fill the tag with theses strings :

Artist (%a) => EVANESCENCE
Album (%b) => Fallen
Year (%y) => 2003
Genre (%g) => Rock
Track (%n) => 01
Title (%t) => Going Under






share|improve this answer































    4














    EasyTAG does all sorts of common batch tag/filename operations on audio (and some video) files.






    share|improve this answer





























      3














      I have found a variety of command line tools to be useful:



      id3v2




      id3v2 is a command line id3v2 tag editor. You can add/modifiy/delete
      id3v2 tags and convert id3v1 tags to id3v2 tags. It's uses id3lib. I'm
      looking for a co-maintainer. Please email myers_carpenter if you are
      interested.




      eyeD3




      eyeD3 is a Python module and program for processing ID3 tags.
      Information about mp3 files (i.e bit rate, sample frequency, play
      time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
      and v2.3/v2.4.




      these are ideal when scripting something to scan directories.






      share|improve this answer































        2














        This doesn't always get it exactly perfect, but I have used it to get the names of mp3 files using only common unix tools (including the busybox versions) Perhaps someone with more than just 6 Tom Petty mp3s can give it some further testing.



        for x in *.mp3; do
        TITLE=$(strings "$x" |grep TAG |grep -v TAGL |sed "s/^.*TAG//g ; /^L$/d ; /^@$/d ; /^$/d ; /^Ac$/d")
        #mv "$x" "$TITLE.mp3"
        echo $x" "$TITLE.mp3" #just echo for now, until further tested
        done


        Edit: I misread the question, but knowing this above we can use sed to replace $TITLE with the name of the file "$x" by using sed to replace the string in place



        sed -i "s/$TITLE/$x/" "$x"


        I am almost 100% sure this does not meet all of the ID3 spec, but it may suffice for basic personal use as long as you make a backup first






        share|improve this answer























        • Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
          – MountainX
          Mar 13 '12 at 20:31



















        2














        For Ubuntu 18.04 LTS (I assume all Debian flavors will run this just fine):




        • Install eyeD3 with sudo apt install eyeD3


        • Create a file for bash script (I used "touch";
          you can use whatever text editor you like)



        • Copy this and paste it into file:



          Copies file name and writes it to the Title tag



          for x in *; do
          eyeD3 --title="${x%.*}" "$x"
          echo $a
          done


          If you don't care to view the progress, omit the line echo $a
          above the word "done".




        • Make the file executable:



          chmod +x filename



        • Copy the script to the directory you want it to run in –
          the one containing your media files; for example:



          cp filename /music/directory



        • Navigate to the directory you just copied the script to:



          cd /music/directory



        • Run the script:



          ./filename


          DONE




        It worked for me on Ubuntu 18.04 LTS – my wife wrote this for me in about 3 minutes, so I can't answer any questions if it doesn't work for you; I am not programmer savvy, I am setup this web, dns, ssh,sftp,ftp,AD/Domain, file,firewall,router/server kinda guy:-) I HATE doing scripting, programming and anything like it. I LOVE taking advantage of scripting, programming and anything like it:-)






        share|improve this answer































          1














          I am surprised that no one has suggested the easiest solution using ffmpeg or avconv:



          for i in *.mp3; do avconv -y -i "$i" -c copy -metadata title="$i" new_"$i"; done;





          share|improve this answer





























            0














            I would install eyeD3 in a python virtualenv with pip install eyeD3 so you get the most recently released version. After that run:



            for i in *.mp3; do /your/venv/bin/eyeD3 --title "$i" "$i"; done





            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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%2fsuperuser.com%2fquestions%2f398712%2fsetting-id3-title-tag-to-be-equal-to-mp3-file-name%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              17














              EasyTAG is indeed a great tool for this problem. I found my answer here. In terms of how to use it, the best reference turns out to be EasyTAG’s own documentation.




              Open EasyTag, navigate to a folder with music files in it, select all
              the files in the folder, or all the files you want to tag, click on
              the "Scan Files" button (you'll have to hover over them to figure out
              which one it is).



              Then, make sure the scanner dropdown is set to "Fill Tag," then in the
              Fill Tag field, make the appropriate edits until the example below the
              field looks like what you're looking for. If you need further help as
              to what to put in the Fill Tag field, click on the "?" button for the
              legend (listing of what the different possible codes are to translate
              with) and hit the mask button to list some starting points.



              When you're happy with the results, click the "Scan Files" button (in
              the Scan Files dialog box, not the one you originally clicked to get
              where you are...the icons look the same) and your changes will be
              applied. If you are not getting Artist or Album name, simply select
              all that you want to change, enter the data and click the little
              button next to that field and all files that are selected will the
              filled in or changed to that artist or album. This works in most
              fields.



              When you're done, click the save button and you're done.



              PS: The CDDB scanner often works pretty well, if you have full albums
              that you're trying to tag, or at least commercially available song
              files.



              PPS: I am apparently half awake still. According to what you wrote in
              your original post, try this in the Fill Tag field:



              %n. %a - %t



              Here's the section that is relevant to this question:






              1.2.2. Automatically with “Fill Tag” scanner:



              Some conditions to use this mode:




              • files sorted by albums

              • filenames or parent directory contain tag information (artist, album, title, …)

              • empty or not correct tags


              The “Fill Tag” scanner uses a pattern to associate words in the filename and directories with the tag entries. By this way, the tag fields can be completed automatically by pressing the “green” button in the scanner window or the toolbar. If the tag is partially completed, use the option “Overwrite fields when scanning tag” in the “Scanner” tab of the “Preferences” window, to replace all fields by the new values.



              Each code correspond to a field, following theses rules :



              Strings associated with code    Will fill the field
              %a
              Artist
              %b
              Album
              %c
              Comment
              %p
              Composer
              %r
              Copyright
              %e
              Encoded by
              %g
              Genre
              %i
              None! (used to ignore a string)
              %l
              Number of tracks
              %o
              Original artist
              %n
              Track
              %t
              Title
              %u
              URL
              %y
              Year


              Note : to avoid mistakes, it is recommended to use a code only one time in the pattern. Of course, like when tagging manually, only the selected files are processed by the scanner.
              You can use the defined patterns in the list, or write yours own patterns to correspond to the format of yours file names and directories.
              To avoid mistakes when selecting the right pattern, or writing it, a preview shows immediately the results before to apply the pattern.
              If you need some help with the different codes, press the “Help” button (the lifebuoy) to display the legend of each code.
              Also, if you want to save yours own patterns, edit or sort then, by pressing the “Mask” button an little editor will be shown on the scanner window.



              Below an example of use of patterns :



              a) the following filename :



              “/mnt/MP3/EVANESCENCE – Fallen (2003) – Rock/01. Going Under.mp3”

              b) with the pattern :

              “%a - %b (%y) - %g/%n. %t”

              c) you will fill the tag with theses strings :

              Artist (%a) => EVANESCENCE
              Album (%b) => Fallen
              Year (%y) => 2003
              Genre (%g) => Rock
              Track (%n) => 01
              Title (%t) => Going Under






              share|improve this answer




























                17














                EasyTAG is indeed a great tool for this problem. I found my answer here. In terms of how to use it, the best reference turns out to be EasyTAG’s own documentation.




                Open EasyTag, navigate to a folder with music files in it, select all
                the files in the folder, or all the files you want to tag, click on
                the "Scan Files" button (you'll have to hover over them to figure out
                which one it is).



                Then, make sure the scanner dropdown is set to "Fill Tag," then in the
                Fill Tag field, make the appropriate edits until the example below the
                field looks like what you're looking for. If you need further help as
                to what to put in the Fill Tag field, click on the "?" button for the
                legend (listing of what the different possible codes are to translate
                with) and hit the mask button to list some starting points.



                When you're happy with the results, click the "Scan Files" button (in
                the Scan Files dialog box, not the one you originally clicked to get
                where you are...the icons look the same) and your changes will be
                applied. If you are not getting Artist or Album name, simply select
                all that you want to change, enter the data and click the little
                button next to that field and all files that are selected will the
                filled in or changed to that artist or album. This works in most
                fields.



                When you're done, click the save button and you're done.



                PS: The CDDB scanner often works pretty well, if you have full albums
                that you're trying to tag, or at least commercially available song
                files.



                PPS: I am apparently half awake still. According to what you wrote in
                your original post, try this in the Fill Tag field:



                %n. %a - %t



                Here's the section that is relevant to this question:






                1.2.2. Automatically with “Fill Tag” scanner:



                Some conditions to use this mode:




                • files sorted by albums

                • filenames or parent directory contain tag information (artist, album, title, …)

                • empty or not correct tags


                The “Fill Tag” scanner uses a pattern to associate words in the filename and directories with the tag entries. By this way, the tag fields can be completed automatically by pressing the “green” button in the scanner window or the toolbar. If the tag is partially completed, use the option “Overwrite fields when scanning tag” in the “Scanner” tab of the “Preferences” window, to replace all fields by the new values.



                Each code correspond to a field, following theses rules :



                Strings associated with code    Will fill the field
                %a
                Artist
                %b
                Album
                %c
                Comment
                %p
                Composer
                %r
                Copyright
                %e
                Encoded by
                %g
                Genre
                %i
                None! (used to ignore a string)
                %l
                Number of tracks
                %o
                Original artist
                %n
                Track
                %t
                Title
                %u
                URL
                %y
                Year


                Note : to avoid mistakes, it is recommended to use a code only one time in the pattern. Of course, like when tagging manually, only the selected files are processed by the scanner.
                You can use the defined patterns in the list, or write yours own patterns to correspond to the format of yours file names and directories.
                To avoid mistakes when selecting the right pattern, or writing it, a preview shows immediately the results before to apply the pattern.
                If you need some help with the different codes, press the “Help” button (the lifebuoy) to display the legend of each code.
                Also, if you want to save yours own patterns, edit or sort then, by pressing the “Mask” button an little editor will be shown on the scanner window.



                Below an example of use of patterns :



                a) the following filename :



                “/mnt/MP3/EVANESCENCE – Fallen (2003) – Rock/01. Going Under.mp3”

                b) with the pattern :

                “%a - %b (%y) - %g/%n. %t”

                c) you will fill the tag with theses strings :

                Artist (%a) => EVANESCENCE
                Album (%b) => Fallen
                Year (%y) => 2003
                Genre (%g) => Rock
                Track (%n) => 01
                Title (%t) => Going Under






                share|improve this answer


























                  17












                  17








                  17






                  EasyTAG is indeed a great tool for this problem. I found my answer here. In terms of how to use it, the best reference turns out to be EasyTAG’s own documentation.




                  Open EasyTag, navigate to a folder with music files in it, select all
                  the files in the folder, or all the files you want to tag, click on
                  the "Scan Files" button (you'll have to hover over them to figure out
                  which one it is).



                  Then, make sure the scanner dropdown is set to "Fill Tag," then in the
                  Fill Tag field, make the appropriate edits until the example below the
                  field looks like what you're looking for. If you need further help as
                  to what to put in the Fill Tag field, click on the "?" button for the
                  legend (listing of what the different possible codes are to translate
                  with) and hit the mask button to list some starting points.



                  When you're happy with the results, click the "Scan Files" button (in
                  the Scan Files dialog box, not the one you originally clicked to get
                  where you are...the icons look the same) and your changes will be
                  applied. If you are not getting Artist or Album name, simply select
                  all that you want to change, enter the data and click the little
                  button next to that field and all files that are selected will the
                  filled in or changed to that artist or album. This works in most
                  fields.



                  When you're done, click the save button and you're done.



                  PS: The CDDB scanner often works pretty well, if you have full albums
                  that you're trying to tag, or at least commercially available song
                  files.



                  PPS: I am apparently half awake still. According to what you wrote in
                  your original post, try this in the Fill Tag field:



                  %n. %a - %t



                  Here's the section that is relevant to this question:






                  1.2.2. Automatically with “Fill Tag” scanner:



                  Some conditions to use this mode:




                  • files sorted by albums

                  • filenames or parent directory contain tag information (artist, album, title, …)

                  • empty or not correct tags


                  The “Fill Tag” scanner uses a pattern to associate words in the filename and directories with the tag entries. By this way, the tag fields can be completed automatically by pressing the “green” button in the scanner window or the toolbar. If the tag is partially completed, use the option “Overwrite fields when scanning tag” in the “Scanner” tab of the “Preferences” window, to replace all fields by the new values.



                  Each code correspond to a field, following theses rules :



                  Strings associated with code    Will fill the field
                  %a
                  Artist
                  %b
                  Album
                  %c
                  Comment
                  %p
                  Composer
                  %r
                  Copyright
                  %e
                  Encoded by
                  %g
                  Genre
                  %i
                  None! (used to ignore a string)
                  %l
                  Number of tracks
                  %o
                  Original artist
                  %n
                  Track
                  %t
                  Title
                  %u
                  URL
                  %y
                  Year


                  Note : to avoid mistakes, it is recommended to use a code only one time in the pattern. Of course, like when tagging manually, only the selected files are processed by the scanner.
                  You can use the defined patterns in the list, or write yours own patterns to correspond to the format of yours file names and directories.
                  To avoid mistakes when selecting the right pattern, or writing it, a preview shows immediately the results before to apply the pattern.
                  If you need some help with the different codes, press the “Help” button (the lifebuoy) to display the legend of each code.
                  Also, if you want to save yours own patterns, edit or sort then, by pressing the “Mask” button an little editor will be shown on the scanner window.



                  Below an example of use of patterns :



                  a) the following filename :



                  “/mnt/MP3/EVANESCENCE – Fallen (2003) – Rock/01. Going Under.mp3”

                  b) with the pattern :

                  “%a - %b (%y) - %g/%n. %t”

                  c) you will fill the tag with theses strings :

                  Artist (%a) => EVANESCENCE
                  Album (%b) => Fallen
                  Year (%y) => 2003
                  Genre (%g) => Rock
                  Track (%n) => 01
                  Title (%t) => Going Under






                  share|improve this answer














                  EasyTAG is indeed a great tool for this problem. I found my answer here. In terms of how to use it, the best reference turns out to be EasyTAG’s own documentation.




                  Open EasyTag, navigate to a folder with music files in it, select all
                  the files in the folder, or all the files you want to tag, click on
                  the "Scan Files" button (you'll have to hover over them to figure out
                  which one it is).



                  Then, make sure the scanner dropdown is set to "Fill Tag," then in the
                  Fill Tag field, make the appropriate edits until the example below the
                  field looks like what you're looking for. If you need further help as
                  to what to put in the Fill Tag field, click on the "?" button for the
                  legend (listing of what the different possible codes are to translate
                  with) and hit the mask button to list some starting points.



                  When you're happy with the results, click the "Scan Files" button (in
                  the Scan Files dialog box, not the one you originally clicked to get
                  where you are...the icons look the same) and your changes will be
                  applied. If you are not getting Artist or Album name, simply select
                  all that you want to change, enter the data and click the little
                  button next to that field and all files that are selected will the
                  filled in or changed to that artist or album. This works in most
                  fields.



                  When you're done, click the save button and you're done.



                  PS: The CDDB scanner often works pretty well, if you have full albums
                  that you're trying to tag, or at least commercially available song
                  files.



                  PPS: I am apparently half awake still. According to what you wrote in
                  your original post, try this in the Fill Tag field:



                  %n. %a - %t



                  Here's the section that is relevant to this question:






                  1.2.2. Automatically with “Fill Tag” scanner:



                  Some conditions to use this mode:




                  • files sorted by albums

                  • filenames or parent directory contain tag information (artist, album, title, …)

                  • empty or not correct tags


                  The “Fill Tag” scanner uses a pattern to associate words in the filename and directories with the tag entries. By this way, the tag fields can be completed automatically by pressing the “green” button in the scanner window or the toolbar. If the tag is partially completed, use the option “Overwrite fields when scanning tag” in the “Scanner” tab of the “Preferences” window, to replace all fields by the new values.



                  Each code correspond to a field, following theses rules :



                  Strings associated with code    Will fill the field
                  %a
                  Artist
                  %b
                  Album
                  %c
                  Comment
                  %p
                  Composer
                  %r
                  Copyright
                  %e
                  Encoded by
                  %g
                  Genre
                  %i
                  None! (used to ignore a string)
                  %l
                  Number of tracks
                  %o
                  Original artist
                  %n
                  Track
                  %t
                  Title
                  %u
                  URL
                  %y
                  Year


                  Note : to avoid mistakes, it is recommended to use a code only one time in the pattern. Of course, like when tagging manually, only the selected files are processed by the scanner.
                  You can use the defined patterns in the list, or write yours own patterns to correspond to the format of yours file names and directories.
                  To avoid mistakes when selecting the right pattern, or writing it, a preview shows immediately the results before to apply the pattern.
                  If you need some help with the different codes, press the “Help” button (the lifebuoy) to display the legend of each code.
                  Also, if you want to save yours own patterns, edit or sort then, by pressing the “Mask” button an little editor will be shown on the scanner window.



                  Below an example of use of patterns :



                  a) the following filename :



                  “/mnt/MP3/EVANESCENCE – Fallen (2003) – Rock/01. Going Under.mp3”

                  b) with the pattern :

                  “%a - %b (%y) - %g/%n. %t”

                  c) you will fill the tag with theses strings :

                  Artist (%a) => EVANESCENCE
                  Album (%b) => Fallen
                  Year (%y) => 2003
                  Genre (%g) => Rock
                  Track (%n) => 01
                  Title (%t) => Going Under







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 18 '14 at 23:14









                  JakeGould

                  31k1093137




                  31k1093137










                  answered Mar 9 '12 at 5:21









                  MountainXMountainX

                  1,15451832




                  1,15451832

























                      4














                      EasyTAG does all sorts of common batch tag/filename operations on audio (and some video) files.






                      share|improve this answer


























                        4














                        EasyTAG does all sorts of common batch tag/filename operations on audio (and some video) files.






                        share|improve this answer
























                          4












                          4








                          4






                          EasyTAG does all sorts of common batch tag/filename operations on audio (and some video) files.






                          share|improve this answer












                          EasyTAG does all sorts of common batch tag/filename operations on audio (and some video) files.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 9 '12 at 4:28









                          Ignacio Vazquez-AbramsIgnacio Vazquez-Abrams

                          95.6k6150209




                          95.6k6150209























                              3














                              I have found a variety of command line tools to be useful:



                              id3v2




                              id3v2 is a command line id3v2 tag editor. You can add/modifiy/delete
                              id3v2 tags and convert id3v1 tags to id3v2 tags. It's uses id3lib. I'm
                              looking for a co-maintainer. Please email myers_carpenter if you are
                              interested.




                              eyeD3




                              eyeD3 is a Python module and program for processing ID3 tags.
                              Information about mp3 files (i.e bit rate, sample frequency, play
                              time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
                              and v2.3/v2.4.




                              these are ideal when scripting something to scan directories.






                              share|improve this answer




























                                3














                                I have found a variety of command line tools to be useful:



                                id3v2




                                id3v2 is a command line id3v2 tag editor. You can add/modifiy/delete
                                id3v2 tags and convert id3v1 tags to id3v2 tags. It's uses id3lib. I'm
                                looking for a co-maintainer. Please email myers_carpenter if you are
                                interested.




                                eyeD3




                                eyeD3 is a Python module and program for processing ID3 tags.
                                Information about mp3 files (i.e bit rate, sample frequency, play
                                time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
                                and v2.3/v2.4.




                                these are ideal when scripting something to scan directories.






                                share|improve this answer


























                                  3












                                  3








                                  3






                                  I have found a variety of command line tools to be useful:



                                  id3v2




                                  id3v2 is a command line id3v2 tag editor. You can add/modifiy/delete
                                  id3v2 tags and convert id3v1 tags to id3v2 tags. It's uses id3lib. I'm
                                  looking for a co-maintainer. Please email myers_carpenter if you are
                                  interested.




                                  eyeD3




                                  eyeD3 is a Python module and program for processing ID3 tags.
                                  Information about mp3 files (i.e bit rate, sample frequency, play
                                  time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
                                  and v2.3/v2.4.




                                  these are ideal when scripting something to scan directories.






                                  share|improve this answer














                                  I have found a variety of command line tools to be useful:



                                  id3v2




                                  id3v2 is a command line id3v2 tag editor. You can add/modifiy/delete
                                  id3v2 tags and convert id3v1 tags to id3v2 tags. It's uses id3lib. I'm
                                  looking for a co-maintainer. Please email myers_carpenter if you are
                                  interested.




                                  eyeD3




                                  eyeD3 is a Python module and program for processing ID3 tags.
                                  Information about mp3 files (i.e bit rate, sample frequency, play
                                  time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
                                  and v2.3/v2.4.




                                  these are ideal when scripting something to scan directories.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Jul 19 '12 at 20:28









                                  KronoS

                                  19.7k4099154




                                  19.7k4099154










                                  answered Jul 19 '12 at 9:11









                                  Paul MPaul M

                                  1312




                                  1312























                                      2














                                      This doesn't always get it exactly perfect, but I have used it to get the names of mp3 files using only common unix tools (including the busybox versions) Perhaps someone with more than just 6 Tom Petty mp3s can give it some further testing.



                                      for x in *.mp3; do
                                      TITLE=$(strings "$x" |grep TAG |grep -v TAGL |sed "s/^.*TAG//g ; /^L$/d ; /^@$/d ; /^$/d ; /^Ac$/d")
                                      #mv "$x" "$TITLE.mp3"
                                      echo $x" "$TITLE.mp3" #just echo for now, until further tested
                                      done


                                      Edit: I misread the question, but knowing this above we can use sed to replace $TITLE with the name of the file "$x" by using sed to replace the string in place



                                      sed -i "s/$TITLE/$x/" "$x"


                                      I am almost 100% sure this does not meet all of the ID3 spec, but it may suffice for basic personal use as long as you make a backup first






                                      share|improve this answer























                                      • Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
                                        – MountainX
                                        Mar 13 '12 at 20:31
















                                      2














                                      This doesn't always get it exactly perfect, but I have used it to get the names of mp3 files using only common unix tools (including the busybox versions) Perhaps someone with more than just 6 Tom Petty mp3s can give it some further testing.



                                      for x in *.mp3; do
                                      TITLE=$(strings "$x" |grep TAG |grep -v TAGL |sed "s/^.*TAG//g ; /^L$/d ; /^@$/d ; /^$/d ; /^Ac$/d")
                                      #mv "$x" "$TITLE.mp3"
                                      echo $x" "$TITLE.mp3" #just echo for now, until further tested
                                      done


                                      Edit: I misread the question, but knowing this above we can use sed to replace $TITLE with the name of the file "$x" by using sed to replace the string in place



                                      sed -i "s/$TITLE/$x/" "$x"


                                      I am almost 100% sure this does not meet all of the ID3 spec, but it may suffice for basic personal use as long as you make a backup first






                                      share|improve this answer























                                      • Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
                                        – MountainX
                                        Mar 13 '12 at 20:31














                                      2












                                      2








                                      2






                                      This doesn't always get it exactly perfect, but I have used it to get the names of mp3 files using only common unix tools (including the busybox versions) Perhaps someone with more than just 6 Tom Petty mp3s can give it some further testing.



                                      for x in *.mp3; do
                                      TITLE=$(strings "$x" |grep TAG |grep -v TAGL |sed "s/^.*TAG//g ; /^L$/d ; /^@$/d ; /^$/d ; /^Ac$/d")
                                      #mv "$x" "$TITLE.mp3"
                                      echo $x" "$TITLE.mp3" #just echo for now, until further tested
                                      done


                                      Edit: I misread the question, but knowing this above we can use sed to replace $TITLE with the name of the file "$x" by using sed to replace the string in place



                                      sed -i "s/$TITLE/$x/" "$x"


                                      I am almost 100% sure this does not meet all of the ID3 spec, but it may suffice for basic personal use as long as you make a backup first






                                      share|improve this answer














                                      This doesn't always get it exactly perfect, but I have used it to get the names of mp3 files using only common unix tools (including the busybox versions) Perhaps someone with more than just 6 Tom Petty mp3s can give it some further testing.



                                      for x in *.mp3; do
                                      TITLE=$(strings "$x" |grep TAG |grep -v TAGL |sed "s/^.*TAG//g ; /^L$/d ; /^@$/d ; /^$/d ; /^Ac$/d")
                                      #mv "$x" "$TITLE.mp3"
                                      echo $x" "$TITLE.mp3" #just echo for now, until further tested
                                      done


                                      Edit: I misread the question, but knowing this above we can use sed to replace $TITLE with the name of the file "$x" by using sed to replace the string in place



                                      sed -i "s/$TITLE/$x/" "$x"


                                      I am almost 100% sure this does not meet all of the ID3 spec, but it may suffice for basic personal use as long as you make a backup first







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Mar 13 '12 at 20:43

























                                      answered Mar 13 '12 at 6:25









                                      technosaurustechnosaurus

                                      95646




                                      95646












                                      • Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
                                        – MountainX
                                        Mar 13 '12 at 20:31


















                                      • Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
                                        – MountainX
                                        Mar 13 '12 at 20:31
















                                      Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
                                      – MountainX
                                      Mar 13 '12 at 20:31




                                      Thanks. I found a way to accomplish my goal using EasyTAG, but your reply actually answers my original question best. strings is a good utility to know about. (I haven't used it before.) Could you post a complete solution based on your edit so I can be sure I understand the suggested change?
                                      – MountainX
                                      Mar 13 '12 at 20:31











                                      2














                                      For Ubuntu 18.04 LTS (I assume all Debian flavors will run this just fine):




                                      • Install eyeD3 with sudo apt install eyeD3


                                      • Create a file for bash script (I used "touch";
                                        you can use whatever text editor you like)



                                      • Copy this and paste it into file:



                                        Copies file name and writes it to the Title tag



                                        for x in *; do
                                        eyeD3 --title="${x%.*}" "$x"
                                        echo $a
                                        done


                                        If you don't care to view the progress, omit the line echo $a
                                        above the word "done".




                                      • Make the file executable:



                                        chmod +x filename



                                      • Copy the script to the directory you want it to run in –
                                        the one containing your media files; for example:



                                        cp filename /music/directory



                                      • Navigate to the directory you just copied the script to:



                                        cd /music/directory



                                      • Run the script:



                                        ./filename


                                        DONE




                                      It worked for me on Ubuntu 18.04 LTS – my wife wrote this for me in about 3 minutes, so I can't answer any questions if it doesn't work for you; I am not programmer savvy, I am setup this web, dns, ssh,sftp,ftp,AD/Domain, file,firewall,router/server kinda guy:-) I HATE doing scripting, programming and anything like it. I LOVE taking advantage of scripting, programming and anything like it:-)






                                      share|improve this answer




























                                        2














                                        For Ubuntu 18.04 LTS (I assume all Debian flavors will run this just fine):




                                        • Install eyeD3 with sudo apt install eyeD3


                                        • Create a file for bash script (I used "touch";
                                          you can use whatever text editor you like)



                                        • Copy this and paste it into file:



                                          Copies file name and writes it to the Title tag



                                          for x in *; do
                                          eyeD3 --title="${x%.*}" "$x"
                                          echo $a
                                          done


                                          If you don't care to view the progress, omit the line echo $a
                                          above the word "done".




                                        • Make the file executable:



                                          chmod +x filename



                                        • Copy the script to the directory you want it to run in –
                                          the one containing your media files; for example:



                                          cp filename /music/directory



                                        • Navigate to the directory you just copied the script to:



                                          cd /music/directory



                                        • Run the script:



                                          ./filename


                                          DONE




                                        It worked for me on Ubuntu 18.04 LTS – my wife wrote this for me in about 3 minutes, so I can't answer any questions if it doesn't work for you; I am not programmer savvy, I am setup this web, dns, ssh,sftp,ftp,AD/Domain, file,firewall,router/server kinda guy:-) I HATE doing scripting, programming and anything like it. I LOVE taking advantage of scripting, programming and anything like it:-)






                                        share|improve this answer


























                                          2












                                          2








                                          2






                                          For Ubuntu 18.04 LTS (I assume all Debian flavors will run this just fine):




                                          • Install eyeD3 with sudo apt install eyeD3


                                          • Create a file for bash script (I used "touch";
                                            you can use whatever text editor you like)



                                          • Copy this and paste it into file:



                                            Copies file name and writes it to the Title tag



                                            for x in *; do
                                            eyeD3 --title="${x%.*}" "$x"
                                            echo $a
                                            done


                                            If you don't care to view the progress, omit the line echo $a
                                            above the word "done".




                                          • Make the file executable:



                                            chmod +x filename



                                          • Copy the script to the directory you want it to run in –
                                            the one containing your media files; for example:



                                            cp filename /music/directory



                                          • Navigate to the directory you just copied the script to:



                                            cd /music/directory



                                          • Run the script:



                                            ./filename


                                            DONE




                                          It worked for me on Ubuntu 18.04 LTS – my wife wrote this for me in about 3 minutes, so I can't answer any questions if it doesn't work for you; I am not programmer savvy, I am setup this web, dns, ssh,sftp,ftp,AD/Domain, file,firewall,router/server kinda guy:-) I HATE doing scripting, programming and anything like it. I LOVE taking advantage of scripting, programming and anything like it:-)






                                          share|improve this answer














                                          For Ubuntu 18.04 LTS (I assume all Debian flavors will run this just fine):




                                          • Install eyeD3 with sudo apt install eyeD3


                                          • Create a file for bash script (I used "touch";
                                            you can use whatever text editor you like)



                                          • Copy this and paste it into file:



                                            Copies file name and writes it to the Title tag



                                            for x in *; do
                                            eyeD3 --title="${x%.*}" "$x"
                                            echo $a
                                            done


                                            If you don't care to view the progress, omit the line echo $a
                                            above the word "done".




                                          • Make the file executable:



                                            chmod +x filename



                                          • Copy the script to the directory you want it to run in –
                                            the one containing your media files; for example:



                                            cp filename /music/directory



                                          • Navigate to the directory you just copied the script to:



                                            cd /music/directory



                                          • Run the script:



                                            ./filename


                                            DONE




                                          It worked for me on Ubuntu 18.04 LTS – my wife wrote this for me in about 3 minutes, so I can't answer any questions if it doesn't work for you; I am not programmer savvy, I am setup this web, dns, ssh,sftp,ftp,AD/Domain, file,firewall,router/server kinda guy:-) I HATE doing scripting, programming and anything like it. I LOVE taking advantage of scripting, programming and anything like it:-)







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Dec 14 '18 at 20:58









                                          G-Man

                                          5,566112357




                                          5,566112357










                                          answered Dec 14 '18 at 20:28









                                          JohnJohn

                                          212




                                          212























                                              1














                                              I am surprised that no one has suggested the easiest solution using ffmpeg or avconv:



                                              for i in *.mp3; do avconv -y -i "$i" -c copy -metadata title="$i" new_"$i"; done;





                                              share|improve this answer


























                                                1














                                                I am surprised that no one has suggested the easiest solution using ffmpeg or avconv:



                                                for i in *.mp3; do avconv -y -i "$i" -c copy -metadata title="$i" new_"$i"; done;





                                                share|improve this answer
























                                                  1












                                                  1








                                                  1






                                                  I am surprised that no one has suggested the easiest solution using ffmpeg or avconv:



                                                  for i in *.mp3; do avconv -y -i "$i" -c copy -metadata title="$i" new_"$i"; done;





                                                  share|improve this answer












                                                  I am surprised that no one has suggested the easiest solution using ffmpeg or avconv:



                                                  for i in *.mp3; do avconv -y -i "$i" -c copy -metadata title="$i" new_"$i"; done;






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Oct 30 '15 at 6:32









                                                  shivamsshivams

                                                  9931923




                                                  9931923























                                                      0














                                                      I would install eyeD3 in a python virtualenv with pip install eyeD3 so you get the most recently released version. After that run:



                                                      for i in *.mp3; do /your/venv/bin/eyeD3 --title "$i" "$i"; done





                                                      share|improve this answer


























                                                        0














                                                        I would install eyeD3 in a python virtualenv with pip install eyeD3 so you get the most recently released version. After that run:



                                                        for i in *.mp3; do /your/venv/bin/eyeD3 --title "$i" "$i"; done





                                                        share|improve this answer
























                                                          0












                                                          0








                                                          0






                                                          I would install eyeD3 in a python virtualenv with pip install eyeD3 so you get the most recently released version. After that run:



                                                          for i in *.mp3; do /your/venv/bin/eyeD3 --title "$i" "$i"; done





                                                          share|improve this answer












                                                          I would install eyeD3 in a python virtualenv with pip install eyeD3 so you get the most recently released version. After that run:



                                                          for i in *.mp3; do /your/venv/bin/eyeD3 --title "$i" "$i"; done






                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Jan 19 '17 at 22:14









                                                          AnthonAnthon

                                                          149119




                                                          149119






























                                                              draft saved

                                                              draft discarded




















































                                                              Thanks for contributing an answer to Super User!


                                                              • 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%2fsuperuser.com%2fquestions%2f398712%2fsetting-id3-title-tag-to-be-equal-to-mp3-file-name%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

                                                              Plaza Victoria

                                                              In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                                                              How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...