Jump to content
Electronics-Lab.com Community

Live Streaming Video using USB OTG -- Ameba Arduino


MENG XI

Recommended Posts

Realtek's Ameba dev board comes with USB OTG function as well as video processing power, combined with its WiFi capabiilty, it can live stream video to your PC or smartphone, here is a tutorial about it.

Preparation

Ameba x 1
Logitech C170 web cam x 1
Micro USB OTG adapter x 1
Example

There are 3 micro usb host on Ameba, the one at the back supports OTG UVC, by which the USB camera can transmit video data to Ameba, and Ameba converts the video to rtsp streaming and sends it to the network.
We use Logitech C170 webcam in this example, please find its detailed spec in the link below:
http://www.logitech.com/en-in/product/webcam-c170
The default video streaming format of Ameba is Motion JPEG 320 x 240, users can adjust the parameters according to the need.
Detailed wiring is as below. Connect Micro USB OTG to Ameba, then connect the USB camera.
1-1-1024x546.jpg
Note that in the above wiring diagram, the webcam uses Ameba as power source. If the power supply of Ameba is not sufficient, this would cause the camera unable to work. That is, you have to make sure the power source provides sufficient power to Ameba, or you have to choose the USB OTG which can be connected to external power source.
Next, open the example in "File" -> "Examples" -> "AmebaUVC" -> "uvc_basic"
In the sample code, please fill in the SSID and password of the network you want to connect with. Then upload it to Ameba, and press reset.
Then open the Serial Monitor:
2-6.png

You can see that we are using the default MJPG (Motion JPEG) with resolution 320 * 240 and frame rate 30. After the settings are done, the log message prints the link for the streaming: rtsp://192.168.1.70/test.sdp

Next, we use video player supports video streaming, e.g., VLC Player - http://www.videolan.org/vlc/

Open VLC player, click "Media" -> "Open Network Stream"
3-4.png

Fill in the link of the streaming, (Please make sure the computer and Ameba are connected to the same wireless AP)
4-4.png

5-1.png

VLC also provides application for smartphone:
6-1-1024x477.png

Click "Stream"
7-576x1024.png

Enter the link, and make sure the smartphone and Ameba are connected to the same network.
8-576x1024.png

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...