in Education by
I'm looking for a resource in python or bash that will make it easy to take, for example, mp3 file X and m4a file Y and say "copy X's tags to Y". Python's "mutagen" module is great for manupulating tags in general, but there's no abstract concept of "artist field" that spans different types of tag; I want a library that handles all the fiddly bits and knows fieldname equivalences. For things not all tag systems can express, I'm okay with information being lost or best-guessed. (Use case: I encode lossless files to mp3, then go use the mp3s for listening. Every month or so, I want to be able to update the 'master' lossless files with whatever tag changes I've made to the mp3s. I'm tired of stubbing my toes on implementation differences among formats.) JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I needed this exact thing, and I, too, realized quickly that mutagen is not a distant enough abstraction to do this kind of thing. Fortunately, the authors of mutagen needed it for their media player QuodLibet. I had to dig through the QuodLibet source to find out how to use it, but once I understood it, I wrote a utility called sequitur which is intended to be a command line equivalent to ExFalso (QuodLibet's tagging component). It uses this abstraction mechanism and provides some added abstraction and functionality. If you want to check out the source, here's a link to the latest tarball. The package is actually a set of three command line scripts and a module for interfacing with QL. If you want to install the whole thing, you can use: easy_install QLCLI One thing to keep in mind about exfalso/quodlibet (and consequently sequitur) is that they actually implement audio metadata properly, which means that all tags support multiple values (unless the file type prohibits it, which there aren't many that do). So, doing something like: print qllib.AudioFile('foo.mp3')['artist'] Will not output a single string, but will output a list of strings like: [u'The First Artist', u'The Second Artist'] The way you might use it to copy tags would be something like: import os.path import qllib # this is the module that comes with QLCLI def update_tags(mp3_fn, flac_fn): mp3 = qllib.AudioFile(mp3_fn) flac = qllib.AudioFile(flac_fn) # you can iterate over the tag names # they will be the same for all file types for tag_name in mp3: flac[tag_name] = mp3[tag_name] flac.write() mp3_filenames = ['foo.mp3', 'bar.mp3', 'baz.mp3'] for mp3_fn in mp3_filenames: flac_fn = os.path.splitext(mp3_fn)[0] + '.flac' if os.path.getmtime(mp3_fn) != os.path.getmtime(flac_fn): update_tags(mp3_fn, flac_fn)

Related questions

0 votes
    1. What is the commonest type of compressed digital audio file ? (c) .mp3 (d) .wav (b) .flac (a) ... to download and poorer quality Select the correct answer from above options...
asked Dec 15, 2021 in Education by JackTerrance
0 votes
    I can do following: git diff tag1 tag2 --stat But this gives me list of files.. How can I know ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I'm trying to edit the Original code to get the first p tag from product.description and tried the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I'm working on migrating/rewriting some Java generics in C#. I'm getting an error that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    I'm working on migrating/rewriting some Java generics in C#. I'm getting an error that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I'm working on migrating/rewriting some Java generics in C#. I'm getting an error that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    How do I customize the tab-to-space conversion factor when using Visual Studio Code? For instance, right ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    In scala, it is OK to convert a variable in the Seq, but if I construct the Seq with :: it ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    i create this class and it have this constructor : public class ReturnResult : ImplicitReturnResult { public bool ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    A brief search shows that all available (uUnix command line) tools that convert from xsd (XML Schema) to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    I wanna transform a grayscaled iplimage into uiimage and viceversa. I have two methods like below that are ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I am developing a software in Android. In a particular portion of software, I need to convert short to byte and re-convert to it ... short n1 = (short)((short)(b1) | (short)(b2...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I am developing a software in Android. In a particular portion of software, I need to convert short to byte and re-convert to it ... short n1 = (short)((short)(b1) | (short)(b2...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I am developing a software in Android. In a particular portion of software, I need to convert short to byte and re-convert to it ... short n1 = (short)((short)(b1) | (short)(b2...
asked Feb 18, 2022 in Education by JackTerrance
...