Re: [whatwg] Recorder audio and save to server

2015-04-07 Thread Narendra Sisodiya
Hi Rob,
I have downloaded the blob and checked, yes, it is Ogg data. So Firefox
MediaRecorder API is excellent.
https://wiki.mozilla.org/Gecko:MediaRecorder - Diagram include all the
codec which we are talking about.
Finally, My second problem was also solved by API itself.

http://w3c.github.io/mediacapture-record/MediaRecorder.html#widl-MediaRecorder-start-void-long-timeslice

start Method accept timeslice as parameter. So when I provided timeslice
parameter, like 2000, I was getting blob using dataavailable event.

Fantastic ! Back to coding. I will use MediaRecorder API and will wait for
the chrome to solve the bug -
https://code.google.com/p/chromium/issues/detail?id=262211




2015-04-07 11:30 GMT+05:30 Narendra Sisodiya naren...@narendrasisodiya.com
:

 Thanks, I am checking all these.

 @ Rob,
 I have seen MediaRecorder API, yesterday. It is the API for the exact
 same purpose I want but I have two unanswered question regrading API.

 1) No where, they have mentioned about the encoding format. I have tested
 working demo but still still unable to figure about its encoding format.
 Probably I will try to download blob and check.
 2) I think, MediaRecorder API like this, Start Recoding, wait, Stop
 recording, then get the encoded blob.
 This is suitable for small duration audio recording. I want recording for
 long duration like 1 hour. Encoding at the end of the lecture will hang my
 CPU and take long time to upload whole blob.
 What I want, every 2 or 5 second, I should get encoded blob for that much
 duration and I will send that small encoded blob using websocket. So its
 like continuous encoding and transmitting to server.



 2015-04-07 9:50 GMT+05:30 Robert O'Callahan rob...@ocallahan.org:

 On Sat, Apr 4, 2015 at 9:28 PM, Narendra Sisodiya 
 naren...@narendrasisodiya.com wrote:

 Hi,
 I am trying to do simple audio recording service.
 with help of navigator.getUserMedia, I am able to record audio in wav
 format.


 MediaRecorder is designed for exactly this.
 https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API

 Rob
 --
 oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
 owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
 osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
 owohooo
 osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
 oioso
 oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
 owohooo
 osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
 ooofo
 otohoeo ofoioroeo ooofo ohoeololo.




 --

 *Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
 Delhi - Bharat




-- 

*Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
Delhi - Bharat


Re: [whatwg] Recorder audio and save to server

2015-04-07 Thread Narendra Sisodiya
Thanks, I am checking all these.

@ Rob,
I have seen MediaRecorder API, yesterday. It is the API for the exact
same purpose I want but I have two unanswered question regrading API.

1) No where, they have mentioned about the encoding format. I have tested
working demo but still still unable to figure about its encoding format.
Probably I will try to download blob and check.
2) I think, MediaRecorder API like this, Start Recoding, wait, Stop
recording, then get the encoded blob.
This is suitable for small duration audio recording. I want recording for
long duration like 1 hour. Encoding at the end of the lecture will hang my
CPU and take long time to upload whole blob.
What I want, every 2 or 5 second, I should get encoded blob for that much
duration and I will send that small encoded blob using websocket. So its
like continuous encoding and transmitting to server.



2015-04-07 9:50 GMT+05:30 Robert O'Callahan rob...@ocallahan.org:

 On Sat, Apr 4, 2015 at 9:28 PM, Narendra Sisodiya 
 naren...@narendrasisodiya.com wrote:

 Hi,
 I am trying to do simple audio recording service.
 with help of navigator.getUserMedia, I am able to record audio in wav
 format.


 MediaRecorder is designed for exactly this.
 https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API

 Rob
 --
 oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
 owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
 osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
 owohooo
 osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
 oioso
 oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
 owohooo
 osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
 ooofo
 otohoeo ofoioroeo ooofo ohoeololo.




-- 

*Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
Delhi - Bharat


Re: [whatwg] Recorder audio and save to server

