Page MenuHomePhabricator

TMH gives duration=0.0 s for wav files containing ID3 tags
Closed, ResolvedPublic


Either the wav is broken or TMH.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:58 AM
bzimport set Reference to bz61441.

I think broken wav file. mplayer cannot play the file locally. avprobe cannot give the time information either:

bawolff@Bawolff-L:~$ avprobe '"FZ_Side_E_-_Trail"_by_Disasterpeace.wav'
avprobe version 0.8.6-6:0.8.6-1, Copyright (c) 2007-2013 the Libav developers

built on Mar 24 2013 07:20:17 with gcc 4.7.2

[wav @ 0x90427e0] no 'data' tag found
"FZ_Side_E_-_Trail"_by_Disasterpeace.wav: Invalid data found when processing input

OTOH gstreamer/totem seems to be able to get duration and play file fine.

Actually newer versions of avprobe seem to recognize the file:

bawolff@Bawolff-L:~$ src/libav/avprobe \"FZ_Side_E_-_Trail\"_by_Disasterpeace.wav
avprobe version v10_alpha1-151-gaab40bb, Copyright (c) 2007-2014 the Libav developers

built on Jan 16 2014 23:34:44 with gcc 4.7 (Debian 4.7.2-5)

[wav @ 0x9db2b60] max_analyze_duration reached
Input #0, wav, from '"FZ_Side_E_-_Trail"_by_Disasterpeace.wav':

  encoded_by      : Logic Pro
  date            : 2013-05-05
  creation_time   : 12:32:11
  time_reference  : 143796208
  coding_history  : 
Duration: 00:01:53.72, bitrate: 1411 kb/s
  Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

avprobe output

So perhaps bug in getid3 library we use to get duration of wav files (probably triggering some edge case which also didn't work on old versions of avprobe)

Oh hmm, would of saved time if I looked at the error we are generating:

From :

Caught exception: depends on /usr/local/apache/common-local/php-1.23wmf11/extensions/TimedMediaHandler/libs/getid3/module.tag.id3v2.php, which is missing

getid3 correctly recognizes the duration to be 113.72532879819 seconds. However the presence of the error message causes TMH to output a duration of 0.

Change 113760 had a related patch set uploaded by Brian Wolff:
Add ID3 dependencies to getid3 library

Change 113760 merged by Mdale:
Add ID3 dependencies to getid3 library

Fix should go live on commons on about Feb 25th. (Once fix is live, you may have to ?action=purge the image page of that file)