Mobile Streaming Video

Author // Stavros Didakis Categories // Tutorials, Code Examples

Mobile Streaming Video

This article presents a code example of how to use a streaming video image from a mobile phone into Processing and Max.

This technique was used in this installation to extract video streamed from mobile phones and use the received images in a multiscreen visual composition. In order to continue with this examples, you need to download and install the free application IPWebcam for your Android device. This application is used to stream video from your mobile phone to a number of protocols and devices i.e. Java, javascript, RTMP, VLC, Skype, or re-transmit to another mobile device. In the following examples we will use a local server to select the image frames that are created from the built-in camera video of the mobile device.

When you open the application you will see the following screen that configures the application. 


Make sure that the Resolution (and Photo Resolution) is set to a medium level (a value of 640x480 should be enough), as bigger values may result to a slower playback rate. Set Quality from 50% up to 75% maximum. For the FPS Limit you could use No limit, or a simple 30fps should be enough. You can select Prevent going to sleep if you want your device to stream non-stop until you quit, and the rest options could remain with the default values. Next, we Start server and we see a new window with our live camera video and two buttons on the top left and right of the screen. We select How do I connect?, and then it is best that we choose I'm using Wi-Fi router (if we are not connected to a Wi-Fi router this will not work). Next window will show us the local IP of the device, and we need to make sure that we use this address in our code if we want to read the video frames.




Now that we broadcast video frames (as jpeg images) in our network, we can start using Processing or Max to read these frames, and use them in our composition if we like. In Processing, the code to read this address and put its contents in an image would be something like this:


Download the Processing file

And following, is the code for Max, that uses the exact same approach.


Download the Max file

About the Author

Stavros Didakis

Stavros Didakis

Stavros Didakis is the founder and managing director of SoniconLab, a media laboratory with a focus and interest in media, art, and technology. He is currently pursuing a PhD in Media Arts & Technology at the Institure of Digital Arts Technology (i-DAT), in Plymouth University (UK). His work focuses on the development of digital systems, programming, media design, interaction, and system installation. Stavros is also a scholar of Alexander S. Onasis Public Benefit Foundation.

Leave a comment

You are commenting as guest. Optional login below.