From: Martin Ratinaud <martinratinaud@gmail.com>
To: "Måns Rullgård" <mans@mansr.com>
Cc: sox-users@lists.sourceforge.net
Subject: Re: Wav to Mp3 leads to an mp3 file that has a longer duration
Date: Tue, 17 Dec 2019 14:04:04 +0400 [thread overview]
Message-ID: <CAKy7tYjJZEOjRtaNXCC+DctuBK+cKwBJy1RLjWpDbCo0sPdFQw@mail.gmail.com> (raw)
In-Reply-To: <yw1ximmgw4fh.fsf@mansr.com>
[-- Attachment #1.1: Type: text/plain, Size: 1019 bytes --]
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 <mans@mansr.com> wrote:
> Martin Ratinaud <martinratinaud@gmail.com> 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
>
[-- Attachment #1.2: Type: text/html, Size: 1777 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
[-- Attachment #3: Type: text/plain, Size: 158 bytes --]
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
next prev parent reply other threads:[~2019-12-17 10:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 14:26 Wav to Mp3 leads to an mp3 file that has a longer duration Martin Ratinaud
2019-12-11 17:18 ` Jeremy Nicoll - ml sox users
2019-12-12 4:18 ` Martin Ratinaud
2019-12-12 17:05 ` Jeremy Nicoll - ml sox users
2019-12-16 5:10 ` Martin Ratinaud
2019-12-16 11:48 ` Måns Rullgård
2019-12-16 12:02 ` Martin Ratinaud
2019-12-16 13:30 ` Måns Rullgård
2019-12-16 13:36 ` Martin Ratinaud
2019-12-16 17:44 ` Måns Rullgård
2019-12-17 10:04 ` Martin Ratinaud [this message]
2019-12-17 10:50 ` Måns Rullgård
2019-12-18 4:00 ` Martin Ratinaud
2019-12-18 7:43 ` Mikko Olkkonen
2019-12-18 9:06 ` Martin Ratinaud
2019-12-19 9:52 ` Mikko Olkkonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-users
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKy7tYjJZEOjRtaNXCC+DctuBK+cKwBJy1RLjWpDbCo0sPdFQw@mail.gmail.com \
--to=sox-users@lists.sourceforge.net \
--cc=mans@mansr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).