Bugs item #3582634, was opened at 2012-11-02 01:57
Message generated for change (Comment added) made by uklauer
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3582634&group_id=10706

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Chaz (cgwenapp)
Assigned to: Nobody/Anonymous (nobody)
Summary: output file header incorrect when using pipe

Initial Comment:
mp3 to wav conversion while using piping to output instead of writing to file 
doesn't work as expected

How to reproduce error:

$: sox Slipknot\ -\ Psychosocial.mp3 -t wav psychosocial2.wav
$: sox Slipknot\ -\ Psychosocial.mp3 -t wav - | cat > psychosocial.wav
$: diff psychosocial.wav psychosocial2.wav
Binary files psychosocial.wav and psychosocial2.wav differ

This should replicate with most mp3 files.

Investigating with a hex editor, it appears certain bytes which should be 
output as "6E" get output as "80" when piped (there may be others, that is the 
one which manifested first in my file). I suspect this is actually "FFFFFF80" 
being output as "80", with the outputs being the wrong types, but haven't 
confirmed.

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

>Comment By: Ulrich Klauer (uklauer)
Date: 2013-01-03 17:25

Message:
The length of an MP3 file cannot be determined exactly beforehand. This is
why the header info is wrong (or inexact, at least). When writing to a
file, the WAV format handler will go back to the header when all samples
have been written and fix the length information. When writing to a pipe,
this is not possible.

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

Comment By: Chaz (cgwenapp)
Date: 2012-11-02 04:09

Message:
Clarification: only incorrect in header section of the wav file, data
section outputs correctly. 

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3582634&group_id=10706

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to