Answer the question
In order to leave comments, you need to log in
How to trim an mp3 file?
I read an article on Habré about the structure of an Mp3 file. The link to the article is in the comment, since they won’t let me leave it in the post again. Download plugin hex editor for NotePad++. Opened an mp3 file in it. Everything was done according to the formula. I subtracted id3 data from the file size in bytes, then divided by the duration in seconds and got the size of one second in bytes. I tried to cut the first 30 seconds of the song. It happened to the nearest fraction of a second. The first 2 songs cut successfully. But there were problems with the third song. A picture is sewn into it and when I cut, at the output the song starts a second and a half earlier than necessary. So I don't understand what the problem is. Of course, I take into account the size of the picture. It is in id3 data and I subtract its size before dividing by seconds.
If someone is interested in understanding and at the same time helping, you can download the problematic song from the link in the comments. Tried to cut the first 68 seconds.
Answer the question
In order to leave comments, you need to log in
Why not immediately cut in a notebook?
If, in fact ,
ffmpeg -ss 00:00:30.00 -t 25 -i bar.mp3 -acodec copy bar-new.mp3
cuts with any accuracy any file that you feed, even video
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question