Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4375 closed defect (fixed)

Incorrect duration from bitrate for DTS-HD (MA and HRA) files

Reported by: Underground78 Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords: dca
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug: Those two samples: TestDTSHD_HRA.dtshd and TestDTSHD_MA.dtshd show incorrect duration in FFmpeg.

I know that the duration is guessed from the bitrate and that we cannot expect perfect accuracy but the duration is often off by more than a factor 2 even on big files which I find weird.

How to reproduce:

ffmpeg version N-70803-g0f16dfd Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 28.100 / 56. 28.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 12.100 /  5. 12.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[dtshd @ 0000000002c86500] Estimating duration from bitrate, this may be inaccurate
Input #0, dtshd, from 'TestDTSHD_HRA.dtshd':
  Duration: 00:00:02.43, bitrate: 1536 kb/s
    Stream #0:0: Audio: dts (DTS-HD HRA), 48000 Hz, 5.1(side), fltp, 1536 kb/s
ffmpeg version N-70803-g0f16dfd Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 28.100 / 56. 28.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 12.100 /  5. 12.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[dtshd @ 0000000002e56480] Estimating duration from bitrate, this may be inaccurate
Input #0, dtshd, from 'TestDTSHD_MA.dtshd':
  Duration: 00:00:02.96, bitrate: 1536 kb/s
    Stream #0:0: Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), fltp, 1536 kb/s

Change History (4)

comment:1 by Hendrik, 9 years ago

It uses the core bitrate to calculate the duration, which is entirely wrong for HD files.
DTS-HD is variable bitrate, you cannot calculate a duration for such files with any kind of accuracy.

in reply to:  1 comment:2 by Underground78, 9 years ago

Ok, thanks for the explanation. I guess the ticket can be closed if there is nothing to improve.

comment:3 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavcodec
Keywords: dca added
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Should be fixed in 7f1ea38868e9d1e4f9814cc34ce7d50e38aa93fc - thank you for the report!

comment:4 by Underground78, 9 years ago

No problem. I guess that after this change, no duration will be displayed?

Note: See TracTickets for help on using tickets.