2015-04-07 Thread Ashley Gullen
I've brought this up on other lists, but I think it's worth bringing up
again here: it's a significant limitation in MediaRecorder that it can only
work in real-time. If a user has a pre-recorded WAV file which is one hour
long and they want to upload that or encode it to a different format,
MediaRecorder requires that the encoding happen in real-time. So the user
has to sit there and wait for an hour when it could be seconds to minutes
if it could work faster. So I think there are still important use cases for
uploading audio that MediaRecorder doesn't cover.

My preferred solution would be to allow MediaRecorder to accept an
AudioBuffer instead of a MediaStream, and in this case allow it to encode
as fast as possible.

Ashley


On 7 April 2015 at 09:14, Narendra Sisodiya naren...@narendrasisodiya.com
wrote:

 Hi Rob,
 I have downloaded the blob and checked, yes, it is Ogg data. So Firefox
 MediaRecorder API is excellent.
 https://wiki.mozilla.org/Gecko:MediaRecorder - Diagram include all the
 codec which we are talking about.
 Finally, My second problem was also solved by API itself.


 http://w3c.github.io/mediacapture-record/MediaRecorder.html#widl-MediaRecorder-start-void-long-timeslice

 start Method accept timeslice as parameter. So when I provided timeslice
 parameter, like 2000, I was getting blob using dataavailable event.

 Fantastic ! Back to coding. I will use MediaRecorder API and will wait for
 the chrome to solve the bug -
 https://code.google.com/p/chromium/issues/detail?id=262211




 2015-04-07 11:30 GMT+05:30 Narendra Sisodiya 
 naren...@narendrasisodiya.com
 :

  Thanks, I am checking all these.
 
  @ Rob,
  I have seen MediaRecorder API, yesterday. It is the API for the exact
  same purpose I want but I have two unanswered question regrading API.
 
  1) No where, they have mentioned about the encoding format. I have tested
  working demo but still still unable to figure about its encoding format.
  Probably I will try to download blob and check.
  2) I think, MediaRecorder API like this, Start Recoding, wait, Stop
  recording, then get the encoded blob.
  This is suitable for small duration audio recording. I want recording for
  long duration like 1 hour. Encoding at the end of the lecture will hang
 my
  CPU and take long time to upload whole blob.
  What I want, every 2 or 5 second, I should get encoded blob for that much
  duration and I will send that small encoded blob using websocket. So its
  like continuous encoding and transmitting to server.
 
 
 
  2015-04-07 9:50 GMT+05:30 Robert O'Callahan rob...@ocallahan.org:
 
  On Sat, Apr 4, 2015 at 9:28 PM, Narendra Sisodiya 
  naren...@narendrasisodiya.com wrote:
 
  Hi,
  I am trying to do simple audio recording service.
  with help of navigator.getUserMedia, I am able to record audio in wav
  format.
 
 
  MediaRecorder is designed for exactly this.
  https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API
 
  Rob
  --
  oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
  owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
  osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
  owohooo
  osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o
 o‘oRoaocoao,o’o
  oioso
  oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
  owohooo
  osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
  ooofo
  otohoeo ofoioroeo ooofo ohoeololo.
 
 
 
 
  --
 
  *Narendra SisodiyaUI Architect @ *Unicommerce 
 http://www.unicommerce.com
  Delhi - Bharat
 



 --

 *Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
 Delhi - Bharat



Re: [whatwg] Recorder audio and save to server

2015-04-07 Thread Narendra Sisodiya
Hi Ashley,
yes, MediaRecorder must accept AudioBuffer. but current spec
http://w3c.github.io/mediacapture-record/MediaRecorder.html#widl-MediaRecorder-stream
mention that source should be type MediaStream. Good to see your filed bug
- https://github.com/w3c/mediacapture-record/issues/6
   currently I am trying to record seminar/lecture. so this will not be a
problem.

