Created
May 3, 2012 19:03
-
-
Save miyagawa/2588271 to your computer and use it in GitHub Desktop.
Strip iTunes purchase metadata from DRM-free AAC files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use File::Find::Rule; | |
use Capture::Tiny qw(capture); | |
sub atomic { | |
my($file, @cmd) = @_; | |
capture { | |
system "atomicparsley", $file, @cmd; | |
}; | |
} | |
my @files = File::Find::Rule->file->name('*.m4a')->in("$ENV{HOME}/Music/iTunes"); | |
for my $file (@files) { | |
if (atomic($file, '-t') =~ /apID/) { | |
warn "Stripping Apple metadata from $file\n"; | |
warn atomic($file, "--manualAtomRemove", "moov.udta.meta.ilst.apID", "--manualAtomRemove", "moov.udta.meta.ilst.purd", "-W"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment