[FFmpeg-trac] #4577(undetermined:new): Wrong duration for G.729 in wav

FFmpeg trac at avcodec.org
Tue Jul 21 05:20:19 CEST 2015


#4577: Wrong duration for G.729 in wav
-------------------------------------+-------------------------------------
             Reporter:  cehoyos      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  minor        |                Component:
              Version:  git-master   |  undetermined
             Keywords:  wav g729     |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
Changes (by gajjanag):

 * cc: gajjanagadde@… (added)


Comment:

 Attached file does not conform to the WAV specification.
 See http://www-
 mmsp.ece.mcgill.ca/documents/AudioFormats/WAVE/Docs/RIFFNEW.pdf (under
 Fact Chunk),
 and source code libavformat/wavdec.c.
 The Fact Chunk is supposed to contain number of samples (since codec is
 compressed), and is set to 135200 here.
 However, it should be 135200 * 8.
 Note that the fact chunk is currently redundant, since the number of
 samples can alternatively
 be derived from the data size and bits per sample,
 and so most programs (except ffmpeg) use this to derive number of samples.
 ffmpeg also does this, but only in some other situations.
 If ffmpeg did this for G.729 as well, correct duration can be reported.

 I thus see two possible solutions:
 1. Continue to bend over backwards so as to support an even larger set of
 non spec compliant files,
 and thus make behavior match that of other media libraries/players.
 2. Not fix this, as file is not spec compliant.

 BTW, I have not looked into the non-monotone DTS aspect,
 but suspect it would follow from correctly setting duration and related
 timestamp stuff.

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


More information about the FFmpeg-trac mailing list