4

I have a bunch of mp3 files that are pretty old and don't have any copy rights. Yet, the place I got them from has filled the copy right tags with its own website url.

I was wondering if there's an easy way to remove these tags programmatically? There's a winamp add on that allows me to do this for each song, but that's not very feasible.

Edit: Is copyright part of the ID3 tags?

Thanks, -Roozbeh

Roozbeh15
  • 4,047
  • 6
  • 27
  • 30
  • http://stackoverflow.com/questions/1000132/is-there-a-perl-or-python-library-for-id3-metadata – Gary Chambers Feb 03 '12 at 08:35
  • Apart from the tecnichal side: your "mp3" files would need to be indeed pretty old in order to have no copyright - as copyright is for the music, not the file, and even then, it spams for 70 yearss after the authors's death. So - you'd be either dealing with pre 1920's music - or dealing with music which the authors explicitly put in the public domain, in order for them to have "no copyright". – jsbueno Feb 03 '12 at 11:53
  • They are pretty old and not even English... – Roozbeh15 Feb 03 '12 at 17:31

7 Answers7

7

For Python, there's the mutagen library and tool, which is very easy to use.

However if you're not looking to actually do this programmatically, on Windows there's the freeware app MP3Tag, which I can heartily recommend. It'll do batch transformations and lots more.

Jsilvermist
  • 491
  • 7
  • 16
AKX
  • 152,115
  • 15
  • 115
  • 172
  • BTW, this works great on my MAC, but when I run my code on Windows, it removes all ID3 Tags, and won't allow me to modify the tags any more... not even manually... Is there a reason for this behavior in Windows? – Roozbeh15 Feb 03 '12 at 20:14
3

You can use getID3 library.

Here is the example:

<?php

$TaggingFormat = 'UTF-8';

require_once('../getid3/getid3.php');
// Initialize getID3 engine
$getID3 = new getID3;
$getID3->setOption(array('encoding'=>$TaggingFormat));

require_once('../getid3/write.php');
// Initialize getID3 tag-writing module
$tagwriter = new getid3_writetags;
//$tagwriter->filename = '/path/to/file.mp3';
$tagwriter->filename = 'd:/file.mp3';
                                                            $tagwriter->filename       = 'P:/webroot/_dev/getID3/testfiles/_writing/2011-02-02/test.mp3';
//$tagwriter->tagformats = array('id3v1', 'id3v2.3');
$tagwriter->tagformats = array('id3v2.3');

// set various options (optional)
$tagwriter->overwrite_tags = true;
                                                            $tagwriter->overwrite_tags = false;
$tagwriter->tag_encoding   = $TaggingFormat;
$tagwriter->remove_other_tags = true;

// populate data array
$TagData = array(
    'title'   => array('My Song'),
    'artist'  => array('The Artist'),
    'album'   => array('Greatest Hits'),
    'year'    => array('2004'),
    'genre'   => array('Rock'),
    'comment' => array('excellent!'),
    'track'   => array('04/16'),
);
$tagwriter->tag_data = $TagData;

// write tags
if ($tagwriter->WriteTags()) {
    echo 'Successfully wrote tags<br>';
    if (!empty($tagwriter->warnings)) {
        echo 'There were some warnings:<br>'.implode('<br><br>', $tagwriter->warnings);
    }
} else {
    echo 'Failed to write tags!<br>'.implode('<br><br>', $tagwriter->errors);
}

?>
Fedya Skitsko
  • 337
  • 1
  • 10
1

You can just use VLC player. Click on Tools->Media Information

NothinRandom
  • 225
  • 1
  • 4
  • 12
1

My solution, change path you want:

import os
import shutil
from mutagen.mp3 import MP3
for root, dirs, files in os.walk(path):
    for file in files:
        if file.endswith('.mp3'):
            f = os.path.join(root, file)
            try:
                mp3 = MP3(f)
                mp3.delete()
                mp3.save()
                print('ok')
            except:
                print('no ID3 tag')
print('Done')
Pythoner
  • 5,265
  • 5
  • 33
  • 49
0

Yes Yes This works! Just download the latest version of VLC media player. Open the mp3 file in it. Right click on file > choose 'information' > edit publisher & copyright information there > click 'Save Metadata' below. And u r done. :)

0

There are open source tools like Amarok which will let you make batch changes to ID3 tags.

Take a look at: http://amarok.kde.org/

ralfe
  • 1,412
  • 2
  • 15
  • 25
  • Does it allow batch changes to the copy right tag specifically? I have tried a few programs like the auto tag add on on winamp which allows batch changes to some tags but not the copy right tag. – Roozbeh15 Feb 03 '12 at 08:38
  • In fact, something like auto tag add on on winamp would be ideal if it would replace the made up copy right with the actual copy right. – Roozbeh15 Feb 03 '12 at 08:39
  • I'm sorry, on further inspection, it seems Amarok doesn't cater for that tag. If you are familiar with PHP, take a look at http://php.net/manual/en/ref.id3.php . There is a very simple, programatic way to retrieve and remove id3 tags from mp3 files. – ralfe Feb 03 '12 at 08:50
-1

No Need Of any PHP code Just Reproduce the mp3 file i.e.either burn & rip or cut the size &time making a new file where you can specify your own multitudes of options

Vikram
  • 1
  • 1
    This is a lot of work for dropping the ID3 tags of just one track let alone many tracks as the OP mentioned. Not to mention the possibility of losing quality by reprocessing, etc. – LeoRochael Sep 22 '16 at 18:18