2015-04-07 17:10 GMT+05:30 Ashley Gullen ash...@scirra.com:

 I've brought this up on other lists, but I think it's worth bringing up
 again here: it's a significant limitation in MediaRecorder that it can only
 work in real-time. If a user has a pre-recorded WAV file which is one hour
 long and they want to upload that or encode it to a different format,
 MediaRecorder requires that the encoding happen in real-time. So the user
 has to sit there and wait for an hour when it could be seconds to minutes
 if it could work faster. So I think there are still important use cases for
 uploading audio that MediaRecorder doesn't cover.

 My preferred solution would be to allow MediaRecorder to accept an
 AudioBuffer instead of a MediaStream, and in this case allow it to encode
 as fast as possible.

 Ashley


 On 7 April 2015 at 09:14, Narendra Sisodiya naren...@narendrasisodiya.com
  wrote:

 Hi Rob,
 I have downloaded the blob and checked, yes, it is Ogg data. So
 Firefox
 MediaRecorder API is excellent.
 https://wiki.mozilla.org/Gecko:MediaRecorder - Diagram include all the
 codec which we are talking about.
 Finally, My second problem was also solved by API itself.


 http://w3c.github.io/mediacapture-record/MediaRecorder.html#widl-MediaRecorder-start-void-long-timeslice

 start Method accept timeslice as parameter. So when I provided timeslice
 parameter, like 2000, I was getting blob using dataavailable event.

 Fantastic ! Back to coding. I will use MediaRecorder API and will wait for
 the chrome to solve the bug -
 https://code.google.com/p/chromium/issues/detail?id=262211




 2015-04-07 11:30 GMT+05:30 Narendra Sisodiya 
 naren...@narendrasisodiya.com
 :

  Thanks, I am checking all these.
 
  @ Rob,
  I have seen MediaRecorder API, yesterday. It is the API for the
 exact
  same purpose I want but I have two unanswered question regrading API.
 
  1) No where, they have mentioned about the encoding format. I have
 tested
  working demo but still still unable to figure about its encoding format.
  Probably I will try to download blob and check.
  2) I think, MediaRecorder API like this, Start Recoding, wait, Stop
  recording, then get the encoded blob.
  This is suitable for small duration audio recording. I want recording
 for
  long duration like 1 hour. Encoding at the end of the lecture will hang
 my
  CPU and take long time to upload whole blob.
  What I want, every 2 or 5 second, I should get encoded blob for that
 much
  duration and I will send that small encoded blob using websocket. So its
  like continuous encoding and transmitting to server.
 
 
 
  2015-04-07 9:50 GMT+05:30 Robert O'Callahan rob...@ocallahan.org:
 
  On Sat, Apr 4, 2015 at 9:28 PM, Narendra Sisodiya 
  naren...@narendrasisodiya.com wrote:
 
  Hi,
  I am trying to do simple audio recording service.
  with help of navigator.getUserMedia, I am able to record audio in wav
  format.
 
 
  MediaRecorder is designed for exactly this.
  https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API
 
  Rob
  --
  oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
  owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
  osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
  owohooo
  osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o
 o‘oRoaocoao,o’o
  oioso
  oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
  owohooo
  osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
  ooofo
  otohoeo ofoioroeo ooofo ohoeololo.
 
 
 
 
  --
 
  *Narendra SisodiyaUI Architect @ *Unicommerce 
 http://www.unicommerce.com
  Delhi - Bharat
 



 --

 *Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
 
 Delhi - Bharat





-- 

*Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
Delhi - Bharat


Re: [whatwg] Recorder audio and save to server

2015-04-07 Thread Robert O'Callahan
On Tue, Apr 7, 2015 at 11:40 PM, Ashley Gullen ash...@scirra.com wrote:

 I've brought this up on other lists, but I think it's worth bringing up
 again here: it's a significant limitation in MediaRecorder that it can only
 work in real-time. If a user has a pre-recorded WAV file which is one hour
 long and they want to upload that or encode it to a different format,
 MediaRecorder requires that the encoding happen in real-time. So the user
 has to sit there and wait for an hour when it could be seconds to minutes
 if it could work faster. So I think there are still important use cases for
 uploading audio that MediaRecorder doesn't cover.

 My preferred solution would be to allow MediaRecorder to accept an
 AudioBuffer instead of a MediaStream, and in this case allow it to encode
 as fast as possible.


