Wrong duration is reported for BWF file. The file is actually 4 minutes 48 seconds 60 milliseconds, yet MediaInfo reports it as 5 minutes 4 seconds:
General
Complete name : //onddata.net.dr.dk/cache$/MediaCache/Highres/7fa31528bee74cf3884ba77b00f39b76.wav
Format : Wave
File size : 13.2 MiB
Duration : 5 min 4 s
Overall bit rate mode : Constant
Overall bit rate : 364 kb/s
Producer : DR MA HLM Audio Cut
Description : Cut produced by HLM. In: 00:00:15:16 Duration: 00:04:48:14 Source file: /highres/arkiv/BWF/2007/12/17/IngestFile-5690006.bwf
Encoded date : 2017:05:22 14:46:00
Encoding settings : A=MPEG1L2,F=48000,B=384,W=16,M=STEREO
Producer_Reference : DR MA HLM Audio Cut
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Codec ID : 50
Duration : 5 min 4 s
Bit rate mode : Constant
Bit rate : 384 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Compression mode : Lossy
Stream size : 13.2 MiB (100%)
FFprobe correctly determines the length:
ffprobe version 3.3.1 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-icon
v --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 --e
nable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-
libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[wav @ 00000000003156c0] ignoring wrong sample_count 14603904
[wav @ 00000000003156c0] Estimating duration from bitrate, this may be inaccurate
Input #0, wav, from '//onddata.net.dr.dk/cache$/MediaCache/Highres/7fa31528bee74cf3884ba77b00f39b76.wav':
Metadata:
comment : Cut produced by HLM. In: 00:00:15:16 Duration: 00:04:48:14 Source file: /highres/arkiv/BWF/2007/12/17/IngestFile-5690006.bwf
encoded_by : DR MA HLM Audio Cut
originator_reference: DR MA HLM Audio Cut
date : 2017:05:22
creation_time : 14:46:00
time_reference : 1510557696
coding_history : A=MPEG1L2,F=48000,B=384,W=16,M=STEREO
:
Duration: 00:04:48.60, bitrate: 384 kb/s
Stream #0:0: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p, 384 kb/s
I need the file.
If private, you cna drop it at info@mediaarea.net
FFmpeg says 600 milliseconds (".60" means 60 tens of milliseconds)
Because your file says it.
Actually, I see the FFmpeg detects the coherency issue:
"[wav @ 00000000003156c0] ignoring wrong sample_count 14603904
[wav @ 00000000003156c0] Estimating duration from bitrate, this may be inaccurate"
long term solution is to fix your file.
I don't know yet what I want to do with such buggy file.
Fair enough, thank you for investingating the issue!
We'll try to fix the file instead.
Last edit: Jerome Martinez 2017-06-11
OK, I actually have a similar test compared to FFmpeg, but tolerance range was higher.
Changed with a tolerance range of the coherency test from 10% to 2% (in your file, error in the "fact" chunk is ~5%)
Fixed, in next public release and development snapshots starting tomorrow.