Hi all. I have correctly set the audio module with ID3 and I'm uploading MP3 and all it's fine. But, when I upload a WAV file, I get this error: "This file is not compatible with the Flash audio player. Flash can only play MP3 files with a sample rate of 11, 22 or 44KHz.". The flash player appears but it does not play the file, it keeps eternally "buffering". The WAV is correctly recognized by the audio module (for example, I see # Length: 0:02 minutes (87.61 KB) # Format: RIFF Mono 22kHz 352Kbps (CBR). I have correctly set the 1pixelout player as WAV player in settings (and I have also tested the 3 included players for WAV files with no luck).
Comments
Comment #1
we241 CreditAttribution: we241 commentedSimilar problem here. I do not get an error message but when I upload a WAV file a "Click to play" link appears instead of the player. MP3 uploads work perfectly. In the audio database table fileformat for the uploaded file is RIFF. If I manually change RIFF to WAV the player appears but buffers and does not play the file.
Comment #2
webchickRestoring title. Please don't change the title of the issue unless you intend to clarify it.
Comment #3
zirafa CreditAttribution: zirafa commentedI've never seen a .wav file stream through a flash player - my understanding is that only mp3 audio streaming is supported. While importing .wav files directly into Flash is possible, that has to occur before the flash player is compiled to swf. If anybody has a working example or link to a flash player that supports wav streaming, please post them here.
Comment #4
sgriffin CreditAttribution: sgriffin commentedWhile some "WAVS" are nothing more than renamed mp3s... I think perhaps, its a mistake to support the wav extension in this module.
However you could use this module to provide raw links to wav files, to manage downloads.. Perhaps some better documentation is needed.
What about ogg? Same thing probably.
Comment #5
manimal CreditAttribution: manimal commentedI have the same issue as the original post. however, it even happens with mp3's. I've only gotten this on 5.2. 5.1 worked, uploading the same mp3 file for both versions.
I can create the audio node, I get the error, and when I check out the node after its created, there's no player... all I get are the ID3 tags displayed..
Comment #6
gracearoha CreditAttribution: gracearoha commentedI am using Drupal 5.2 and also cannot get any of the players (mps or wav) to show up.
The node shows up fine, but instead of the player, i have only the "click to play" link with the option to download the file.
Comment #7
meecect CreditAttribution: meecect commentedI made a contribution that may help people who want to upload wavs:
http://drupal.org/node/191701#comment-635608
Comment #8
drewish CreditAttribution: drewish commentedi'm marking http://drupal.org/node/191701 as a duplicate of this.
meecect, please move your patch over here.
Comment #9
meecect CreditAttribution: meecect commentedcopied from duplicate thread:
well, I've been looking at the code, and I think the 'wav' support is very confusing. I guess it will only accept wav files that are actually mp3 files?
So I modified it a bit to work the way I _think_ it should. I added a player .inc file called 'embedded.inc' . This player can be registered to handle wav files and 'riff' files ( what getid3 recognizes wav files as) and will put the mediaplayer control on the pages with wav's, much akin to how the 1pixelout player shows up for mp3's.
Another change you may need to make is on the getid3 settings page, uncheck the default 'write to file' columns. Otherwise, the module will attempt to write id3 tags to the file _regardless of type_. That's why people ini other threads were compaining about wav files unable to be downloaded and played after uploading, because the file is corrupt after writing id3 tags to a perfectly good wav.
A better solution would be to change the audio_getid3 module to only write tags to files that actually can have tags. I may write a patch to just that, actually.
Another thing to do would be to support macs somehow, but I haven't gotten that to work yet for embedded wavs. Btw, this will probably work for wma's as well with a small modification.
embedded.inc:
Comment #10
drupalhooked CreditAttribution: drupalhooked commentedThanks so much Meecect,
I had the same problem and the problem could only be resolved only due to the code provided by you.
thanks once again!
God bless!!
Comment #11
datacompboy CreditAttribution: datacompboy commentedyou can find stream flash-based player for .wav and .au files encoded by pcm or g711 in mine blog: http://blog.datacompboy.ru
support for other codecs can be added relatively simple.
Comment #12
hattomee CreditAttribution: hattomee commentedThank you very much for the helpful code meecect. Can someone help us with mac support for wav files?
Comment #13
unc0nnected CreditAttribution: unc0nnected commentedThis worked for me.. thank yuo so much for this code, what a life saver! I would think this coudl be marked as fixed as there's no way to get flash to stream .wav files from what I understand