Skip to content

Commit

Permalink
Merge pull request #69 from Mediatek-Cloud/MCS-2953-video-stream-indi…
Browse files Browse the repository at this point in the history
…a-workshop

Mcs 2953 video stream india workshop
  • Loading branch information
anchi1216 committed Feb 15, 2016
2 parents 07aae3b + eec8ead commit be44bbb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 30 deletions.
15 changes: 5 additions & 10 deletions content/en/tutorial/7688_videostream_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,19 @@ 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
Expand All @@ -106,7 +103,8 @@ npm install mcsjs
```
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
Expand All @@ -116,13 +114,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;
Expand All @@ -147,7 +143,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
```
Expand Down
14 changes: 4 additions & 10 deletions content/zh-CN/tutorial/7688_videostream_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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
```
Expand Down
14 changes: 4 additions & 10 deletions content/zh-TW/tutorial/7688_videostream_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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
```
Expand Down

0 comments on commit be44bbb

Please sign in to comment.