[FFmpeg-trac] #9708(undetermined:new): .aac files produced by ffmpeg miss duration

FFmpeg trac at avcodec.org
Thu Mar 31 16:00:24 EEST 2022


#9708: .aac files produced by ffmpeg miss duration
-------------------------------------+-------------------------------------
             Reporter:  Jozef        |                    Owner:  (none)
  Chutka                             |
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:  aac          |               Blocked By:
  duration                           |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Jozef Chutka:

Old description:

> When doing some audio manipulation with ffmpeg, the .aac output miss
> duration information. I wonder if this is a container design issue or
> ffmpeg implementation bug.
>
> {{{
> ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -y out.aac
> ffmpeg -i out.aac
>
> [aac @ 0000027a343998c0] Estimating duration from bitrate, this may be
> inaccurate
> Input #0, aac, from 'output/out.aac':
>   Duration: 00:02:31.21, bitrate: 1 kb/s
> }}}
>

> .m4a extension (which I see being used on
> https://trac.ffmpeg.org/wiki/Encode/AAC) seems ok
>
> {{{
> ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -y out.m4a
> ffmpeg -i out.aac
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output/out.m4a':
>   Metadata:
>     major_brand     : M4A
>     minor_version   : 512
>     compatible_brands: M4A isomiso2
>     encoder         : Lavf59.17.101
>   Duration: 00:00:06.62, start: 0.000000, bitrate: 33 kb/s
> }}}
>
> A combination of m4a format for aac encoder doesnt seem appropriate:
>
> {{{
> ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -f m4a -y
> out.aac
> [NULL @ 00000237e631db40] Requested output format 'm4a' is not a suitable
> output format
> }}}
>
> mp4 format in .aac seems ok:
>
> {{{
> ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -f mp4 -y
> out.aac
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output/out.aac':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2mp41
>     encoder         : Lavf59.17.101
>   Duration: 00:00:06.62, start: 0.000000, bitrate: 33 kb/s
> }}}
>
> But I am not sure its ok to have mp4 inside .aac file.
>
> Marking it as a defect b/c I believe that .aac with its default container
> should provide duration information.
>
> Using ffmpeg version 2022-02-07-git-04cc7a5548-full_build-www.gyan.dev

New description:

 When doing some audio manipulation with ffmpeg, the .aac output miss
 duration information. I wonder if this is a container design issue or
 ffmpeg implementation bug.

 {{{
 ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -y out.aac
 ffmpeg -i out.aac

 [aac @ 0000027a343998c0] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, aac, from 'output/out.aac':
   Duration: 00:02:31.21, bitrate: 1 kb/s
 }}}


 .m4a extension (which I see being used on
 https://trac.ffmpeg.org/wiki/Encode/AAC) seems ok

 {{{
 ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -y out.m4a
 ffmpeg -i out.aac

 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output/out.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: M4A isomiso2
     encoder         : Lavf59.17.101
   Duration: 00:00:06.62, start: 0.000000, bitrate: 33 kb/s
 }}}

 A combination of m4a format for aac encoder doesnt seem appropriate:

 {{{
 ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -f m4a -y
 out.aac
 [NULL @ 00000237e631db40] Requested output format 'm4a' is not a suitable
 output format
 }}}

 mp4 format in .aac seems ok:

 {{{
 ffmpeg -filter_complex amovie=source.wav,adelay=4000 -c:a aac -f mp4 -y
 out.aac
 ffmpeg -i out.aac

 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output/out.aac':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2mp41
     encoder         : Lavf59.17.101
   Duration: 00:00:06.62, start: 0.000000, bitrate: 33 kb/s
 }}}

 But I am not sure its ok to have mp4 inside .aac file.

 Marking it as a defect b/c I believe that .aac with its default container
 should provide duration information.

 Using ffmpeg version 2022-02-07-git-04cc7a5548-full_build-www.gyan.dev

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9708#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list