0

I have a music file that is shorter than one second and whenever I save it as mp3, there is always empty space to make it bigger. I'm assuming there's a minimum for mp3. I'm using Logic Pro X. Anyways, how can I do this?

  • 4
    What program are you using? – Meaningful Username Mar 7 '15 at 20:49
  • @Meaningful Username I'm using Logic pro X. It's me the Op. – That Thatson Mar 7 '15 at 22:27
  • If saving as a .wav works ok you could try using a separate MP3 encoder to then output an mp3, and see if that solves your issue. – Darren Ringer Mar 8 '15 at 2:20
  • If you are a programmer and know how to write/run programs, I wrote a Java program that cuts wav files of any specified length and save them as mp3. If you want, I can send it to you. – Ziad Halabi Apr 7 '15 at 4:21
2

I have just done a few experiments using Audacity running under Linux.

I created an mp3 file of length one second, which saved as a file of size 17729 bytes which opens as a 1 second audio file. After cutting it in half (in Audacity) and saving (technically: exporting) it, I get a file of size 9370 bytes which opens as a 0.5 second audio file.

So, I believe that any problem you are having is due to the software you are using, an not due to some limitation of the mp3 file format.

Edit:

Further experiments with 0.25 seconds and 0.1 seconds produce ever smaller file sizes. There will be a minimum, due to the embedded mp3 tags in the file.

  • Theoretically, the shortest possible MP3 would consist of one "transient", using 192 samples of the uncompressed audio data. For CD quality (44,100 samples/sec) that would be about 4.4 milliseconds of audio. But the MP3 specification doesn't put many constraints on the encoding process so long as the result is a valid file. If an MP3 encoder pads the length of the file to the nearest second, or even the nearest minute, it would still comply with the standard. – user19146 Mar 8 '15 at 15:09
  • @alephzero Thanks for that. So, if the OP want his file shorter than his software seems to allow, maybe his best bet is to edit it in something like Audacity (should be available for most operating systems, I think), and then save or export it again? – Old John Mar 8 '15 at 16:33
  • I've found that Audacity on Windows pads out MP3s a little ... interesting that it does not on Linux. – Matthew Read Mar 8 '15 at 17:21
  • AFAIK Audacity uses third-party MP3 encoders, not code written by the Audacity developers themselves. Maybe you have different encoders on Windows and Linux. – user19146 Mar 10 '15 at 22:11
  • @alephzero You are absolutely right about the third-party encoders (and I should have known that). I guess that explains any possible discrepancies between platforms. – Old John Mar 10 '15 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.