[FFmpeg-user] Preserving AAC LC status when converting to fragmented MP4

Moritz Barsnick barsnick at gmx.net
Mon May 17 13:51:23 EEST 2021


On Fri, May 14, 2021 at 14:31:42 +0100, Simon Brown wrote:
> Hi,
> I have a mpeg2 transport stream with video as H264 and audio as AAC LC.  If
> I use the following command to convert it to fragmented MP4 by just copying
> the encoded data, then the result is now AAC, and not AAC LC.  If instead I
> re-encode with AAC asking for profile:a aac_low then I get AAC LC.  But if
> the input source is AAC LC why would it change the output type to AAC?
>
> ffmpeg.exe -f mpegts -fflags +nobuffer+nofillin -probesize 5000000 -i
> soc_udp_rx_02.ts -c:a copy -bsf:a aac_adtstoasc -c:v copy -f mp4
> -frag_duration 80000 -movflags +empty_moov+default_base_moof -metadata
> title="media source exentions" testaudio.mp4

This shouldn't change anything in the AAC stream, unless the bitstream
filter is capable of ruining it.

> ffmpeg version git-2020-06-19-2f59946 Copyright (c) 2000-2020 the FFmpeg developers

This is a bit old, please retry with a recent build.

> For although there it says aac (LC) if I run mp4info on the resultant file
> I get this:
>
> mp4info testaudio.mp4
[...]
> Track 2:
>   flags:        3 ENABLED IN-MOVIE
>   id:           2
>   type:         Audio
>   duration: 0 ms
>   language: und
>   media:
>     sample count: 0
>     timescale:    48000
>     duration:     0 (media timescale units)
>     duration:     0 (ms)
>     bitrate (computed): 125.373 Kbps
>     sample count with fragments: 848
>     duration with fragments:     868354
>     duration with fragments:     18091 (ms)
>   Sample Description 0
>     Coding:      mp4a (MPEG-4 Audio)
>     Stream Type: Audio
>     Object Type: MPEG-4 Audio
>     Max Bitrate: 128250
>     Avg Bitrate: 0
>     Buffer Size: 0
>     Codecs String: mp4a.40.0
>     MPEG-4 Audio Object Type: 0 (UNKNOWN)
>     Sample Rate: 48000
>     Sample Size: 16
>     Channels:    2

What does it say about the original? (Nothing, presumably, because it's
MPEG-TS.) What does ffmpeg say about the output file? Do you have any
other tool which can use to check?

Cheers,
Moritz


More information about the ffmpeg-user mailing list