Robert Whitman’s ‘Passport,’ in Two States at Once – NYTimes.com

Nice article in the Times about Whitman’s latest piece.  I built and ran the video network that connected the two locations for the performance.  Scenes from each location were transmitted and shown live in the other location.

Robert Whitman’s ‘Passport,’ in Two States at Once – NYTimes.com.

Live iPhone Video

I recently read about an app for the iPhone called Knocking Video. It is apparently the first app that allows live streams from an iPhone (any iPhone model) that has been approved by Apple. The story I read went on to describe the saga of it’s struggle for approval and it seems was given the thumbs up from none other than Steve Jobs.

A great story and I love the concept of the app. Unfortunately I think it is doomed to failure. There are just too many barriers in it that are needlessly going to turn off potential users.

The first problem has to do with the sign-up portion of the app. It asks for first name, last name and email. The problem is that it’s error checking is just too aggressive and bug filled. For instance my last name is two words and that wasn’t allowed. Good luck people who want to find me on the app, you won’t be able to because I had to use a last name that isn’t correct. Perhaps you could try to find me via my email address? Guess again, it didn’t allow a dash in my domain name so again I had to use an alternate.

Second, once you join you have to figure out somehow if any of your friends are already using it. There is no way to test the app (as far as I can tell) without a friend “knocking”. They should at least have an echo or testing user that people could try it with.

Since I have no way to evaluate the app, I am not going to send emails to my friends asking them to join..

Ooh yeah, I went to the help and about screens to figure out how to let the company know my issues but the email address they list doesn’t exist.. Guess this blog post will have to suffice, perhaps they’ll read it.

Flash Media Server Sending Images

One of my students in my live web class is developing an interesting application that sends screenshots to other people. I put together some sample code to help him along and thought this would be of general interest.

Using the Flash Media Server with Remote Shared Objects this can be built. Here is a walk through of the code:

First of all, this uses the JPGEncoder class from the AS3CoreLib so you probably want to grab that and import it.

	import com.adobe.images.JPGEncoder;

This example uses a SharedObject, a NetConnection and NetStreams for sending the video as well as the screen shots. Once the NetConnection is established, the SharedObject can be setup:

        // Listener for connection
        private function connectionHandler (e:NetStatusEvent):void 
        { 
        	// If we are connected
             if (e.info.code == "NetConnection.Connect.Success") 
             {
				// Set up the shared object
				// We'll call it SimpleSO, pass in the app url and not make it persistent
				sharedObject = SharedObject.getRemote("SimpleSO",nc.uri,false);
				
				// Tell the shared object to call methods in this class if requested
				sharedObject.client = this;				
				
				// Add a listener for when shared object is changed
			   	sharedObject.addEventListener (SyncEvent.SYNC,syncEventCallBack); 

				// Connect the shared object to our netConnection
				sharedObject.connect(nc);
				
				// All of the video streaming setup
				doEverything();
				
				// Register mouseclicks, how we'll determine when to send a frame
				stage.addEventListener(MouseEvent.MOUSE_DOWN, saveFrame);
             } 
        }

Here is the method that is called when the mouse is clicked. It creates a bitmapdata object, encodes as a JPEG and sends that as a bytearray through the shared object:

        private function saveFrame(e:MouseEvent):void
        {        
        	// Save the frame to the bitmapdata object
        	var bmpd:BitmapData = new BitmapData(320,240);
        	bmpd.draw(videoIn1);
                	
        	// First encode as JPEG so it is smaller
			var jpgEncoder:JPGEncoder = new JPGEncoder(100);
			var jpgByteArray:ByteArray = jpgEncoder.encode(bmpd);
			
			// Send it via the shared object
			sharedObject.send("newBitmap",jpgByteArray);
        }

The SharedObject.send method calls the function “newBitmap” on everyone who is connected and passes in the jpgByteArray. The newBitmap function uses the Loader to uncompress the JPG and when it is done calls “gotBitmapData”:

		public function newBitmap(jpgByteArray:ByteArray):void
		{
			var loader:Loader = new Loader();
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, gotBitmapData)
			loader.loadBytes(jpgByteArray);
		}

