I have got an mp3 file, let's say it is 25 minutes long. I understand that any software is capable of extracting the first 20 minutes of the file as a new MP3 file. However, I would like to find a solution that would do this "loss-lessly", i.e., keep the original MP3 blocks and just use the first 4/5 of the blocks and modify the header accordingly. This way, no quality loss is imposed by the extraction process. I'm cutting the file in a space where couple seconds of silence happen, so cutting between blocks should be possible.
(A good analogy would be to take a cut-out of a JPG file at the boundaries of the blocks simply by taking only the blocks inside the cutout. One can decode the file, cut it and encode it again, but with a quality loss.)
(As far as I know, by default, software would decode the file into a waveform, extract the demanded part and encode it again using the MP3 algorithm. This is not what I want, since the 2nd compression unnecessarily reduces the quality.)
(I prefer a linux solution, but I can access windows as well.)