Electronic – arduino – How to stream Arduino-based camera to HTTP server

arduinoaudiocameramicrophonenetwork-interface

I'm designing a simple Arduino-based robot that would be capable of streaming an A/V feed (small color camera and microphone) over the Internet to a URL (my web server).

I would be using an Arduino board with either an Arduino WiFi or Ethernet shield.

Several problems:

  • How to send camera video feed and microphone audio feed to the shield (WiFi or Ethernet)?
  • How does the shield actually transmit the A/V feed? Does it automatically encode the stream or is this something I'd have to program myself?

Thanks in advance.

Best Answer

For reasons I pointed out in Transmitting a video stream through a microcontroller's wifi, Arduinos are not suited for audio/video streaming. The audio portion of this makes this even harder since the Arduino would need to combine the video with the audio. In fact, "not suited" is being polite, I doubt the Arduino is even able to handle this.

A 32bit MCU or DSP is far better suited for this!

How to send camera video feed and microphone audio feed to the shield (WiFi or Ethernet)?

Most cameras for this type of application transmit their video via a serial interface. These are not advanced cameras (since the Arduino is so under-powered.) These camera's usually encode/compress video as Motion Jpeg (MJPEG), which is then sent via serial communication.

I can't seem to find one, but I would think that there are camera's that include a mic and encode the video and audio together and transmit it via serial so you would just need to connect it to one of the Arduino's serial ports (or just bypass the Arduino and connect it straight to a serial to WiFi/Ethernet processor like the shield you mentioned.)

If the camera does not handle the audio side, I suppose you could sample the audio using the Arduino's ADC (not recommended) or use some other processor (Codec Shield) to encode the audio (much better quality) and send it to the Arduino. Then the Arduino would need to encode the audio with the video (something I highly doubt it is capable of) and transmit it to the WiFi/Ethernet board via another serial port.

How does the shield actually transmit the A/V feed? Does it automatically encode the stream or is this something I'd have to program myself?

Think of the shield as just a serial cable, all it is doing is transmitting the serial data it is receiving. So however the audio and video is encoded, it will need to be decoded on the other end (a simple task for a computer.) An example of this for the video is MJPEG, the camera encodes/compresses its raw pixel data into JPEG format and transmits it. The receiving device decodes/un-compresses the data and displays it.

Helpful links:

Related Topic