Livestreaming a video from an Android device

Hi all,

As part of a university project, I am trying to display a livestream video on a Psychtoolbox screen from an Android mobile phone, along with 4 flickering stimuli at different frequencies.

The video is broadcast from the Android device via an ip webcam app, and individual frames can be easily read through a Matlab imread(url) command. As such, the video can be represented on Psychtoolbox simply by reading frame by frame, drawing them as a texture to the screen, and flipping. The problem with this is that the process is very slow, and thus causes the four extra stimuli to lose their display frequency, since some flips are inevitably being lost (the screen refresh rate is 60Hz). I also tried to use a Screen('Open Movie') command to try and tap in directly to the video stream, but this simply results in an error message stating that a plugin is missing for Gstreamer for text/html.

Thus, I have two queries:

1) Is there some way to capture and render the video stream in as little time as possible, in order to make sure that no flips are lost (i.e. in 1/60th of a second)?
2) Otherwise, can Psychtoolbox allow another application to display above it in order to allow me to display the video through another application?

I am using a Mac OS X system, but would like this application to work on a Windows system too.

Thanks,

Matthew
Hi Mario,

Thanks for your reply.  Yes, this is for a BCI application - controlling a mobile robot using SSVEPS.

 I'm currently going through the conversation you specified and I'll try make it work for my system.  I'll message back with my results.

The IP camera app is this one: 

 

Thanks again,

Matthew