sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration?
@ 2015-07-30 18:55 COHEN, STEVEN M
  2015-07-30 21:32 ` COHEN, STEVEN M
  2015-07-31  5:55 ` Jan Stary
  0 siblings, 2 replies; 4+ messages in thread
From: COHEN, STEVEN M @ 2015-07-30 18:55 UTC (permalink / raw
  To: sox-users@lists.sourceforge.net

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 



------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration?
  2015-07-30 18:55 What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration? COHEN, STEVEN M
@ 2015-07-30 21:32 ` COHEN, STEVEN M
  2015-07-31  5:55 ` Jan Stary
  1 sibling, 0 replies; 4+ messages in thread
From: COHEN, STEVEN M @ 2015-07-30 21:32 UTC (permalink / raw
  To: sox-users@lists.sourceforge.net

I now learn that this is not an issue with Google Chrome but is an issue with Mozilla Firefox.  I can't test with Microsoft Internet Explorer, because more basic parts of the application don't' work there.  So I guess I'm looking for a SoX solution that would in all browsers or at least Firefox as well as Chrome.

==============================================================

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?


------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration?
  2015-07-30 18:55 What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration? COHEN, STEVEN M
  2015-07-30 21:32 ` COHEN, STEVEN M
@ 2015-07-31  5:55 ` Jan Stary
  2015-07-31 15:22   ` COHEN, STEVEN M
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Stary @ 2015-07-31  5:55 UTC (permalink / raw
  To: sox-users

On Jul 30 18:55:58, sc1478@att.com wrote:
> 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?

Apparently, the duration is present in the files' headers.
That's about all you can do about storing the duration:
write it in the header as expected, which sox does.

I think that your problem has nothing to do with SoX,
but is a problem with those browsers.

	Jan

PS: make your "Subject:" a one-liner.

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration?
  2015-07-31  5:55 ` Jan Stary
@ 2015-07-31 15:22   ` COHEN, STEVEN M
  0 siblings, 0 replies; 4+ messages in thread
From: COHEN, STEVEN M @ 2015-07-31 15:22 UTC (permalink / raw
  To: sox-users@lists.sourceforge.net

Thank you, Jan.  It appears that you are saying that this is a bug in Firefox, not present in Google Chrome, and there is no workaround available through SoX that would help this situation.
Thanks.  That answers my question, and sorry about the long subject line.

Steve

===============================================
> >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?

Apparently, the duration is present in the files' headers.
That's about all you can do about storing the duration:
write it in the header as expected, which sox does.

I think that your problem has nothing to do with SoX,
but is a problem with those browsers.

	Jan

PS: make your "Subject:" a one-liner.

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-31 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 18:55 What, if any, SoX parameters will convert a .vox file to another format whose metadata is sufficient for HTML5 Audio to predetermine duration? COHEN, STEVEN M
2015-07-30 21:32 ` COHEN, STEVEN M
2015-07-31  5:55 ` Jan Stary
2015-07-31 15:22   ` COHEN, STEVEN M

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).