[FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution
Hendrik Leppkes
h.leppkes at gmail.com
Wed Mar 18 13:21:25 CET 2015
On Wed, Mar 18, 2015 at 1:06 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Mar 18, 2015 at 07:49:46AM -0400, Marcus Johnson wrote:
>> This reminds me of another bug with DTS files, it estimates the file
>> duration by counting each frame I assume, including the HD ones resulting
>> in it being massively incorrect for example here's the ffmpeg output of a
>> DTS-HD MA file that's actually 98 minutes long
>>
>>
>>
>> Log:
>>
>> ffmpeg -i /Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma
>>
>> ffmpeg version N-68833-ge949e9f Copyright (c) 2000-2014 the FFmpeg
>> developers
>>
>> built on Mar 18 2015 07:47:46 with Apple LLVM version 6.0
>> (clang-600.0.57) (based on LLVM 3.5svn)
>>
>> configuration: --disable-yasm --disable-asm --disable-inline-asm
>> --disable-ffserver --disable-ffplay --disable-doc --disable-ffprobe
>>
>> libavutil 54. 16.100 / 54. 16.100
>>
>> libavcodec 56. 19.100 / 56. 19.100
>>
>> libavformat 56. 16.102 / 56. 16.102
>>
>> libavdevice 56. 3.100 / 56. 3.100
>>
>> libavfilter 5. 6.100 / 5. 6.100
>>
>> libswscale 3. 1.101 / 3. 1.101
>>
>> libswresample 1. 1.100 / 1. 1.100
>>
>> [dts @ 0x7fe833822800] Estimating duration from bitrate, this may be
>> inaccurate
>>
>> Input #0, dts, from '/Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma':
>>
>> Duration: 04:06:57.61, start: 0.000000, bitrate: 1535 kb/s
>>
>> Stream #0:0: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
>>
>>
>> Instead of it saying it's about 1 hours and 30 minutes, it says it's 4
>> hours, and 6 minutes.
>>
>>
>
>> Maybe the parser should ignore the dts-hd frames, because they won't
>> increase the duration at all, due to the differential nature of the codec.
>
> if i understand correctly, yes,
>
> all parts of the data stream which encode the same time period belong
> in the same AVPacket.
It already does this. The Core and HD extensions are all placed in the
same AVPacket if the dca parser is used.
I'm quite sure the problem Marcus Johnson is describing is exactly the
same problem as Carl's patch fixes.
If you take a high-bitrate DTS-HD MA file and then use the core
bitrate to calculate the duration, you can easily get a factor 2-3
error in the computed duration value, since it just doesn't account
for the extra bitrate form the HD parts.
- Hendrik
More information about the ffmpeg-devel
mailing list