Summary:ASTERISK-00251: [patch] wav49 format isn't compatible with Windows Media Player
Reporter:Ryan Tucker (rtucker)Labels:
Date Opened:2003-09-11 16:35:31Date Closed:2008-01-15 14:41:55.000-0600
Versions:Frequency of
Environment:Attachments:( 0) format_wav_gsm.c.diff
( 1) msg0000.WAV
( 2) msg0000a.WAV

When playing a wav49-format file with Windows Media Player, at least version, it plays the file and then bombs out with an error about how the file is corrupt or unsupported.


Error dialog:  "Windows Media Player cannot play the file.  The file is either corrupt or the Player does not support the format you are trying to play."

Clicking on More Information gives "0xC00D1199: Cannot play the file" and a fair bit of troubleshooting stuff.

.wav is attached.
Comments:By: Brian West (bkw918) 2003-09-11 23:58:26

Plays fine in windows media player 9 you hear the whole message.  Use winamp to play them.  They play fine there.

edited on: 09-11-03 23:38

By: Ryan Tucker (rtucker) 2003-09-12 12:01:36

Oddly, this has been reproduced on a few machines; mine is the 9 one, another one back here is running, and computers at a customer's site as well.  So I don't think it's specifically broken on mine; rather, I think it's specifically working on yours ;-)

I personally use Winamp, and haven't noticed this at all... however, expecting our customers to approve and deploy Winamp to listen to voicemails isn't really an option.  -rt

By: Brian West (bkw918) 2003-09-12 12:30:06

I get the same error you have.. but I do hear the whole message.  The only other option is to do them in wav.

By: John Todd (jtodd) 2003-09-12 17:59:36

So is there simply a way to specify the .wav format in voicemail.conf here?  Is this something that needs to be fixed in Asterisk, or is this a configuration choice issue?

By: Ryan Tucker (rtucker) 2003-09-12 18:39:26

Raw wav format works fine; unfortunately, it produces files about 10x the size of wav49 files.  This is not all that great for e-mail purposes.

It seems WMP can play the files, but there's something... odd about the format that is bugging WMP out.  It also seems wav49 and gsm produce roughly the same thing, but Windows looks dumbly at the .gsm file.

By: Brian West (bkw918) 2003-09-12 19:01:31


in voicemail.conf

By: Ryan Tucker (rtucker) 2003-09-12 19:05:50

Yup, that's how it's set.

By: Brian West (bkw918) 2003-11-22 16:16:29.000-0600

Ok anyone have any clue what windows is expecting?  or why it doesn't work.  If I recall it cuts off the last few seconds of the call and WMP gives a nasty error.

By: Brian West (bkw918) 2003-11-23 15:06:56.000-0600

I just tested this again.  It appears this has been fixed in CVS.  I have recorded a few files via VoiceMail in wav49(.WAV) format and they play without errors on WMP.

By: jimf (jimf) 2004-01-15 23:15:58.000-0600

Reminder sent to bkw918

Will you look at the [Asterisk-User] mailing list thread with a subject of "wav49 voicemail problem with Windows Media Player" and consider re-opening bug ID 0000254?  Quite a few people are still having this problem.


By: Brian West (bkw918) 2004-01-15 23:18:36.000-0600

Apparetly this is still a problem.  I can't recreate this on my system.

By: jimf (jimf) 2004-01-15 23:32:36.000-0600

Anybody know of any audio file analyzing software that could be used to check the wav file for errors?

By: jimf (jimf) 2004-01-16 09:14:48.000-0600

I have found that the Microsoft Sound Recorder will play the original posted wave file msg0000.WAV without errors.  I opened this file and then re-saved it inside of Sound Recorder with the same GSM 6.10 (wav49) format.  The resulting file (msg0000a.WAV) is slightly different than the original.  The msg0000a.WAV file plays without error on Windows Media Player.

Maybe this will give someone a hint as to what the problem is.

edited on: 01-16-04 09:06

By: zoa (zoa) 2004-01-16 19:11:19.000-0600

Tried it in winamp, works sweet,
Tried it with cooledit pro, works sweet,
Filename: msg0000a.WAV
Folder: C:
File Type: 8000Hz, 16-bit, Mono
Uncompressed Size: 114.37 KB (117,120 bytes)
File Format: ACM Waveform
Microsoft ACM: GSM 6.10
Size on Disk: 11.67 KB (12,956 bytes)
Last Written (local): 1/17/2004  01:47:50.469
Length: 0:07.320
58,560 samples

Tried soundforge 6, also no problem.

My mediaplayer is broken so cant really test it with that...

By: zoa (zoa) 2004-01-16 19:37:41.000-0600

you might want to have a look at this:


Virtual dub may also be able to give some info on bad data.

By: jmboyd (jmboyd) 2004-01-20 11:31:24.000-0600

The wavscript prog is cool but it won't help us here, because it only handles PCM coded data.

Media player on win2kpro pops up a "file format invalid" error playing the original msg0000.wav.  Actually, it's trying to read past the end of the file.  The values of the "RIFF" and "data" chunk length tags (4-byte integers which immediately follow the 4-byte ASCII strings "RIFF" and "data") are both too high by 8.  Chunk length tags should be the length of the entire chunk minus 8 (4 for the chunk name string and 4 for the length tag itself) but the 8 has not been subtracted.  You can repair msg0000.wav with a hex editor by changing 0xb4 at offset 4 to 0xac and 0x7f at offset 0x38 to 0x77.  Then the file plays (in on win2kpro anyway.)

This is such a common malady of wav files that many programs ignore these tags and just use the file size, and will repair them when saving the file, as seen in msg0000a.wav.


By: fcs_1 (fcs_1) 2004-01-20 15:08:45.000-0600

Windows Media Player ver

Seems to play to almost the end and this error pops up.

0xC00D1199: Cannot play the file
Windows Media Player cannot play the file. You may encounter this error message for one of the following reasons:

The file type is not supported by the Player. The following table lists the file types supported by the Player. If the file type you are trying to play is included in this table, then the file may have been encoded by using a codec that is not supported by Windows Media Player. If this is the case, Windows Media Player cannot play the file.
The file type is supported by the Player, but the file was compressed by using a codec that is not supported by the Player.
The file type is supported, but you are trying to play it in a way that is not supported by the Player. For example, you may have attempted to drag a DVD file with a .vob extension from a DVD to the Windows Media Player icon. Or you may have attempted to open a .vob file by clicking Open on the File menu.
You are trying to play one part of a multipart file. Use a newsreader or other program to combine the files, and then try again

By: jmboyd (jmboyd) 2004-01-21 15:17:47.000-0600

I have uploaded a simple patch for the format_wav_gsm.c file, please try it out.

By: croomem (croomem) 2004-01-21 16:36:08.000-0600

Diff cures it for me

By: fcs_1 (fcs_1) 2004-01-21 17:00:38.000-0600

Diff test success.  No error from Windows Media Player ver

By: jimf (jimf) 2004-01-21 18:37:15.000-0600

Works for me too.  Thanks jmboyd

By: zoa (zoa) 2004-01-21 19:22:36.000-0600

lets place this puppy in cvs.

By: Brian West (bkw918) 2004-01-22 10:43:20.000-0600

Fixed in CVS

By: Digium Subversion (svnbot) 2008-01-15 14:41:55.000-0600

Repository: asterisk
Revision: 2054

U   trunk/formats/format_wav_gsm.c

r2054 | markster | 2008-01-15 14:41:54 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix size bug in wav49 format (bug ASTERISK-251) thanks rtucker!