-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Mediatek-Cloud/mcs-resources
- Loading branch information
Showing
3 changed files
with
13 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,33 +80,30 @@ Note 2: The deviceId is case sensitive. | |
|
||
## Set up the device | ||
|
||
1. Make sure your 7688 development board is connected to your computer. | ||
2. Connect to the console of 7688 development borad through `ssh` command. | ||
|
||
1. Make sure the 7688 development board has been switched to station mode and connect to the same network as your computer successfully. | ||
2. Connect to the console of 7688 development borad through `ssh` command on your computer. | ||
``` | ||
ssh [email protected] | ||
``` | ||
|
||
3. Install FFmpeg package on the 7688 development board. | ||
|
||
``` | ||
opkg update | ||
opkg install ffmpeg | ||
``` | ||
|
||
4. Install necessary Node.js package on the 7688 development board. | ||
|
||
``` | ||
mkdir app && cd app npm init | ||
npm install mcsjs | ||
``` | ||
|
||
5. Test if FFmpeg can send streaming content to MCS successfully. | ||
|
||
``` | ||
ffmpeg -s 176x144 -f video4linux2 -r 30 -i /dev/video0 -f mpeg1video -r 30 -b 800k http://stream-mcs.mediatek.com/:deviceId/:deviceKey/:dataChnId/176/144 | ||
``` | ||
The deviceId, deviceKey and dataChnId need to be replaced with the real value you just obtained. You also need to specify the video resolution in the URL. In this example, the resolution is 176x144. | ||
|
||
The :deviceId, :deviceKey and :dataChnId need to be replaced with the real value you just obtained. You also need to specify the video resolution in the URL. In this example, the resolution is 176x144. | ||
You can view on either MCS web console or App to make sure the video stream works. | ||
|
||
## Developing a Node.js progream to connect with MCS | ||
|
@@ -116,13 +113,11 @@ You can view on either MCS web console or App to make sure the video stream work | |
You are now ready to write the Node.js program on the 7688 development board. | ||
|
||
1. Create a file called app.js using an editor, vi is used in this example: | ||
|
||
``` | ||
vim app.js | ||
``` | ||
|
||
2. Type **i** and copy/paste the following code in the editor. Please remember to replace the deviceId, deviceKey and dataChnId to the real values. | ||
|
||
``` | ||
var mcs = require('mcsjs'); | ||
var exec = require('child_process').exec; | ||
|
@@ -147,7 +142,6 @@ exec('ffmpeg -s ' + width + 'x' + height + ' -f video4linux2 -r 30 -i /dev/video | |
### Run your program | ||
|
||
Let's execute the Node.js program. In the 7688 system console, type the following command | ||
|
||
``` | ||
node app | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,33 +80,30 @@ Note 2: The deviceId is case sensitive. | |
|
||
## Set up the device | ||
|
||
1. Make sure your 7688 development board is connected to your computer. | ||
2. Connect to the console of 7688 development borad through `ssh` command. | ||
|
||
1. Make sure the 7688 development board has been switched to station mode and connect to the same network as your computer successfully. | ||
2. Connect to the console of 7688 development borad through `ssh` command on your computer. | ||
``` | ||
ssh [email protected] | ||
``` | ||
|
||
3. Install FFmpeg package on the 7688 development board. | ||
|
||
``` | ||
opkg update | ||
opkg install ffmpeg | ||
``` | ||
|
||
4. Install necessary Node.js package on the 7688 development board. | ||
|
||
``` | ||
mkdir app && cd app npm init | ||
npm install mcsjs | ||
``` | ||
|
||
5. Test if FFmpeg can send streaming content to MCS successfully. | ||
|
||
``` | ||
ffmpeg -s 176x144 -f video4linux2 -r 30 -i /dev/video0 -f mpeg1video -r 30 -b 800k http://stream-mcs.mediatek.com/:deviceId/:deviceKey/:dataChnId/176/144 | ||
``` | ||
The deviceId, deviceKey and dataChnId need to be replaced with the real value you just obtained. You also need to specify the video resolution in the URL. In this example, the resolution is 176x144. | ||
|
||
The :deviceId, :deviceKey and :dataChnId need to be replaced with the real value you just obtained. You also need to specify the video resolution in the URL. In this example, the resolution is 176x144. | ||
You can view on either MCS web console or App to make sure the video stream works. | ||
|
||
## Developing a Node.js progream to connect with MCS | ||
|
@@ -116,13 +113,11 @@ You can view on either MCS web console or App to make sure the video stream work | |
You are now ready to write the Node.js program on the 7688 development board. | ||
|
||
1. Create a file called app.js using an editor, vi is used in this example: | ||
|
||
``` | ||
vim app.js | ||
``` | ||
|
||
2. Type **i** and copy/paste the following code in the editor. Please remember to replace the deviceId, deviceKey and dataChnId to the real values. | ||
|
||
``` | ||
var mcs = require('mcsjs'); | ||
var exec = require('child_process').exec; | ||
|
@@ -147,7 +142,6 @@ exec('ffmpeg -s ' + width + 'x' + height + ' -f video4linux2 -r 30 -i /dev/video | |
### Run your program | ||
|
||
Let's execute the Node.js program. In the 7688 system console, type the following command | ||
|
||
``` | ||
node app | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,33 +80,30 @@ Note 2: The deviceId is case sensitive. | |
|
||
## Set up the device | ||
|
||
1. Make sure your 7688 development board is connected to your computer. | ||
2. Connect to the console of 7688 development borad through `ssh` command. | ||
|
||
1. Make sure the 7688 development board has been switched to station mode and connect to the same network as your computer successfully. | ||
2. Connect to the console of 7688 development borad through `ssh` command on your computer. | ||
``` | ||
ssh [email protected] | ||
``` | ||
|
||
3. Install FFmpeg package on the 7688 development board. | ||
|
||
``` | ||
opkg update | ||
opkg install ffmpeg | ||
``` | ||
|
||
4. Install necessary Node.js package on the 7688 development board. | ||
|
||
``` | ||
mkdir app && cd app npm init | ||
npm install mcsjs | ||
``` | ||
|
||
5. Test if FFmpeg can send streaming content to MCS successfully. | ||
|
||
``` | ||
ffmpeg -s 176x144 -f video4linux2 -r 30 -i /dev/video0 -f mpeg1video -r 30 -b 800k http://stream-mcs.mediatek.com/:deviceId/:deviceKey/:dataChnId/176/144 | ||
``` | ||
The deviceId, deviceKey and dataChnId need to be replaced with the real value you just obtained. You also need to specify the video resolution in the URL. In this example, the resolution is 176x144. | ||
|
||
The :deviceId, :deviceKey and :dataChnId need to be replaced with the real value you just obtained. You also need to specify the video resolution in the URL. In this example, the resolution is 176x144. | ||
You can view on either MCS web console or App to make sure the video stream works. | ||
|
||
## Developing a Node.js progream to connect with MCS | ||
|
@@ -116,13 +113,11 @@ You can view on either MCS web console or App to make sure the video stream work | |
You are now ready to write the Node.js program on the 7688 development board. | ||
|
||
1. Create a file called app.js using an editor, vi is used in this example: | ||
|
||
``` | ||
vim app.js | ||
``` | ||
|
||
2. Type **i** and copy/paste the following code in the editor. Please remember to replace the deviceId, deviceKey and dataChnId to the real values. | ||
|
||
``` | ||
var mcs = require('mcsjs'); | ||
var exec = require('child_process').exec; | ||
|
@@ -147,7 +142,6 @@ exec('ffmpeg -s ' + width + 'x' + height + ' -f video4linux2 -r 30 -i /dev/video | |
### Run your program | ||
|
||
Let's execute the Node.js program. In the 7688 system console, type the following command | ||
|
||
``` | ||
node app | ||
``` | ||
|