[FFmpeg-devel,2/2] avformat: add mapping for AC-4 in MP4

Submitted by Paul B Mahol on Feb. 17, 2019, 8:25 p.m.

Details

Message ID 20190217202503.8596-2-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol Feb. 17, 2019, 8:25 p.m.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavformat/isom.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Carl Eugen Hoyos Feb. 17, 2019, 8:48 p.m.
2019-02-17 21:25 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavformat/isom.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavformat/isom.c b/libavformat/isom.c
> index 0a4d901be5..0052db539e 100644
> --- a/libavformat/isom.c
> +++ b/libavformat/isom.c

> +    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') },
> /* ETSI TS 103 190 */

Are there no codec-specific atoms needed when remuxing ac-4?

Carl Eugen
Paul B Mahol Feb. 17, 2019, 8:50 p.m.
On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 2019-02-17 21:25 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>> ---
>>  libavformat/isom.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>> index 0a4d901be5..0052db539e 100644
>> --- a/libavformat/isom.c
>> +++ b/libavformat/isom.c
>
>> +    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') },
>> /* ETSI TS 103 190 */
>
> Are there no codec-specific atoms needed when remuxing ac-4?

They are completely optional and not needed for decoding or remuxing.
Carl Eugen Hoyos Feb. 17, 2019, 9:12 p.m.
2019-02-17 21:50 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
> On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>> 2019-02-17 21:25 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>> ---
>>>  libavformat/isom.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>>> index 0a4d901be5..0052db539e 100644
>>> --- a/libavformat/isom.c
>>> +++ b/libavformat/isom.c
>>
>>> +    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') },
>>> /* ETSI TS 103 190 */
>>
>> Are there no codec-specific atoms needed when remuxing ac-4?
>
> They are completely optional and not needed for decoding or remuxing.

Thank you for the explanation!
Do we already have samples?

Carl Eugen
Paul B Mahol Feb. 17, 2019, 9:14 p.m.
On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 2019-02-17 21:50 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>> On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>>> 2019-02-17 21:25 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>>> ---
>>>>  libavformat/isom.c | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>>>> index 0a4d901be5..0052db539e 100644
>>>> --- a/libavformat/isom.c
>>>> +++ b/libavformat/isom.c
>>>
>>>> +    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') },
>>>> /* ETSI TS 103 190 */
>>>
>>> Are there no codec-specific atoms needed when remuxing ac-4?
>>
>> They are completely optional and not needed for decoding or remuxing.
>
> Thank you for the explanation!
> Do we already have samples?
>

http://testassets.dashif.org/#feature/details/586fb3879ae9045678eab593
James Almer Feb. 17, 2019, 9:22 p.m.
On 2/17/2019 6:14 PM, Paul B Mahol wrote:
> On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>> 2019-02-17 21:50 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>>> On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>>>> 2019-02-17 21:25 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>>>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>>>> ---
>>>>>  libavformat/isom.c | 1 +
>>>>>  1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>>>>> index 0a4d901be5..0052db539e 100644
>>>>> --- a/libavformat/isom.c
>>>>> +++ b/libavformat/isom.c
>>>>
>>>>> +    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') },
>>>>> /* ETSI TS 103 190 */
>>>>
>>>> Are there no codec-specific atoms needed when remuxing ac-4?
>>>
>>> They are completely optional and not needed for decoding or remuxing.
>>
>> Thank you for the explanation!
>> Do we already have samples?
>>
> 
> http://testassets.dashif.org/#feature/details/586fb3879ae9045678eab593

There's a dac4 atom inside the Audio Sample Entry, much like AC-3 has a
dac3 and EAC-3 a dec3 atom.
Are you sure it's optional? Codec specific atoms inside the stream's
Video/Audio Sample Entry tend to be obligatory.
Paul B Mahol Feb. 17, 2019, 9:52 p.m.
On 2/17/19, James Almer <jamrial@gmail.com> wrote:
> On 2/17/2019 6:14 PM, Paul B Mahol wrote:
>> On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>>> 2019-02-17 21:50 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>>>> On 2/17/19, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>>>>> 2019-02-17 21:25 GMT+01:00, Paul B Mahol <onemda@gmail.com>:
>>>>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>>>>> ---
>>>>>>  libavformat/isom.c | 1 +
>>>>>>  1 file changed, 1 insertion(+)
>>>>>>
>>>>>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>>>>>> index 0a4d901be5..0052db539e 100644
>>>>>> --- a/libavformat/isom.c
>>>>>> +++ b/libavformat/isom.c
>>>>>
>>>>>> +    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') },
>>>>>> /* ETSI TS 103 190 */
>>>>>
>>>>> Are there no codec-specific atoms needed when remuxing ac-4?
>>>>
>>>> They are completely optional and not needed for decoding or remuxing.
>>>
>>> Thank you for the explanation!
>>> Do we already have samples?
>>>
>>
>> http://testassets.dashif.org/#feature/details/586fb3879ae9045678eab593
>
> There's a dac4 atom inside the Audio Sample Entry, much like AC-3 has a
> dac3 and EAC-3 a dec3 atom.
> Are you sure it's optional? Codec specific atoms inside the stream's
> Video/Audio Sample Entry tend to be obligatory.

From specification:
The ac4_dsi shall not be used to configure the AC-4 decoder. The AC-4
decoder shall obtain its configuration only
from ac4_toc , which is part of every sample.

Patch hide | download patch | download mbox

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 0a4d901be5..0052db539e 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -368,6 +368,7 @@  const AVCodecTag ff_codec_movaudio_tags[] = {
     { AV_CODEC_ID_SMV,             MKTAG('s', 's', 'm', 'v') }, /* 3GPP2 */
     { AV_CODEC_ID_FLAC,            MKTAG('f', 'L', 'a', 'C') }, /* nonstandard */
     { AV_CODEC_ID_OPUS,            MKTAG('O', 'p', 'u', 's') }, /* mp4ra.org */
+    { AV_CODEC_ID_AC4,             MKTAG('a', 'c', '-', '4') }, /* ETSI TS 103 190 */
     { AV_CODEC_ID_NONE, 0 },
 };