solderzzc / hlsconvertor Goto Github PK
View Code? Open in Web Editor NEWThis project forked from swarmnyc/hlsconvertor
A Kurento Convertor plugin to transcode WebRTC stream to HLS(TS) stream
This project forked from swarmnyc/hlsconvertor
A Kurento Convertor plugin to transcode WebRTC stream to HLS(TS) stream
*********************************************** * Install Vagrant and load Ubuntu virutal OS *********************************************** See: https://www.vagrantup.com/downloads.html https://atlas.hashicorp.com/ubuntu/boxes/trusty64 # virtual port to Ubuntu, using virtual box. vagrant init ubuntu/trusty64; vagrant up --provider virtualbox # make sure the virtual machine's memory is above 1GB # make sure the virtual machine using bridge mode by commenting out the line in ~/Vagrantfile: # config.vm.network "public_network" vagrant ssh # Install kurento-media-server on the Ubuntu virtual OS: (user:vagrant paw:vagrant) echo "deb http://ubuntu.kurento.org trusty-dev kms6" | sudo tee /etc/apt/sources.list.d/kurento-dev.list wget -O - http://ubuntu.kurento.org/kurento.gpg.key | sudo apt-key add - sudo apt-get update sudo apt-get install kurento-media-server-6.0 sudo service kurento-media-server-6.0 start ********************************** * building kurento media server ********************************** See: https://www.kurento.org/docs/6.0.0/mastering/develop_kurento_modules.html On Ubuntu virtual box: sudo apt-get update sudo apt-get install git git config --global user.name "rentao" git config --global user.email "[email protected]" sudo apt-get install kurento-media-server-6.0-dev kurento-module-scaffold.sh HLSConvertor ./HLSConvertor/ cd HLSConvertor/h-l-s-convertor/src cmake .. make cmake .. -DGENERATE_JS_CLIENT_PROJECT=TRUE (to generate the js code used by npm[node.js]) vi /etc/default/kurento-media-server-6.0 (Add below 2 lines) export KURENTO_MODULES_PATH=/home/vagrant/swarmnyc/HLSConvertor/h-l-s-convertor/src/src export GST_PLUGIN_PATH=/home/vagrant/swarmnyc/HLSConvertor/h-l-s-convertor/src/src sudo service kurento-media-server-6.0 restart ***************************************** * test kurento media server by node.js ***************************************** Download the tutorial project of kurento from: https://github.com/Kurento/kurento-tutorial-node Suppose we are using the kurento-hello-world to test: cd kurento-tutorial-node/kurento-hello-world/ cd node_modules/kurento-client/ vi lib/index.js (Add one line) register('kurento-module-hlsconvertor') # copy the generated js code to current project. cp -r /home/vagrant/swarmnyc/HLSConvertor/h-l-s-convertor/src/js/ ./node-modules/kurento-module-hlsconvertor/ vi package.json (Add one line in the "dependencies" block) "kurento-module-hlsconvertor": "0.0.1-dev", # run the backend server. cd ../.. vi server.js (Change the line, the actual ip address of the running kurento media server) ws_uri: 'ws://192.168.17.197:8888/kurento' (Add below code where webRtcEndpoint is created) pipeline.create('HLSConvertor', function(error, hlsconvertor) { console.log("-------------------------creating HLSConvertor-------------------------\n"+webRtcEndpoint); webRtcEndpoint.connect(hlsconvertor); console.log("-------------------------creating HLSConvertor finished!-------------------------"); }); node server.js ****************************************** * Install nvm and nodejs if necessary ****************************************** Install nvm to upgrade nodejs from: https://github.com/creationix/nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash . ~/.nvm/nvm.sh nvm install 0.12.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.