gotBitmap data just creates a regular Bitmap and displays it:

	private function gotBitmapData(e:Event):void
	{
		var decodedBitmapData:BitmapData = Bitmap(e.target.content).bitmapData

        	// Create the bitmap image
        	var bmp:Bitmap = new Bitmap(decodedBitmapData);
        	
        	// Add it to the stage
        	bmp.x = 0;
        	bmp.y = 240;
        	addChild(bmp);			
	}

Here is the full AS3 class (it could be improved but it works):

package
{
	// Import JPEGEncoder Class from: http://code.google.com/p/as3corelib/
	import com.adobe.images.JPGEncoder;

	import flash.display.Sprite; 
	import flash.display.MovieClip; 
	import flash.events.NetStatusEvent; 
	import flash.net.NetConnection; 
	import flash.net.NetStream; 
	import flash.media.Camera; 
	import flash.media.Microphone; 
	import flash.media.Video; 
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.events.MouseEvent;
	import flash.utils.ByteArray;
	import flash.net.SharedObject; 
  	import flash.events.SyncEvent; 
  	import flash.events.Event;
	import flash.display.Loader;

	public class VideoCapture extends Sprite
	{
		// Shared Object for communication
   		private var sharedObject:SharedObject;

 		// Overall NetConnection for communicating with FMS
        private var nc:NetConnection; 
        
        // RTMP URL, same as directory on FMS
        private var rtmpURL:String = "rtmp://xxxx/webcam";
         
        // NetStreams for each stream 
        private var netStreamOut:NetStream; 
        private var netStreamIn1:NetStream; 
        
        // Camera
        private var camera:Camera; 
        // Microphone
        private var microphone:Microphone; 
                
        // My Video
        private var videoOut:Video; 
        
        // Video Components
        private var videoIn1:Video; 
        
        // Stream Names
        private var outStream:String; 
        private var inStream1:String; 

        public function VideoCapture() 
        { 
        	// Construct NetConnection and connect to server
             nc = new NetConnection(); 
             nc.connect(rtmpURL); 
             
             // Add a listener for connection
             nc.addEventListener (NetStatusEvent.NET_STATUS,connectionHandler); 
        } 
        
        
        // Listener for connection
        private function connectionHandler (e:NetStatusEvent):void 
        { 
        	// If we are connected
             if (e.info.code == "NetConnection.Connect.Success") 
             {

				// Set up the shared object
				// We'll call it SimpleSO, pass in the app url and not make it persistent
				sharedObject = SharedObject.getRemote("SimpleSO",nc.uri,false);
				
				// Tell the shared object to call methods in this class if requested
				sharedObject.client = this;				
				
				// Connect the shared object to our netConnection
				sharedObject.connect(nc);
				
				// All of the video streaming
				doEverything();
				
				// Register mouseclicks, how we'll determine when to send a frame
				stage.addEventListener(MouseEvent.MOUSE_DOWN, saveFrame);
             } 
        }
        
        // Gets the results from the server
        private function doEverything():void 
        { 
        	// Name of streams
			outStream="one"; 
			inStream1="one"; 
        
			// Setup the camera        
			camera = Camera.getCamera(); 

			// setup the microphone             
			microphone = Microphone.getMicrophone(); 

			// Video components
			videoOut = new Video(); 
    		videoIn1 = new Video();

			// Set positions 
			videoOut.x = 0;
			videoOut.y = 0;
			videoIn1.x = 320;
			videoIn1.y = 0;

			// Add them to the screen
			addChild(videoOut);
			addChild(videoIn1);

            // Publish our stream
            netStreamOut = new NetStream(nc); 
            netStreamOut.attachAudio(microphone); 
            netStreamOut.attachCamera(camera); 
            netStreamOut.publish(outStream, "live"); 
             
            // Attach camera to our video 
            videoOut.attachCamera(camera); 
             
            //Play incoming streamed video 
            netStreamIn1 = new NetStream(nc); 

			videoIn1.attachNetStream(netStreamIn1);

			netStreamIn1.play(inStream1);
        }
        
        private function saveFrame(e:MouseEvent):void
        {        
        	// Save the frame to the bitmapdata object
        	var bmpd:BitmapData = new BitmapData(320,240);
        	bmpd.draw(videoIn1);
                	
        	// First encode as JPEG so it is smaller
			var jpgEncoder:JPGEncoder = new JPGEncoder(100);
			var jpgByteArray:ByteArray = jpgEncoder.encode(bmpd);
			
			// Send it via the shared object
			sharedObject.send("newBitmap",jpgByteArray);
        }
        
		
		public function newBitmap(jpgByteArray:ByteArray):void
		{
			var loader:Loader = new Loader();
			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, gotBitmapData)
			loader.loadBytes(jpgByteArray);
		}
		
		private function gotBitmapData(e:Event):void
		{
			var decodedBitmapData:BitmapData = Bitmap(e.target.content).bitmapData

        	// Create the bitmap image
        	var bmp:Bitmap = new Bitmap(decodedBitmapData);
        	
        	// Add it to the stage
        	bmp.x = 0;
        	bmp.y = 240;
        	addChild(bmp);			
		}
	} 
}