In Gecko, MediaRecorder has a constructor that accepts an AudioNode. This
AudioNode can belong to an OfflineAudioContext, which solves your use-case.
This extension was proposed and accepted on public-media-capture though the
spec hasn't been updated yet.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.


Re: [whatwg] Recorder audio and save to server

2015-04-06 Thread Grover Blue
I would convert PCM at client.  Not sure if this fits your needs, but heck
out:
https://github.com/audiocogs/ogg.js

Definitely use websockets.  socket.io is what you want.

You don't need another else.  Something to consider: if you've going to be
playing back the recorded audio (or broadcasting it), I'd look into
compressing it even more to optimize your bandwidth usage.



On Sat, Apr 4, 2015 at 4:28 AM, Narendra Sisodiya 
naren...@narendrasisodiya.com wrote:

 Hi,
 I am trying to do simple audio recording service.
 with help of navigator.getUserMedia, I am able to record audio in wav
 format.

 Here are some question.
 1) Should I encode PCM data into ogg format at client end using some web
 worker or should I directly send PCM data to server. or encode into wav
 format and send multiple wav file. Server will combine it.

 2) should I use websocket or XHR ?

 3) I am using nodejs at server side. do I need to switch to any another
 technology? I only know JavaScript well.

 4) The audio duration will be like 30 minutes to 1 hour.


 --

 *Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
 Delhi - Bharat




-- 
“If the American people ever allow private banks to control the issue of
their currency, first by inflation, then by deflation, the banks...will
deprive the people of all property until their children wake-up homeless on
the continent their fathers conquered... The issuing power should be taken
from the banks and restored to the people, to whom it properly belongs.
-- Thomas Jefferson

Government big enough to supply everything...is big enough to take
everything you have. The course of history shows that as a government
grows, liberty decreases --- Thomas Jefferson

www.CampaignForLiberty.org


Re: [whatwg] Recorder audio and save to server

2015-04-06 Thread Roger Hågensen

On 2015-04-07 03:29, Grover Blue wrote:

I would convert PCM at client.  Not sure if this fits your needs, but heck
out:
https://github.com/audiocogs/ogg.js

Definitely use websockets.  socket.io is what you want.

You don't need another else.  Something to consider: if you've going to be
playing back the recorded audio (or broadcasting it), I'd look into
compressing it even more to optimize your bandwidth usage.


I'll second the use of websockets.
You might also want to look at 
http://stackoverflow.com/questions/20548629/how-can-i-use-opus-codec-from-javascript
The answer from Rainer Rillke is rather impressive and include FLAC and 
Opus support via javascript frameworks.


I'd suggest FLAC for lossless audio and Ogg Opus for lossy, there are 
also no licensing/royalty/patent issues with these codecs.
With Ogg Opus you may be able to leverage existing Opus support in the 
browser.



--
Roger Hågensen, Freelancer, http://skuldwyrm.no/


Re: [whatwg] Recorder audio and save to server

2015-04-06 Thread Robert O'Callahan
On Sat, Apr 4, 2015 at 9:28 PM, Narendra Sisodiya 
naren...@narendrasisodiya.com wrote:

 Hi,
 I am trying to do simple audio recording service.
 with help of navigator.getUserMedia, I am able to record audio in wav
 format.


MediaRecorder is designed for exactly this.
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.


[whatwg] Recorder audio and save to server

2015-04-04 Thread Narendra Sisodiya
Hi,
I am trying to do simple audio recording service.
with help of navigator.getUserMedia, I am able to record audio in wav
format.

Here are some question.
1) Should I encode PCM data into ogg format at client end using some web
worker or should I directly send PCM data to server. or encode into wav
format and send multiple wav file. Server will combine it.

2) should I use websocket or XHR ?

3) I am using nodejs at server side. do I need to switch to any another
technology? I only know JavaScript well.

4) The audio duration will be like 30 minutes to 1 hour.


-- 

*Narendra SisodiyaUI Architect @ *Unicommerce http://www.unicommerce.com
Delhi - Bharat