RicoCasta / opencinematools

Automatically exported from code.google.com/p/opencinematools
0 stars 0 forks source link

The WAV files generated by sox can't be used by asdcp-test #29

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
=== What steps will reproduce the problem?
1. take existing DCP - extract sound in a 6-channel WAV file: AUDIO_1.wav
2. run "sox AUDIO_1.wav AUDIO_2.wav" (equivalent to a mere 'copy' since 
input and output format are the same, and no operations are done)
3. run "asdcp-test -L -c new_audio.mxf AUDIO_2.wav"

=== What is the expected output? What do you see instead?
I expect to create an audio MXF from the 6 channels
I get 
"Expecting uncompressed essence, got format type 65534
File does not begin with FORM header
AUDIO_2.wav: Unknown file type, not ASDCP-compatible essence."

=== What version of the product are you using? On what operating system?
asdcp-test (asdcplib 1.3.18)
sox: SoX v14.3.0
Windows Vista Business 32-bit SP2

=== Please provide any additional information below.
"asdcp-test -L -c new_audio.mxf AUDIO_1.wav" works as expected
"asdcp-test -L -c new_audio.mxf AUDIO_2.wav" does not work

soxi AUDIO_1.wav:
Channels       : 6
Sample Rate    : 48000
Precision      : 24-bit
Duration       : 00:01:34.67 = 4544000 samples ~ 7100 CDDA sectors
File Size      : 81.8M
Bit Rate       : 6.91M
Sample Encoding: 24-bit Signed Integer PCM

soxi AUDIO_2.wav
Input File     : 'SENSATION_2.wav'
Channels       : 6
Sample Rate    : 48000
Precision      : 24-bit
Duration       : 00:01:34.67 = 4544000 samples ~ 7100 CDDA sectors
File Size      : 81.8M
Bit Rate       : 6.91M
Sample Encoding: 24-bit Signed Integer PCM

They seem the same, but there must be something in the headers that 
is 'off'

Original issue reported on code.google.com by peter.fo...@gmail.com on 29 Jan 2010 at 9:40

GoogleCodeExporter commented 8 years ago
Some more info:
the files that come directly out of the MXF are formatted like this (info from 
sox)
soxi INFO formats: detected file format type `wav'
soxi DBUG wav: WAV Chunk fmt
soxi DBUG wav: WAV Chunk data
soxi DBUG wav: Reading Wave file: Microsoft PCM format, 6 channels, 48000 
samp/sec
soxi DBUG wav:         864000 byte/sec, 18 block align, 24 bits/samp, 81792000 
data 
bytes
soxi DBUG wav:         4544000 Samps/chans

the files that come out of sox are like this:
soxi INFO formats: detected file format type `wav'
soxi DBUG wav: WAV Chunk fmt
soxi INFO wav: EXTENSIBLE
soxi DBUG wav: WAV Chunk fact
soxi DBUG wav: WAV Chunk data
soxi DBUG wav: Reading Wave file: Microsoft PCM format, 6 channels, 48000 
samp/sec
soxi DBUG wav:         864000 byte/sec, 18 block align, 24 bits/samp, 81792000 
data 
bytes
soxi DBUG wav:         4544000 Samps/chans

So the main difference seems to be 'soxi INFO wav: EXTENSIBLE'
http://dream.cs.bath.ac.uk/researchdev/wave-ex/wave_ex.html

Extensible WAV seems to be a Windows specific format. I don't know how to 
switch it 
off in sox.

Original comment by peter.fo...@gmail.com on 29 Jan 2010 at 10:50

GoogleCodeExporter commented 8 years ago
I found the solution (by browsing the SOX source code :-) )
the key is to force the sound format to standard PCM wav, not the MS Entensible 
one:

sox INPUT.wav -t wavpcm OUTPUT.wav

Original comment by peter.fo...@gmail.com on 29 Jan 2010 at 11:11

GoogleCodeExporter commented 8 years ago
Good work, Peter. And thanks for sharing.
Wolfgang Woehl

Original comment by photonra...@gmail.com on 30 Jan 2010 at 12:58