Nielson Says: Americans Watching More TV Than Ever; Web and Mobile Video Up too

While I expect Nielson to say that, what I didn’t expect was that they would show mobile viewing on par with internet viewing. That is certainly suspect and looking a bit more closely at their charts it makes more sense.




The top chart indicates that people watch as much on their mobile phones as they do on their computers. The second chart puts this in context, the number of internet users watching video is 131,102,000 and the number watching mobile video 13,419,000, 1/10th of the number. Taken across all of those users, the average monthly video viewing time on the internet is only 3 hours while the mobile user are up to around 3 1/2 hours.

This seems pretty out of whack but then again, the top/first 10% internet viewers are probably watching 10 times that amount (I know I am with NetFlix, Hulu, BitTorrent, YouTube and the like), it seems out of whack because you are only seeing the power users on the mobile phone accessing video while you are seeing broad viewership on the internet.

Consider it this way:

Internet: 131,102,000 users x 3 hours = 393,306,000 (almost 400 million hours)
Mobile: 13,419,000 users x 3.5 hours = 46,966,500 (approximately 47 million hours)
(mobile stills seems a bit over reported but taking into account the numbers they are talking about, it seems more likely)

Podcast Aggregation..

I was just looking through the feeds that I subscribe to in iTunes (audio and video podcasts) and noticed that every single one of them had a little exclamation point next to it indicating that it stopped updating as I haven’t watched or listened in a while.

This is interesting for a couple of reasons. First, I really really do enjoy watching and listening to many of these. Second, I have listened and watch some of these recently, just not through iTunes (or my iPhone). Most through their website or through online radio (NPR shows on WNYC).

With broadband pretty ubiquitous and even phones being able to be used for listening to or watching online audio/video, aggregators are becoming much less useful (and increasingly wasteful when considering bandwidth usage).

Since really the only reason I still have to use iTunes as an aggregator is to sync things to my iPhone for viewing on the subway (where I don’t have network access), I decided to pare down the list quite a bit.

What I took off and instead will just watch/listen to online:
Alive in Baghdad
Rocketboom
Ask A Ninja

(and a bunch that are defunct such as Boing Boing Boing, EFF Line Noise, The Show with Ze Frank, We Are The Media, WGBH Lab Showcase, <sniff>)

What I left on for iPhone consumption (mostly audio since I typically am doing something else like email on my iPhone on the subway):
Joe Frank Radio
NPR Science Friday
On The Media
The Onion Radio News
The TV of Tomorrow Show with Tracy Swedlow
They Might Be Giants Podcast
StreamingMedia.com Podcast
TEDTalks (Video)
This American Life

I also have a bunch that I haven’t decided yet for one reason or another. Mostly they are done by friends of mine and I just love to see their updates (bandwidth and space be damned):
Tech Trek TV, pouringdown, Ryan is Hungry, momentshowing, jonnygoldstein.com

(Nothing here is new, just wanted to take note of it)

ITP Show in full swing

ITP’s end of semester show is all the rage at the moment. Been floating around playing with projects and taking some snapshots.

More soon but here is a teaser courtesy of Meredith Hasson’s Video Mosiac

And another courtesy of Nobuyuki Nakaguchi’s Breath Note

(I love the digital take home)

Iranian Video Blogging

This Iranian American Life

“This blog is for an experimental documentary that I am working on this year, where I will be shooting video of my experiences in Iran and creating shorts, interactive installations, and/or videoblogs using the footage from my experiences and the experiences of others”

Paris, a former ITP student has slowly been compiling video snippets from her visits to Iran. She is in a unique position to compare and contrast and more often show the similarities in life between Iranians and the western world.

I hope she continues.. I love watching the videos..