title: Python library to modify MP3 audio without transcoding
body: <p>I am looking for some general advice about the mp3 format before I start a small project to make sure I am not on a wild-goose chase.</p>
  
  <p>My understanding of the internals of the mp3 format is minimal. Ideally, I am looking for a library that would abstract those details away. I would prefer to use Python (but could be convinced otherwise).</p>
  
  <p>I would like to modify a set of mp3 files in a fairly simple way. I am not so much interested in the ID3 tags but in the audio itself. I want to be able to delete sections (e.g. drop 10 seconds from the 3rd minute), and insert sections (e.g. add credits to the end.)</p>
  
  <p>My understanding is that the mp3 format is lossy, and so decoding it to (for example) PCM format, making the modifications, and then encoding it again to MP3 will lower the audio quality. (I would love to hear that I am wrong.)</p>
  
  <p>I <em>conjecture</em> that if I stay in mp3 format, there will be some sort of minimum frame or packet-size to deal with, so the granularity of the operations may be coarser. I can live with that, as long as I get an accuracy of within a couple of seconds.</p>
  
  <p>I have looked at <a href="http://pymedia.org/" rel="noreferrer">PyMedia</a>, but it requires me to migrate to PCM to process the data. Similarly, <a href="http://lame.sourceforge.net" rel="noreferrer">LAME</a> wants to help me encode, but not access the data in place. I have seen several other libraries that only deal with the ID3 tags.</p>
  
  <p>Can anyone recommend a Python MP3 library? Alternatively, can you disabuse me of my assumption that going to PCM and back is bad and avoidable?</p>