Ping. Any thoughts on this?
Cheers, Karsten
> Am 31.07.2018 um 21:16 schrieb Karsten Otto :
>
> After seeking, determine the offset of the next frame in the decrypted
> buffer by scanning the first few bytes for a valid mp3 header.
> This significantly improves the listening
Ping. Any thoughts on this?
Cheers, Karsten
> Am 31.07.2018 um 21:16 schrieb Karsten Otto :
>
> After seeking, determine the offset of the next frame in the decrypted
> buffer by scanning the first few bytes for a valid mp3 header.
> This significantly improves the listening
After seeking, determine the offset of the next frame in the decrypted
buffer by scanning the first few bytes for a valid mp3 header.
This significantly improves the listening experience for audio content
with untypical encoding.
---
This is a refinement of an earlier patch iteration, according to
MP3 frames may not be aligned to aa chunk boundaries. When seeking,
calculate the expected frame offset in the target chunk. Adjust the
timestamp and truncate the next packet accordingly.
This solution works for the majority of tested audio material. For
some rare encodings with mp3 padding or emb
> Am 14.07.2018 um 02:20 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Fri, Jul 13, 2018 at 12:35:07PM +0200, Karsten Otto wrote:
>> MP3 frames may not be aligned to aa chunk boundaries. When seeking,
>> calculate the expected frame offset in the
MP3 frames may not be aligned to aa chunk boundaries. When seeking,
calculate the expected frame offset in the target chunk. Adjust the
timestamp and truncate the next packet accordingly.
This solution works for the majority of tested audio material. For
some rare encodings with mp3 padding or emb
This fixes the check for the reserved MPEG audio version ID,
used to detect an invalid frame header.
---
libavcodec/mpegaudiodecheader.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegaudiodecheader.h b/libavcodec/mpegaudiodecheader.h
index ed9961250a..1da2a4cb6
atch to the patch that is already applied?
Sorry for the inconvenience,
Karsten
> Am 09.07.2018 um 02:46 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Sun, Jul 08, 2018 at 12:26:10PM +0200, Karsten Otto wrote:
>> Check the MPEG version ID for the reserved bit patter
MP3 frames may not be aligned to aa chunk boundaries. When seeking,
calculate the expected frame offset in the target chunk. Adjust the
timestamp and truncate the next packet accordingly.
This solution works for the majority of tested audio material. For
some rare encodings with mp3 padding or emb
> Am 11.07.2018 um 20:09 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Sat, Jul 07, 2018 at 07:41:29PM +0200, Karsten Otto wrote:
>> MP3 frames may not be aligned to aa chunk boundaries. When seeking,
>> calculate the expected frame offset in the
Ping - What about this one? I tested it with about 20 files and it works
perfectly
for all of them - except one which has tag/padding. In its case, playback
quality
is virtually the same as without the patch, i.e. no harm done.
Cheers, Karsten
> Am 07.07.2018 um 19:41 schrieb Karsten O
Check the MPEG version ID for the reserved bit pattern 01, and abort the
header check in that case. This reduces the chance of misinterpreting
arbitrary data as a valid header, and prevents resulting audio artifacts.
---
libavcodec/mpegaudiodecheader.h | 3 +++
1 file changed, 3 insertions(+)
dif
> Am 08.07.2018 um 10:58 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Sat, Jul 07, 2018 at 10:29:11PM +0200, Karsten Otto wrote:
>> Check the MPEG version ID for the reserved bit pattern 01, and abort header
>> parsing in that case. This reduces the c
read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.
So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base based on bitrate in bytes/s, for easy
t
> Am 08.07.2018 um 11:12 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Sat, Jul 07, 2018 at 07:41:28PM +0200, Karsten Otto wrote:
>> read_packet reads content in chunks. Thus seek must be clamped to valid
>> chunk positions in the file, which in turn are r
Check the MPEG version ID for the reserved bit pattern 01, and abort header
parsing in that case. This reduces the chance of misinterpreting arbitrary
data as a valid frame start, and prevents the resulting audio artifacts.
---
libavcodec/mpegaudiodecheader.c | 5 +++--
1 file changed, 3 insertion
read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.
So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base based on bitrate in bytes/s, for easy
t
Remember the end position of audio content in the file and check it during
read_packet. There always seems to be other data beyond it, which could be
misinterpreted as more audio. Also add some extra avio_read error checks,
to bail early in case of a broken/truncated file.
---
libavformat/aadec.c
MP3 frames may not be aligned to aa chunk boundaries. When seeking,
calculate the expected frame offset in the target chunk. Adjust the
timestamp and truncate the next packet accordingly.
This solution works for the majority of tested audio material. For
some rare encodings with mp3 padding or emb
ks for the majority of tested
audio material, while the effect on rare divergent material is negligible.
Karsten Otto (3):
aadec: improve eof detection
aadec: add chapters and seeking
aadec: improve seeking in mp3 content
libavformat/aadec.c | 113 --
> Am 06.07.2018 um 23:32 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Fri, Jul 06, 2018 at 10:49:46AM +0200, Karsten Otto wrote:
>>
>>> Am 04.07.2018 um 23:54 schrieb Michael Niedermayer :
>>>
>>> Signierter PGP-Teil
>>>
> Am 04.07.2018 um 23:54 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Wed, Jul 04, 2018 at 09:32:32AM +0200, Karsten Otto wrote:
>>
>>> Am 04.07.2018 um 03:26 schrieb Michael Niedermayer :
>>>
>>> Signierter PGP-Teil
>>>
> Am 04.07.2018 um 03:26 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Tue, Jul 03, 2018 at 10:25:36PM +0200, Karsten Otto wrote:
>> TL;DR: I will drop patch 3/3, may rather spend some time investigating why
>> "ff ee 47 9d“ passes the mp3 header par
> Am 03.07.2018 um 22:29 schrieb Carl Eugen Hoyos :
>
> 2018-07-03 22:25 GMT+02:00, Karsten Otto :
>
>> It took a closer look at what happens when I hear a BLEEP: The packet begins
>> with a partial frame, starting with the byte sequence "ff ee 47 9d“.
>> Unfo
ichael Niedermayer :
>
> Signierter PGP-Teil
> On Mon, Jul 02, 2018 at 07:21:43PM +0200, Karsten Otto wrote:
>>
>>> Am 02.07.2018 um 10:59 schrieb Michael Niedermayer :
>>>
>>> Signierter PGP-Teil
>>> On Thu, Jun 21, 2018 at 06:58:26PM +0200, Karsten
> Am 02.07.2018 um 10:59 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Thu, Jun 21, 2018 at 06:58:26PM +0200, Karsten Otto wrote:
>> MP3 frames may not be aligned to aa chunk boundaries. After seeking,
>> scan for the next valid frame header. Then truncate
> Am 02.07.2018 um 10:22 schrieb Michael Niedermayer :
>
> Signierter PGP-Teil
> On Thu, Jun 21, 2018 at 06:58:25PM +0200, Karsten Otto wrote:
>> read_packet reads content in chunks. Thus seek must be clamped to valid
>> chunk positions in the file, which in turn are r
> Am 02.07.2018 um 02:33 schrieb Michael Niedermayer :
>
>> […]
>
> What is this additional data ?
>
Short answer: Since there is no official format specification, nobody really
knows.
Longer answer: From what I have read, the aa format is a generic frame,
containing several "tagged“ sectio
Bump… I’d like a review please :-)
Cheers, Karsten
> Am 21.06.2018 um 18:58 schrieb Karsten Otto :
>
> A patch series adding seek support to libavformat/aadec.
>
> This third version of the series addresses all the earlier comments from the
> mailing list (thanks again!).
read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.
So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base to bitrate in bytes/s, for easy timesta
Remember the end position of audio content in the file and check it during
read_packet. There always seems to be other data beyond it, which could be
misinterpreted as more audio. Also add some extra avio_read error checks,
to bail early in case of a broken/truncated file.
---
libavformat/aadec.c
container: After
a seek operation, it skips to the next valid frame header, which prevents
audible glitches from partial frame playback.
Karsten Otto (3):
aadec: improve eof detection
aadec: add chapters and seeking
aadec: fix seeking in mp3 content
libavformat/aadec.c | 129
MP3 frames may not be aligned to aa chunk boundaries. After seeking,
scan for the next valid frame header. Then truncate the packet, and
also adjust timestamp information accordingly.
---
libavformat/aadec.c | 33 -
1 file changed, 28 insertions(+), 5 deletions(-)
to do?
Cheers, Karsten
> Am 18.06.2018 um 00:58 schrieb Ronald S. Bultje :
>
> Hi Karsten,
>
> I believe that the parsers are seek-unaware, so you're expected to delete
> and recreate (or reinit) the parsers after each seek.
>
> Ronald
>
> On Sun, Jun 17, 20
Hi list,
I have a question about mpegaudio_parser. I see that it keeps any packet data
before a frame header, instead of discarding it. This makes sense, because it
usually can combine this data with the leftovers from a previous packet to
complete a frame. But the parser also does this when ju
Remember the end position of audio content in the file and check it during
read_packet. There always seems to be other data beyond it, which could be
misinterpreted as more audio. Also add some extra avio_read error checks,
to bail early in case of a broken/truncated file.
---
Update addresses comm
read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.
So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base to bitrate in bytes/s, for easy timesta
read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.
So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base to bitrate in bytes/s, for easy timesta
what you think, improvements very welcome!
Disclaimer: No reverse engineering was involved in creating this patch.
Everything was derived from preexisting code, mostly aa_read_packet.
Cheers, Karsten
Karsten Otto (2):
aadec: improve eof detection
aadec: add chapters and seeking
Remember the end position of audio content in the file and check it during
read_packet. There always seems to be other data beyond it, which could be
misinterpreted as more audio. Also add some extra avio_read error checks,
to bail early in case of a broken/truncated file.
---
libavformat/aadec.c
40 matches
Mail list logo