Is it possible to play MMS audio stream with HTML5 / JavaScript in Google Chrome without any Windows Media Player object ?
I want to write a Google Chrome plugin that will allow playing that streams.
No. MMS is a proprietary Microsoft protocol.
Related
I'm trying to understand the limitations of safari ios (12.3.1) for recording audio in the browser. This is because any speech I record - regardless of the codec / container - is much lower quality than equivalent audio recorded via a native ios app.
Opus, wav and mp3 files recorded within safari ios (iphone8) seem capped at a certain quality, regardless of the encoder settings (eg bitrate / complexity / samplerate / channels). But when recording speech within a native app, I find I can generate consistently excellent results.
The audio quality within safari is unaffected by: recording audio using different javascript recorders (wav only) and javascript encoders (opus and mp3); clearing the browser cache; reloading js from a private browser window; switching on MediaRecorder API experimental feature. But
I've spent the last few days playing with getUserMedia() on various devices. After analyzing the WAV files produced (waveform & spectrum analysis), here are the few infos I've been able to get from them.
Safari iOS will produce a decent WAV file (default is 48000Khz, 16 bit, Stereo), but no matter the constraints passed to getUserMedia() the audio spectrum will not contain any frequency higher than 14Khz.
So the WAV container is OK, but the quality of the audio written to it is about the same as the "medium" audio preset that can be found in native iOS applications.
iOS wave file spectrum
The consequence of this is a very pronounced "telephone" effect on the audio, and a file that is unusable for professional audio purposes.
Android devices produce a similar result in the default configuration (strong limitation of the audio spectrum), but by passing a set of constraints that disable the assistances like these :
autoGainControl:false,
echoCancellation:false,
noiseSuppression:false
we can achieve a very acceptable audio quality.
android 8 wave file spectrum
Unfortunately, these same settings do not allow iOS to achieve acceptable audio quality and as of now there seems to be no workaround available.
I am developing a simple web application which only records a voice from microphone but I have some trouble.
HTML5 voice recording function works well on chrome and firefox desktop or android. But while using mobile browsers on iPhone even chrome and firefox it doesn't work.
I tried recorder.js and result did not change.
Is it possible to recording voice on safari or it is a missing function of safari or iOS?
May 2018 Update (because figuring this out has been tough with all the outdated info).
I found this demo that proves it is possible: https://kaliatech.github.io/web-audio-recording-tests/dist/#/test1
As far as I knew, even on the latest iOS (iOS 10), recording voice on iOS using HTML5 is still impossible. Since all the browsers on iOS are limited to use UIWebView which Safari on iOS uses as well, Chrome on iOS is not able to support any API that can be used for media recording.
For example, recorder.js which you used are built on Media Capture API. If you check caniuse.com, you will find this API is not supported on iOS. (Also check the issue here).
MediaRecorder API is also a promising API but still not supported by Apple's browser.
Check answers below for more information.
1. Record voice from IPhone using HTML5
2. Audio Recording html5 on iOS
It's now possible and "easy" to do on iOS11 for Safari! The mediaStream API is supported now. The mediaRecorder API however is not. This causes any existing examples out there to not work. So you'll have to implement your own mediaRecorder functionality by connecting the media stream to a webkitAudioContext ScriptProcessorNode and collect the stream buffer on the node's onaudioprocess event. You can then collect the iOS microphone's streaming audio data and do with it what you want, most likely merging it into a wav file for upload/download. This works for any browser that supports the Media Stream API.
Two gotcha's:
- iOS Safari likes to deallocate any AudioContext that wasn't created on the main thread (on a tap) so you can't initialize it on the device media access accepted callback.
- The scriptProccessorNode wont fire any audioprocessed events unless the input AND output are connected for some reason.
Since iOS11, Safari now supports Media Capture API:
New in Safari 11.0 – Camera and microphone access.
Added support for the Media Capture API.
Added ability for websites to access camera and microphone streams from a user's
device (user permission is required.)
Announcement by Apple - broken link as of Jul 2018
A copy of the announcement on someone's blog
Therefore recorder.js will work now.
I'm using the new iPhone 11 ProMax, with iOS13.3, and have been trying to build out a web app with voice recognition services via HTML5 to work in safari or any browser on my iPhone. It seems iOS developers have blocked audio / video recording at the os level. There is a limited workaround however that might be useful for someone coming here as I did.
https://blog.addpipe.com/safari-technology-preview-73-adds-limited-mediastream-recorder-api-support/
Basically, if you go into advanced settings for safari you can enable the mediaRecorder. Their demo works with video capture, I have not seen it with pure audio yet.
Safari on iOS 11 does NOT support the 2 standards which would make audio (only) recording possible (and easy to implement):
HTML Media Capture for audio (spec, correct syntax ) - audio recording should be passed to a native app which should pass the result back to the browser for upload (it works for video and picture)
MediaStream Recording API (spec, demo) - allows you to record to a blob directly in the browser. The recording can be downloaded or uploaded to a web server.
I am trying to setup live internet radio station using icecast server and want my stream to work in all modern browsers. My client only produces .ogg stream. All browsers doesn't play .ogg stream. For eg the .ogg stream I have setup works in chrome but doesn't work in IE. How should I make it run in all browsers?
Is there a way I can convert .ogg stream to .mp3 or any other format on the fly
Embed a audio player in the browser which can play .ogg stream.
Or Any other advice would be helpful.
Regards,
Hitesh Bhutani
You have several options:
Change encoding format from OGG to MP3 in your Virtual DJ software. Keep in mind that Firefox will not be able to play mp3 streams on some platforms using HTML5 audio tag due to licensing limitations.
Install some kind of transcoding software on your server (where you have Icecast installed and running), for example liquidosap (https://www.liquidsoap.info/). Liquidsoap can (among other things) take your stream as an input and transcode it to sereveral formats, for example - mp3, aac, ogg and then your Icecast server will have several mount points available, for example http://yourserver.com:8000/stream.mp3, http://yourserver.com:8000/stream.ogg, http://yourserver.com:8000/stream.aac and then you can create a small javascript that wil detect browser version and choose suitable stream.
Use HTML5 media player like jPlayer (http://jplayer.org/) or Soundmanager2 (http://www.schillmania.com/projects/soundmanager2/). These players can automatically detect browser version and select suitable stream type, also if they can't play the stream using HTML5 <audio> tag, they will fall back to internal Flash based player.
The most advanced way is to combine (2) and (3) methods, that will give you the most browser support.
Supported audio coding formats
I want to record the videos through my webcam and want to upload them to the server. I don't want to use any plugin. How can I atleast just record the videos.
There's a project on GitHub called RecordRTC. It also provides a live demo here. This tool could run on browsers supporting WebRTC and getUserMedia. It could record both audio and video.
However, according to data from Can I Use, currently WebRTC and getUserMedia are only supported by Firefox, Chrome, and other blink engine browsers.
Use the navigator.getUserMedia function.
Check out these url`s.
Capturing Audio & Video
Have a look here
That being said, this question has been asked several times before:
How to record webcam and audio using webRTC and a server-based Peer connection
Access webcam without Flash
HTML 5 streaming webcam video?
How to capture a video and store it in h.264 format using web browsers without flash?
As per my analysis, HTML5 can be used to access the camera and microphone without any additional plug-ins as in this link. "http://www.html5rocks.com/en/tutorials/getusermedia/intro/"
However, i don't know the possibility of storing the video in h.264 format.
I would prefer not to install any additional plugins. However if its not possible without any additional plugins, i would accept it. I can also use **Java Applets if needed.
Is HTML 5 the only option or it possible with JScript itself? I also hope that ffmpeg can help me too.
3 years later it is now possible to record H.264 video in the browser with Chrome 52 (Jul 20, 2016) and the Media Recorder API without plugins or Java or Flash.
Chrome 52 is the 1st to support both the Media Recorder API and H.264 for video encoding. Chrome 49,50 and 51 only supported VP8 & VP9 as video codecs and Chrome 48- did not the support Media Recorder API.
The audio codec used is still Opus # 48kHz and the container is .webm so if you'll still have to pass the file through FFmpeg if you want wide browser/device support.
This article (co-wroted by me) covers the Media Recorder API in detail across Firefox and Chrome and there's this Media Recorder API demo that supports H.264 encoding on Chrome 52 + the associated code as a GitHub project.
Disclaimer: I work at Pipe where we handle video recording.
Not yet, but it looks like it's coming.
There is a draft specification for MediaStream Recording, but it has not been implemented in any browsers yet. There is a ticket to build it into Chrome, that you can track.
Someone built a Javascript library to record video into WebM, though it doesn't do audio. It uses the browser's built-in function to save a WebP image to do the encoding. In theory, you could write an h.264 encoder in Javascript, but it would be very slow and quite difficult to write.