[FFmpeg-trac] #566(undetermined:new): Encoding AAC stereo audio which starts silently to mpeg-ts causes 0-channel audio output.

FFmpeg trac at avcodec.org
Tue Oct 18 12:37:26 CEST 2011


#566: Encoding AAC stereo audio which starts silently to mpeg-ts causes 0-channel
audio output.
-------------------------------------+-------------------------------------
             Reporter:  tungj        |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by tungj):

 Replying to [comment:6 cehoyos]:
 > I can fix the problem with --analyzeduration 1000000000, does this also
 (always) work for you?

 Yes, thank you very much! I wasn't aware of that setting; it's listed in
 ffmpeg -h but not the man docs (unless I've compiled those incorrectly).
 The mpegts is correctly reported to have audio with
 {{{
 ffprobe -analyzeduration 1000000000 initialSilence.ts
 }}}
 and the output .mp4 from further processing has an audio track.
 {{{
 ffmpeg -analyzeduration 1000000000 -i initialSilence.ts -vcodec copy
 -acodec libfaac -ar 22050 -ab 40k initialSilence.mp4
 }}}

 Looking at the code, ''avformat_find_stream_info'' checks up to
 ''max_analyze_duration'' which defaults to 5 * ''AV_TIME_BASE'' (defined
 as 1000000; 1 second); in my case I had more than 5 seconds of silence so
 it probably didn't find the start of the audio despite finding the audio
 track. I'm not sure why it correctly reports stereo audio when there's
 only silence though:

 {{{
 ffmpeg -y -i 'initialSilence.mp4' -f mpegts -t 5 -acodec libfaac -ab 40k
 -ar 22050 initialSilence.ts;
 ffprobe initialSilence.ts
 }}}
 reports {{{Stream #0.1[0x101](und): Audio: aac, 22050 Hz, stereo, s16, 2
 kb/s}}}

 I'm also not sure why ffprobe on the .ts created by libvo_aacenc correctly
 reports two channels without explicitly setting -analyzeduration;
 exporting the -acodec libvo_aacenc initialSilence.ts file to a .wav with
 {{{
 ffmpeg -i initialSilence.ts -vn libvo_silence.wav
 }}}
 seems to just start with silence (a long sequence of null bytes after the
 RIFF...WAVEfmt...data header), slightly longer than the silence in the
 .wav from the exported -acodec libfaac.

-- 
Ticket URL: <https://www.avcodec.org/trac/ffmpeg/ticket/566#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list