izderadicka / audioserve

Simple personal server to serve audiofiles files from folders. Intended primarily for audio books, but anything with decent folder structure will do.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

M4B files with AAC using "scalable configurations" cannot be played without transcoding

izderadicka opened this issue · comments

Without transcoding, just remuxing audio stream ffmpeg fails with

[adts @ 0x562cb448d440] Scalable configurations are not allowed in ADTS
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input

Also some information about similar problem is here https://rentry.co/n4ost
From there:

FWIW, I've got to the bottom of the problem with those specific files .. they're de-DRMed Audible AAX files, and for some reason those sampled at 44.1kHz have a bit flipped in the ESDS atom's Audio Specific Config section .. it's referred to as "dependsOnCoreCoder" in most OSS code. Flipping it back makes the file playable without transcoding.

So question is now - is it a problem of file - incorrectly prepared? Or can we somehow fix with some additional ffmpeg params?

Does not look as easy to fix - as for now WA is play them transcoded.

I have found proposed solution here to ignore/overwrite such ESDS bits, https://rentry.co/n4ost. This issue happend for audible aax files with strero 41kHz stream there. 22kHz stream are playable correctly via ffmpeg.

Thanks, looks like the way how user can manually fix file locally. It will not help with remuxing of m4b to adts stream I think - for this some fix/workaround/parameters for ffmpeg are needed.