Round trip wav->mp3->wav now preserves the correct number of samples.
Remuxing mp3->mp3 with -c:a copy also preserves any existing gapless
metadata in the Info tag.
The code in libmp3lame.c to set AV_PKT_DATA_SKIP_SAMPLES was mostly
copied from libopusenc.c.
Jon Toohill (2):
lavc/l
---
libavcodec/libmp3lame.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5642264..e55aa85 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -50,6 +50,7 @@ typedef struct L
---
libavformat/mp3enc.c | 34 --
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index de63401..4c97fa1 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -111,6 +111,8 @@ typedef struct MP3Con
---
libavformat/mp3enc.c | 34 +++---
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index de63401..ddf4b93 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -111,6 +111,8 @@ typedef struct MP3Con
Round trip wav->mp3->wav now preserves the correct number of samples.
Remuxing mp3->mp3 with -c:a copy also preserves any existing gapless
metadata in the Info tag.
The code in libmp3lame.c to set AV_PKT_DATA_SKIP_SAMPLES was mostly
copied from libopusenc.c.
Jon Toohill (2):
lavc/l
---
libavcodec/libmp3lame.c | 26 +-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5642264..b3ba0d8 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -50,6 +50,7 @@ typedef struct LA
On Wed, Oct 5, 2016 at 11:03 AM, wm4 wrote:
> On Wed, 5 Oct 2016 10:42:13 -0700
> Jon Toohill wrote:
>
> > On Wed, Oct 5, 2016 at 10:40 AM, Jon Toohill
> wrote:
> >
> > > On Tue, Oct 4, 2016 at 7:19 AM, wm4 wrote:
> > >
> > >> On Mon
On Wed, Oct 5, 2016 at 10:40 AM, Jon Toohill wrote:
> On Tue, Oct 4, 2016 at 7:19 AM, wm4 wrote:
>
>> On Mon, 3 Oct 2016 17:45:08 -0700
>> Jon Toohill wrote:
>>
>> > Muxers can check AVCodecParameters.initial_padding for the
>> > encoder+decoder de
On Tue, Oct 4, 2016 at 9:10 AM, Michael Niedermayer
wrote:
> On Mon, Oct 03, 2016 at 05:45:08PM -0700, Jon Toohill wrote:
> > Muxers can check AVCodecParameters.initial_padding for the
> > encoder+decoder delay, and read the AV_PKT_DATA_SKIP_SAMPLES
> > side data from th
On Tue, Oct 4, 2016 at 7:19 AM, wm4 wrote:
> On Mon, 3 Oct 2016 17:45:08 -0700
> Jon Toohill wrote:
>
> > Muxers can check AVCodecParameters.initial_padding for the
> > encoder+decoder delay, and read the AV_PKT_DATA_SKIP_SAMPLES
> > side data from the last pac
Muxers can check AVCodecParameters.initial_padding for the
encoder+decoder delay, and read the AV_PKT_DATA_SKIP_SAMPLES
side data from the last packet for the encoder padding.
This change also fixes the first_discard_sample calculation
which erroneously included the decoder delay. Decoder delay
is
---
libavcodec/libmp3lame.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5642264..a1bf122 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -185,7 +185,7 @@ static int mp3lame_e
---
libavformat/mp3enc.c | 32 +---
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index de63401..48cb0b4 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -111,6 +111,7 @@ typedef struct MP3Conte
Round trip wav->mp3->wav now preserves the correct number of samples.
Remuxing mp3->mp3 with -c:a copy also preserves any existing gapless
metadata in the Info tag.
The code in libmp3lame.c to set AV_PKT_DATA_SKIP_SAMPLES was mostly
copied from libopusenc.c.
Jon Toohill (3):
lavc/l
This was sent in error, please disregard.
Jon Toohill | Google Play Music | jtooh...@google.com | (650) 215-0770
On Wed, Sep 28, 2016 at 11:28 AM, Jon Toohill wrote:
> This preserves changes to fields of AVCodecContext that get
> updated during encoding, such as trailing_padding
Oops, forgot to send this in reply to the previous thread. Should I re-send?
http://ffmpeg.org/pipermail/ffmpeg-devel/2016-September/200092.html
On Wed, Sep 28, 2016 at 11:28 AM, Jon Toohill wrote:
> Trimming trailing_padding samples from the end of the track is not yet
> implemented.
&
---
libavformat/mp3dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 56c7f8c..9cc85a3 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -239,6 +239,8 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream
*st,
trailing_padding is not known before encoding.
---
libavformat/mp3enc.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index de63401..37608f1 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -247,
On Tue, Sep 27, 2016 at 1:04 AM, Carl Eugen Hoyos
wrote:
> 2016-09-26 19:13 GMT+02:00 Jon Toohill >:
>
> > +avctx->trailing_padding = FFMAX(lame_get_encoder_padding(s->gfp)
> - 528 - 1, 0);
>
> Can you confirm that this function exists in lame 3.98.3?
>
This preserves changes to fields of AVCodecParameters that
get updated during encoding, such as trailing_padding
(which may not be known until encoding is complete).
---
ffmpeg.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index d0f247e..0cdc762 100644
This preserves changes to fields of AVCodecContext that get
updated during encoding, such as trailing_padding (which
may not be known until encoding is complete).
---
ffmpeg.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index df55a49..1e973f5 100644
---
---
libavcodec/libmp3lame.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5642264..1566921 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -218,6 +218,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx,
AV
Trimming trailing_padding samples from the end of the track is not yet
implemented.
Jon Toohill (4):
ffmpeg: re-copy codec parameters after encoding
lavc/libmp3lame: set trailing_padding after flushing encoder
lavf/mp3enc: write encoder delay/padding upon closing
lavf/mp3dec: read encoder
a
concrete case where knowing trailing_padding at the start of a stream is
necessary, then that's not possible, but I'm pretty new to this and don't
know of one. Thoughts?
Jon Toohill | Google Play Music | jtooh...@google.com | (650) 215-0770
On Mon, Sep 26, 2016 at 11:30 AM, wm4
trailing_padding is not known before encoding.
---
libavformat/mp3enc.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index de63401..433b070 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -247,
---
libavformat/mp3dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 56c7f8c..9cc85a3 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -239,6 +239,8 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream
*st,
This preserves changes to fields of AVCodecContext that get
updated during encoding, such as trailing_padding (which
may not be known until encoding is complete).
---
ffmpeg.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index df55a49..1e973f5 100644
---
---
libavcodec/libmp3lame.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5642264..1566921 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -218,6 +218,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx,
AV
Trimming trailing_padding samples from the end of the track is not yet
implemented.
Jon Toohill (4):
ffmpeg: re-copy codec contexts after encoding
lavc/libmp3lame: set trailing_padding after flushing encoder
lavf/mp3enc: write encoder delay/padding upon closing
lavf/mp3dec: read encoder
---
ffmpeg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index bae515d..49a1b03 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3001,6 +3001,7 @@ static int transcode_init(void)
enc_ctx->audio_service_type = dec_ctx->audio_service_type;
enc_ct
Shows encoder delay/padding in the stream summary if they are set.
---
doc/APIchanges | 4
libavcodec/avcodec.h | 11 +++
libavcodec/utils.c | 40 +++-
libavcodec/version.h | 2 +-
4 files changed, 39 insertions(+), 18 deletions(-)
diff -
arate patch set.
Jon Toohill (2):
lavc: add trailing_padding to AVCodecContext to match
AVCodecParameters.
ffmpeg: copy trailing_padding when using -acodec copy
doc/APIchanges | 4
ffmpeg.c | 1 +
libavcodec/avcodec.h | 11 +++
libavcodec/utils.c
initial_padding specifies only encoder delay, decoder delay is
handled by start_skip_samples.
---
doc/APIchanges | 4
libavcodec/libmp3lame.c | 2 +-
libavcodec/version.h| 2 +-
libavformat/mp3enc.c| 4 ++--
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/doc/A
---
ffmpeg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index 652774f..442f818 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3001,6 +3001,7 @@ static int transcode_init(void)
enc_ctx->audio_service_type = dec_ctx->audio_service_type;
enc_ct
---
libavformat/mp3enc.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 3b77d29..da70d13 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -248,11 +248,14 @@ static int mp3_write_xing(AVFormatContext *s)
---
libavformat/mp3dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 56c7f8c..345fa88 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -239,6 +239,8 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream
*st,
Also adds trailing_padding to AVCodecContext to match
AVCodecParameters so that it doesn't get lost when mapping
between them.
---
doc/APIchanges | 4
libavcodec/avcodec.h | 11 +++
libavcodec/utils.c | 40 +++-
libavcodec/version.h | 2 +-
t set properly when encoding with libmp3lame,
causing an encode/decode round trip to add trailing silence. This is not a
regression from current behavior, and will be addressed in a separate patch set.
Jon Toohill (5):
lavf/mp3dec: pass Xing gapless metadata to AVCodecParameters
libmp3lame + m
including
documentation and another minor version bump.
Jon Toohill | Google Play Music | jtooh...@google.com | (650) 215-0770
On Fri, Jun 17, 2016 at 5:32 PM, Michael Niedermayer wrote:
> On Thu, Jun 16, 2016 at 11:16:05AM -0700, Jon Toohill wrote:
> > Also removes decoder dela
---
ffmpeg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index 652774f..442f818 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3001,6 +3001,7 @@ static int transcode_init(void)
enc_ctx->audio_service_type = dec_ctx->audio_service_type;
enc_ct
Also removes decoder delay compensation from libmp3lame and mp3enc.
initial_padding specifies only encoder delay, decoder delay is
handled by start_skip_samples.
---
libavcodec/libmp3lame.c | 2 +-
libavformat/mp3dec.c| 2 ++
libavformat/mp3enc.c| 9 ++---
3 files changed, 9 insertions
Also adds trailing_padding to AVCodecContext to match
AVCodecParameters so that it doesn't get lost when mapping
between them.
---
doc/APIchanges | 4
libavcodec/avcodec.h | 11 +++
libavcodec/utils.c | 40 +++-
libavcodec/version.h | 2 +-
t set properly when encoding with libmp3lame,
causing an encode/decode round trip to add trailing silence. This is not a
regression from current behavior, and will be addressed in a separate patch set.
Jon Toohill (3):
lavf/mp3dec: pass Xing gapless metadata to AVCodecParameters
lavc: show gapless
Michael et al., is this good to merge as-is? I just tested and a round trip
with ffmpeg from wav -> mp3 -> wav retains the correct number of samples.
Jon Toohill | Google Play Music | jtooh...@google.com | (650) 215-0770
On Wed, Jun 1, 2016 at 5:58 PM, Jon Toohill wrote:
> Ba
txt
Jon Toohill | Google Play Music | jtooh...@google.com | (650) 215-0770
On Thu, May 26, 2016 at 7:51 PM, Michael Niedermayer wrote:
> On Wed, May 25, 2016 at 09:56:59AM -0700, Jon Toohill wrote:
> > ---
> > libavformat/mp3dec.c | 2 ++
> > 1 file changed, 2 ins
---
libavformat/mp3dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 3725d67..192f5ef 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -234,6 +234,8 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream
*st,
These patches expose the encoder delay/padding parsed from an mp3's Xing header
to users of lavc/lavf, and show gapless info in the stream summary string.
Jon Toohill (2):
lavf/mp3dec: pass Xing gapless metadata to AVCodecParameters
lavc: show gapless info in stream summary
doc/APIch
Also adds trailing_padding to AVCodecContext to match
AVCodecParameters so that it doesn't get lost when mapping
between them.
---
doc/APIchanges | 4
libavcodec/avcodec.h | 11 +++
libavcodec/utils.c | 38 ++
libavcodec/version.h | 2 +-
Forgot to fix the author line in those patches, it should read "Jon Toohill
" instead. I can fix it when sending updated patches
if there are revisions to make, otherwise can you change it before merging
(or should I send updated patches)?
Jon Toohill | Google Play Music | jtooh...@
From: Jon Toohill
Also adds trailing_padding to AVCodecContext to match
AVCodecParameters so that it doesn't get lost when mapping
between them.
---
libavcodec/avcodec.h | 11 +++
libavcodec/utils.c | 38 ++
2 files changed, 33 insertions(+
From: Jon Toohill
---
libavformat/mp3dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 3725d67..192f5ef 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -234,6 +234,8 @@ static void mp3_parse_info_tag(AVFormatContext *s
These patches expose the encoder delay/padding parsed from an mp3's Xing header
to users of lavc/lavf, and show gapless info in the stream summary string.
Jon Toohill (2):
lavf/mp3dec: pass Xing gapless metadata to AVCodecParameters
lavc: show gapless info in stream summary
libav
52 matches
Mail list logo