Re: Wav to Mp3 leads to an mp3 file that has a longer duration
Martin Ratinaud <[email protected]>
| Newsgroups | gmane.comp.audio.sox |
|---|---|
| Message-ID | <CAKy7tYjJZEOjRtaNXCC+DctuBK+cKwBJy1RLjWpDbCo0sPdFQw@mail.gmail.com> |
Thanks for the tip! What codec should I use then ? Thanks ----------------------------------------------------------------------- *Martin RATINAUD* ----------------------------------------------------------------------- On Mon, Dec 16, 2019 at 9:44 PM Måns Rullgård <[email protected]> wrote: > Martin Ratinaud <[email protected]> writes: > > > Ok, thanks. > > > > But would it be possible to > > - add silence samples at the end of the wav file so that is is a multiple > > of 1152 > > - convert it to an mp3 > > - and get the exact same number of samples with no change between wav > > duration and mp3 duration > > > > Because I just test with a wav file that is 8640000 samples = 7500 * 1152 > > and when I convert it to an mp3, I get 8641152 samples > > Apparently the LAME encoder is adding an extra frame for some reason. > MP3 is weird like this. If you need the number of samples to be exact, > you'll have to switch a more modern codec. > > -- > Måns Rullgård > _______________________________________________ Sox-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sox-users