Could someone clarify the format of call recordings when they are played in a web browser (clicking the speaker icon) through the User Portal on FreePBX 22.214.171.124? I know they are WAV files when downloaded but do they change formats when played through a web browser? I’m trying to play these recordings on Ubuntu 12.04 (Kernel: 3.2.0-31-generic) using Firefox 15.0.1 with the mozilla-plugin-vlc 2.0.1, with no success. A few of the VLC community members are telling me the User Portal recording format is not compatible with VLC. That’s basically saying VLC cannot play a simple WAV file which I know is not true! I’m having a difficult time believing what they are telling me. Any help would be greatly apprecitated!
The files are not transcoded at all when they’re sent to the browser. So if your Asterisk system uses a file format that your browser can’t play (GSM, for example) then you’re out of luck.
Also note that a WAV file is not the same as a wav file.
Thank you for your reply. I didn’t know there was a difference between “.WAV” and “.wav”. All recordings have the extension: “.wav” but when I view the “Type” under “Properties” it lists the files as: “WAV audio (audio/x-wav)”. If I understand you correctly, you’re saying my web browser is unable to recognize the file type and/or associate a MIME Type with it because no transcoding is being done by Asterisks; this prevents the embeded VLC from playing the recording correctly?
Both WAV and wav are MIME type audio/x-wav; wave audio is just a container. But if your browser/plugin can’t handle whatever type of audio is contained within, it won’t work. If it’s a wav file, I would expect it to work; I don’t have a problem playing those in OS X Firefox, but a WAV file doesn’t work for me.
Here’s the result of running the ‘file’ command on the two different types.
[b][email protected]:INBOX $[/b] file msg0000.wav
msg0000.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
[b][email protected]:INBOX $[/b] file msg0000.WAV
msg0000.WAV: RIFF (little-endian) data, WAVE audio, GSM 6.10, mono 8000 Hz
I think the ideal solution would be for FreePBX to do transcoding on the fly when you want to listen to a recording. I looked at rewriting the recordings module to use HTML 5 audio elements for playback, but it would only work with wav files and nothing else, so it didn’t seem worth the trouble.
Such great information for a novice user like myself, this is why I love the linux community! Anyway, this makes much more sense now. When looking at the about:plugins section in Firefox I noticed the mozilla-plugin-vlc in about:plugins on Firefox lists this:
Gecko Media Player is using Windows Media Player Plug-in, I tested this by disabling all the other plugins just to be sure. The recorded audio file plays PERFECTLY in Firefox using the Gecko Media Player plugin. With that said, I noticed the Suffixes for the Microsoft wave file all contain a , and then a * but the VLC Web Plugin does not contain that for WAV audio. What does that comma and asterisk mean in the Suffixes section of about:plugins?
In the Asterisk world, wav and WAV, as miken32 pointed out, are actually two different codecs. They’re both “WAVE” files, but one is standard PCM WAVE, and one is wav49 (essentially gsm, in a WAV wrapper). While some players can handle those wav49 files, many cannot (if you’re trying to do HTML5 playback for example, wav49 is not supported by about half the browsers. Standard PCM WAVE is though). The easy solution to this is to log into your User Portal (the recordings interface), Hit the “Settings” menu option on the left, and look for the “Web Playback Settings” section. The Audio Format field usually defaults to “Default (.WAV)” (which is wav49). If you have PCM WAVE support setup for voicemail, then you should have another option “Best Quality (.wav)”. Select that, save your settings and try again.
See the “format” section on voip-info for more details:
Thank you! If I am able to play the audio recording file by clicking “Download”, then choose “Open With” and select a player (VLC for example) then shouldn’t that be the same as clicking the speaker icon and using the embedded Firefox player (mozilla-plugin-vlc)? Taking into account the audio recording file is not transcoded into a stream or anything then those two scenarios should essentially be the same and the main VLC interface plays the audio recording file perfectly if I “Download” or choose “Open With” in Firefox. I hope I’m not way off in left field because that’s my argument with the VLC community right now and I’m not getting good feedback from them: http://forum.videolan.org/viewtopic.php?f=13&t=104314.
The code between the speaker icon and the download button is a little bit different. You should still double-check your web playback settings to be safe, as you may still be getting two different files (PCM WAVE when you hit download, and wav49 when pressing the play button).
Once you know that both files are the correct (same) format, then you can go back to the VLC forum and tell them with certainty that the plugin is refusing something that the stand-alone player accepts. It’s also possible that the plugin was compile with some different codec options/etc than the stand-alone player, but that’s for the VLC people to get into details with you about…
After remoting in to my Asterisk server I went to: /var/spool/asterisk/voicemail/device/1003/INBOX and ran the “file” command in terminal. Here is the output:
[[email protected] INBOX]# file msg0003.wav
msg0003.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
This is the only type of WAV file my Asterisk server produces from recorded Voicemails and Call Monitors (unless there is different WAV file format in another directory). Knowing that Asterisk does not transcode the file when sending it to a web browser then this file format should play correctly in mozilla-plugin-vlc as well as VLC?
If that’s the only type of file being generated, then yes it should play properly wherever since it’s a standard PCM WAVE file. Sounds like the mozilla-plugin-vlc has some kind of issue with it; perhaps you can get somebody over on the VLC forum you linked earlier to take a sample file from you and try it on their own? I don’t have VLC setup on any of my machines to try it for you…
Yes, that appears to be the only WAV file generated by Asterisk so I am going to submit a VLC bug report. Thank you for all the help! I learned a lot!