|
From: COHEN, S. M <sc...@at...> - 2015-07-30 19:03:40
|
Cross-posted from Stack Overflow. I originally posted this there, but decided that I might be more likely to get an answer here. This question comes from another I recently asked. See http://stackoverflow.com/questions/31702592/jplayer-circle-player-does-not-show-circle-first-time-around-with-wav-files-made . After much head-banging, trying this and trying that, I am convinced that the output of SoX given an input of a .vox file produces a file the duration of which cannot be predetermined by HTML5-based audio players such as JPlayer. I have now tried this with both .wav and .ogg output formats. The command line used was simply sox inputfile.vox outputfile.wav or sox inputfile.vox outputfile.ogg without any other parameters. None of the documented command line switches seems to jump out as providing the answer I need, but I do not know much about audio conversion in general. In neither case can the player predetermine the duration of the clip. Once it has played the clip once, it then knows the duration, and this is shown in great detail in the other question. Oddly, though, the utility soxi is able to tease the duration out of either the input or output file as shown below: $ soxi /var/tmp/test.vox Input File : '/var/tmp/test.vox' (wav) Channels : 1 Sample Rate : 8000 Precision : 16-bit Duration : 00:00:10.48 = 83840 samples ~ 786 CDDA sectors Sample Encoding: 16-bit Signed Integer PCM $ soxi /var/tmp/test.wav Input File : '/var/tmp/test.wav' Channels : 1 Sample Rate : 8000 Precision : 16-bit Duration : 00:00:10.48 = 83840 samples ~ 786 CDDA sectors Sample Encoding: 16-bit Signed Integer PCM >From this, I deduce that the input file had sufficient metadata for soxi to figure the duration out, but that HTML5 must be using a different algorithm that is insufficient. Is there some combination of SoX parameters that would generate sufficient metadata so that HTML5 audio players can predetermine duration? Steve Cohen Professional Technical Architect VoiceTone Platform Development Team 225 W. Randolph Chicago, IL 60606 Mobile: (847) 736-5729 PROPRIETARY INFORMATION: Not for use or disclosure outside the AT&T family of companies except under written agreement |