-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.json
7 lines (7 loc) · 3.48 KB
/
params.json
1
2
3
4
5
6
7
{
"name": "Webcast.js",
"tagline": "Streaming from your browser to the world!",
"body": "Webcast.js\r\n==========\r\n\r\n<table>\r\n <tr><td><img src=\"https://rawgithub.com/savonet/webcast/master/misc/webcast.svg\" alt=\"Webcast Flowchart\" title=\"Webcast Flowchart\"/></td></tr>\r\n <tr><td>The Webcast Flowchart</td></tr>\r\n</table>\r\n\r\n### Description\r\n\r\nThe webcast library is designed to write browser-based clients to stream local files and live media (webcam video, microphone audio).\r\n\r\nThe API contains several classes:\r\n\r\n* `Webcast.Encoder.Raw`: encoder returning raw s8 samples.\r\n* `Webcast.Encoder.Mp3`: encoder returning mp3 data. Requires [libshine.js](https://github.com/savonet/shine/tree/master/js).\r\n* `Webcast.Encoder.Resample`: a wrapper to resample encoder's input. Requires [libsamplerate.js](https://github.com/savonet/libsamplerate-js).\r\n* `Webcast.Encoder.Asynchronous`: a wrapper to encode in a [Web Worker](http://www.w3.org/TR/workers/)\r\n* `Webcast.Socket`: a simple wrapper around `WebSockets` that implements the `webcast` protocol.\r\n* `Webcast.Node`: a wrapper to create a `webcast` node, in-par with the Web Audio API.\r\n\r\nHere's the highlight of how to use the library:\r\n\r\n```\r\nvar source = (...);\r\n\r\nvar encoder = new Webcast.Encoder.Mp3({\r\n channels: 2,\r\n samplerate: 44100,\r\n bitrate: 128\r\n});\r\n\r\nif (inputSampleRate !== 44100) {\r\n encoder = new Webcast.Encoder.Resample({\r\n encoder: encoder,\r\n samplerate: inputSampleRate \r\n });\r\n}\r\n\r\nif (useWorker) {\r\n encoder = new Webcast.Encoder.Asynchronous({\r\n encoder: encoder,\r\n scripts: [(...)], // full path to required scripts for the worker.\r\n // usually includes requires encoders and webcast.js \r\n });\r\n}\r\n\r\nvar webcast = context.createWebcastSource(4096, 2);\r\n\r\nsource.connect(webcast);\r\nwebcast.connect(audioContext.destination);\r\n\r\nwebcast.sendMetadata({\r\n title: \"My Awesome Stream\",\r\n artist: \"The Dude\"\r\n});\r\n\r\n```\r\n\r\nThe library involves several cutting-edge technologies and, thus, require a fairly modern browser.\r\nHere's a quick summary of the required technologies:\r\n\r\n* [WebSocket API](http://www.w3.org/TR/2011/WD-websockets-20110929/): This is the transport layer. It is readily available in most modern browsers.\r\n* [Web Audio API](https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html): This is the API used to manipulate audio and video data inside the browser. \r\n* [asm.js](http://asmjs.org/): This is the technology used to optimize the mp3 encoder.\r\n\r\n### How to test?\r\n\r\n#### Client\r\n\r\nA browser-based streaming client, sending mp3 encoded data, using \r\n[libshine.js](https://github.com/savonet/shine/tree/master/js) or raw PCM data is available at [webcast/webcaster](https://github.com/webcast/webcaster)\r\n\r\n#### Server\r\n\r\nThe [webcast/webcast.js](https://github.com/webcast/webcast.js) repository contains a demo server, written in [NodeJS](http://nodejs.org/).\r\n\r\nAlternatively, a fully functional implementation of the protocol is available in\r\n[liquidsoap](https://github.com/savonet/liquidsoap). To test it, you can simply run [liquidsoap](https://github.com/savonet/liquidsoap) with the following command line:\r\n```\r\nliquidsoap 'output.ao(fallible=true,audio_to_stereo(input.harbor(\"mount\",port=8080)))'\r\n```",
"google": "",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}