Monday, February 12, 2007

Sequential MPEGs Lead to Flashing Woes

Update: This single line of code makes the flash much briefer!

jP.setBackground(Color.black);



A small copper wire comes in the back of my house. Through that small, little copper wire comes myriad cable television channels, digital cable (and dozens of channels of digital music), broadband Internet, and my landline (which we never use and need to get rid of).

That's an amazing damned wire. One stupid wire.

This week I am trying to get an experiment ready to run. For that experiment, I need to show multiple video clips in a sequence. They're chopped up in a particular order for very particular reasons.

I would like for those clips to go together seamlessly. However, this seems impossible. The MediaLab software we use goes to a blank screen between clips, which results in a flash between clips.

I hate this flash. I have spent days trying to get rid of this flash. Finally I resorted to programming myself in Java. I spent much of the day today trying to get the code right. I'm a hack as a programmer, so I have to beg, borrow, and steal code.

Finally, at 8:30 p.m. tonight, after my kids went to bed, I got two clips to play back-to-back in Java.

And guess what?

Flash! That's what!

My laptop is new and pretty darned fast. Millions or billions of calculations per second.

Showing two MPEG clips back-to-back without a flash? Priceless, apparently.

Lest you think that I'm simply being obsessive about the flash (admittedly probable), there is a scientific reason that I hate the flash.

We study the orienting reflex, a preattentive reflex in response to novelty in the environment. Something so simple as a scene change in a television program reliable elicits an orienting reflex (see the work of Annie Lang).

So I know that a huge flash between clips will sure as heck elicit an OR.

And since I am studying cardiac response, I would strongly prefer not to artificially elicit a massive OR.

One little cable can carry as much information at the Library of Congress, but playing two clips in serial eludes modern computation.

Go figure!

Labels: , ,

1 Comments:

Anonymous Anonymous said...

Very cool, Sam. z

7:27 PM  

Post a Comment

<< Home