Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60524

Re: Access and write .mp3 metadata/tags using Python 3

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.028
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'subject:Python': 0.06; 'encoded': 0.07; 'subject:using': 0.09; 'python': 0.11; '-tkc': 0.16; 'fine.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'itself,': 0.16; 'modules.': 0.16; 'pythonic': 0.16; 'wrote:': 0.18; 'hey': 0.18; 'trying': 0.19; 'seems': 0.21; 'this?': 0.23; 'subject: .': 0.24; 'title,': 0.24; 'url:moin': 0.24; 'versions': 0.24; 'file.': 0.24; 'looks': 0.24; "i've": 0.25; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; '[1]': 0.29; 'properties': 0.29; '[2]': 0.30; 'ease': 0.30; "i'm": 0.30; 'asked': 0.31; 'code': 0.31; 'getting': 0.31; 'that.': 0.31; 'url:wiki': 0.31; 'libraries': 0.31; 'file': 0.32; 'figure': 0.32; 'url:python': 0.33; 'there': 0.35; 'everyone.': 0.36; 'module.': 0.36; 'charset :us-ascii': 0.36; 'url:org': 0.36; 'should': 0.36; 'two': 0.37; 'mine': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'most': 0.60; 'length': 0.61; 'first': 0.61; 'offer': 0.62; 'email addr:gmail.com': 0.63; 'myself': 0.63; 'different': 0.65; 'believe': 0.68; 'links,': 0.74; 'click': 0.77; 'calculations': 0.84; 'received:50.22': 0.84; 'tags,': 0.95
Date Tue, 26 Nov 2013 09:59:01 -0600
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: Access and write .mp3 metadata/tags using Python 3
In-Reply-To <07682b1c-ae9a-4d0b-878e-abef0eb15f8a@googlegroups.com>
References <07682b1c-ae9a-4d0b-878e-abef0eb15f8a@googlegroups.com>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Get-Message-Sender-Via boston.accountservergroup.com: authenticated_id: tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3247.1385481459.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385481460 news.xs4all.nl 15950 [2001:888:2000:d::a6]:34002
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60524

Show key headers only | View raw


On 2013-11-26 07:41, andonefilms@gmail.com wrote:
> Hey everyone.
> 
> I'm trying to figure out how to get python to access the properties
> section of an mp3 file. When you right click an mp3 file and go to
> properties you can edit the title, album, and things like that.  I
> also want to be able to read the length of the mp3.
> 
> Is there a pythonic way to do this? I asked a professor of mine and
> he said to look into the OS module. 

There are a couple libraries that ease that[1].  Matters are
complicated by the fact that there are two different versions of ID3
tags, v1 and v2.  However most of those libraries should handle them
just fine.

Also, I don't believe that the playtime length is actually encoded in
the file itself, so you might have to do some calculations to find
that.  I've wondered this myself and would be interested to learn
more.  You might look at[2] which seems to offer code using one of
those modules.

Based on the two links, it looks like Mutagen might be the first stop
for getting both parts that you need.

-tkc


[1]
https://wiki.python.org/moin/UsefulModules#ID3_Handling

[2]
http://stackoverflow.com/questions/6037826/finding-the-length-of-an-mp3-file


Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Access and write .mp3 metadata/tags using Python 3 andonefilms@gmail.com - 2013-11-26 07:41 -0800
  Re: Access and write .mp3 metadata/tags using Python 3 Tim Chase <python.list@tim.thechases.com> - 2013-11-26 09:59 -0600
    Re: Access and write .mp3 metadata/tags using Python 3 andonefilms@gmail.com - 2013-11-26 09:10 -0800
      Re: Access and write .mp3 metadata/tags using Python 3 Michael Torrie <torriem@gmail.com> - 2013-11-26 10:22 -0700
  Re: Access and write .mp3 metadata/tags using Python 3 Michael Torrie <torriem@gmail.com> - 2013-11-26 09:41 -0700
  Re: Access and write .mp3 metadata/tags using Python 3 alex23 <wuwei23@gmail.com> - 2013-11-27 10:20 +1000

csiph-web