Writing tags shortens mp3

Post Reply
Grallis
User
Posts: 3
Joined: Mon Aug 01, 2011 6:27 pm
Are you a spambot?: no

Writing tags shortens mp3

Post by Grallis » Fri Apr 19, 2013 6:18 am

Hello all, just hoping to get a point in the right direction. I've written a program that manages my audio and video files. It has a web interface and all works well.

The problem I'm having now is, when I upload a new mp3 that's been created with no tags, or when I create one on the server dynamically, I then try to write ID3 tags to it, which works, but it seems to shorten the mp3 file. The track time seems accurate, but it plays in most cases several minutes shorter than the original.

Any ideas why this would happen, and any suggestions on how to fix it?

Thanks in advance :)

Using PHP 5.3.x
getid3() 1.9.5

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Writing tags shortens mp3

Post by James Heinrich » Fri Apr 19, 2013 12:54 pm

Can you please provide a sample of before and after (same file, before writing tags and after writing tags) that shows this problem?
Post or PM a link, or email the files directly to info@getid3.org

Grallis
User
Posts: 3
Joined: Mon Aug 01, 2011 6:27 pm
Are you a spambot?: no

Re: Writing tags shortens mp3

Post by Grallis » Thu Apr 25, 2013 9:51 am

Thanks for your reply, James, and I apologize for my late response. I'm still looking into the issue where I can. I'm using ffmpeg to convert m4a and aac files to mp3 format, then using getid3() to write tags to the resulting mp3 file. What is happening is, I successfully convert and dynamically rename the file, when played, it works perfectly. After writing the tags with EITHER getid3() or ffmpeg itself, this shortening of the file happens. I'm not sure if ffmpeg is screwing up the header info upon mp3 conversion or what's going on.

Either way, it looks like it may not be a getid3() problem, so I will look into it more before continuing here on the forum. Thanks for your assistance!

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Writing tags shortens mp3

Post by James Heinrich » Thu Apr 25, 2013 11:51 am

In any case I'd be curious to see before-and-after file samples. I might be able to spot where the problem lies. A sample file (before tagging AND tagged with ffmpeg AND tagged with getID3) would be insightful.

Post Reply