[FFmpeg-trac] #2786(avformat:new): TTA streams in Matroska aren't demuxed correctly

FFmpeg trac at avcodec.org
Mon Jul 15 10:43:57 CEST 2013


#2786: TTA streams in Matroska aren't demuxed correctly
-------------------------------------+-------------------------------------
               Reporter:  jamal      |                  Owner:
                   Type:  defect     |                 Status:  new
               Priority:  normal     |              Component:  avformat
                Version:  git-       |               Keywords:  matroska
  master                             |  tta
             Blocked By:             |               Blocking:
Reproduced by developer:  0          |  Analyzed by developer:  0
-------------------------------------+-------------------------------------
 Using inside.tta from the FATE test suit as an example:


 Testing MD5 of the decoded stream:

 {{{
 $ ./ffmpeg -i ../samples/lossless-audio/inside.tta -f md5 -
 ffmpeg version N-54738-g04b9836 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jul 14 2013 17:57:33 with gcc 4.7.3 (GCC)
   configuration: --enable-nonfree --enable-gpl --enable-libfdk-aac
 --enable-libm
 p3lame --enable-libvorbis --cross-prefix=x86_64-w64-mingw32- --target-
 os=mingw32
  --arch=x86_64 --cpu=amdfam10 --prefix=/mingw64
   libavutil      52. 39.100 / 52. 39.100
   libavcodec     55. 18.102 / 55. 18.102
   libavformat    55. 12.102 / 55. 12.102
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 81.101 /  3. 81.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, tta, from '../samples/lossless-audio/inside.tta':
   Duration: 00:00:11.89, start: 0.000000, bitrate: 814 kb/s
     Stream #0:0: Audio: tta, 44100 Hz, stereo, s16
 Output #0, md5, to 'pipe:':
   Metadata:
     encoder         : Lavf55.12.102
     Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (tta -> pcm_s16le)
 Press [q] to stop, [?] for help
 MD5=d0beb768d860b4776358077dd9fcb1e9
 size=       0kB time=00:00:11.88 bitrate=   0.0kbits/s
 video:0kB audio:2048kB subtitle:0 global headers:0kB muxing overhead
 -99.998236%
 }}}

 Remuxing into Matroska:

 {{{
 $ ./ffmpeg -i ../samples/lossless-audio/inside.tta -c:a copy inside.mka
 ffmpeg version N-54738-g04b9836 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jul 14 2013 17:57:33 with gcc 4.7.3 (GCC)
   configuration: --enable-nonfree --enable-gpl --enable-libfdk-aac
 --enable-libm
 p3lame --enable-libvorbis --cross-prefix=x86_64-w64-mingw32- --target-
 os=mingw32
  --arch=x86_64 --cpu=amdfam10 --prefix=/mingw64

 [...]

 Input #0, tta, from '../samples/lossless-audio/inside.tta':
   Duration: 00:00:11.89, start: 0.000000, bitrate: 814 kb/s
     Stream #0:0: Audio: tta, 44100 Hz, stereo, s16
 Output #0, matroska, to 'inside.mka':
   Metadata:
     encoder         : Lavf55.12.102
     Stream #0:0: Audio: tta, 44100 Hz, stereo
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 size=    1182kB time=00:00:12.53 bitrate= 772.4kbits/s
 video:0kB audio:1182kB subtitle:0 global headers:0kB muxing overhead
 0.053638%
 }}}

 Testing MD5 of the decoded stream, this time from the Matroska file:

 {{{
 $ ./ffmpeg -i inside.mka -f md5 -
 ffmpeg version N-54738-g04b9836 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jul 14 2013 17:57:33 with gcc 4.7.3 (GCC)
   configuration: --enable-nonfree --enable-gpl --enable-libfdk-aac
 --enable-libm
 p3lame --enable-libvorbis --cross-prefix=x86_64-w64-mingw32- --target-
 os=mingw32
  --arch=x86_64 --cpu=amdfam10 --prefix=/mingw64

 [...]

 Input #0, matroska,webm, from 'inside.mka':
   Metadata:
     ENCODER         : Lavf55.12.102
   Duration: 00:00:11.89, start: 0.000000, bitrate: 814 kb/s
     Stream #0:0: Audio: tta, 44100 Hz, stereo, s16 (default)
 Output #0, md5, to 'pipe:':
   Metadata:
     encoder         : Lavf55.12.102
     Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
 (default)
 Stream mapping:
   Stream #0:0 -> #0:0 (tta -> pcm_s16le)
 Press [q] to stop, [?] for help
 MD5=eb96f9b80e0ce6bc5ddd841a8843620a
 size=       0kB time=00:00:11.49 bitrate=   0.0kbits/s
 video:0kB audio:1980kB subtitle:0 global headers:0kB muxing overhead
 -99.998175%
 }}}

 Remuxing inside.tta using mkvtoolnix, then testing MD5 of the decoded
 stream:

 {{{
 $ ./ffmpeg -i inside_mkvtoolnix.mka -f md5 -
 ffmpeg version N-54738-g04b9836 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jul 14 2013 17:57:33 with gcc 4.7.3 (GCC)
   configuration: --enable-nonfree --enable-gpl --enable-libfdk-aac
 --enable-libm
 p3lame --enable-libvorbis --cross-prefix=x86_64-w64-mingw32- --target-
 os=mingw32
  --arch=x86_64 --cpu=amdfam10 --prefix=/mingw64

 [...]

 Input #0, matroska,webm, from 'inside_mkvtoolnix.mka':
   Metadata:
     creation_time   : 2013-07-15 07:41:51
   Duration: 00:00:11.89, start: 0.000000, bitrate: 818 kb/s
     Stream #0:0: Audio: tta, 44100 Hz, stereo, s16 (default)
 Output #0, md5, to 'pipe:':
   Metadata:
     encoder         : Lavf55.12.102
     Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
 (default)
 Stream mapping:
   Stream #0:0 -> #0:0 (tta -> pcm_s16le)
 Press [q] to stop, [?] for help
 MD5=eb96f9b80e0ce6bc5ddd841a8843620a
 size=       0kB time=00:00:11.49 bitrate=   0.0kbits/s
 video:0kB audio:1980kB subtitle:0 global headers:0kB muxing overhead
 -99.998175%
 }}}

 To make sure I tried the bit-compare plugin for foobar2000, and unlike
 with avformat, both inside.tta and any of the Matroska files are the same:

 {{{
 All tracks decoded fine, no differences found.

 Comparing:
 "D:\MinGW\msys\1.0\ffmpeg\samples\lossless-audio\inside.tta"
 "D:\MinGW\msys\1.0\ffmpeg\build\inside.mka"
 No differences in decoded data found.
 }}}
 {{{
 All tracks decoded fine, no differences found.

 Comparing:
 "D:\MinGW\msys\1.0\ffmpeg\samples\lossless-audio\inside.tta"
 "D:\MinGW\msys\1.0\ffmpeg\build\inside_mkvtoolnix.mka"
 No differences in decoded data found.
 }}}

 After converting inside.tta into WAV pcm_s16le with "./ffmpeg -i
 ../samples/lossless-audio/inside.tta inside_tta.wav":

 {{{
 All tracks decoded fine, no differences found.

 Comparing:
 "D:\MinGW\msys\1.0\ffmpeg\samples\lossless-audio\inside.tta"
 "D:\MinGW\msys\1.0\ffmpeg\build\inside_tta.wav"
 No differences in decoded data found.
 }}}

 After converting inside.mka into WAV pcm_s16le  with "./ffmpeg -i
 inside.mka inside_mka.wav":

 {{{
 Differences found in 1 out of 1 track pairs.

 Comparing:
 "D:\MinGW\msys\1.0\ffmpeg\samples\lossless-audio\inside.tta"
 "D:\MinGW\msys\1.0\ffmpeg\build\inside_mka.wav"
 Length mismatch : 0:11.888367 vs 0:11.493878, 524277 vs 506880 samples
 }}}

 Looks like the Matroska demuxer is discarding data at the end of the
 stream or something, without giving an error or warning.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2786>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list