Hi Shannon,

I had a quick look into adapting my classes with our custom protocol to using MJPEG streams instead. Looks relatively easy and I've got an Axis cam floating around the office that I can use for testing. I'll get a sample together over this weekend.

heres a php script that grabs a single frame:
http://www.lavrsen.dk/twiki/bin/view/Motion/MjpegFrameGrabPHP

Pretty much all I would do is buffer the socket data until there were two instances of the boundary string then extract the bit in between and use a Loader instance to display the jpeg.

>From the little research I did into mjpeg it looks like the boundary string may be different between webcams and the jpegs may by missing some of the normal jpeg header information. If so it can be stored in the app or generated and prepended to the bytes you extract out of the stream.

Cheers
Andrew


Shannon Hicks wrote:
Any luck pulling up that code sample? :)
 
Shan


From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Bourne
Sent: Thursday, October 12, 2006 6:18 PM
To: [email protected]
Subject: [Junk E-Mail - LOW] Re: [Junk E-Mail - LOW] Re: [flexcoders] Re: JPEGEncoder.as

Hi Shannon,

I currently do almost exactly what you are after. I have a socket class that I use to stream the binary data which I then split into the image packets and then decode the jpegs via the Loader.loadBytes method. We use a custom protocol with normal jpegs as the data, so for mjpeg you would probably need to write a decoder to split the mjpeg stream into the single jpeg frames and then use the Loader to decode them.

HTH,
Andrew


Shannon Hicks wrote:

Hey, I'm interested in trying to build out something (in flex 2) that can accept an MJpeg stream. Basically, it's a stream of one jpg image after another. This would be useful to potentially a bunch of people who want to show their network webcams via Flash/Flex2.
 
Anyone a tad more experienced interested in helping me with this?
 
Shan


From: [EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Rich Tretola
Sent: Thursday, October 12, 2006 11:51 AM
To: [EMAIL PROTECTED]ups.com
Subject: [Junk E-Mail - LOW] Re: [flexcoders] Re: JPEGEncoder.as

The ones at the Adobe lab from the link Darron provided work fine without any changes.

Rich
http://www.everythingflex.com


On 10/12/06, Andrew Trice <andrew.trice@cynergysystems.com> wrote:
The files are old, but they still work.  I had to modify JPGEncoder.as so that it would build correctly in Flex 2 release version.  I'd attach it to this post, but I don't have the source on this computer.
 
I'm not aware of any decoders.  You could always try to use a loader object to load the ByteArray using the loadBytes method, and then copy the bitmapData from it. Or you could look at the JPGEncoder class and reverse engineer it. 
 
-Andy
 


From: [EMAIL PROTECTED]ups.com on behalf of nathanpdaniel
Sent: Thu 10/12/2006 12:57 AM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Re: JPEGEncoder.as

I see these are image ENcoders, are there any image DEcoders
available?

--- In [EMAIL PROTECTED]ups.com, "Rich Tretola" <[EMAIL PROTECTED]>
wrote:
>
> Thanks Darron,
>
> I had downloaded them from
> http://labs.adobe.com/wiki/index.php/Source:getearlier but they were
> very old files.
>
> Rich
>
> On 10/11/06, Darron J. Schall <[EMAIL PROTECTED]> wrote:
> >
> > They're in the Adoeb Labs SVN:
> >
> >
> >
http://labs.adobe.com/svn/flashplatform/?/projects/corelib/trunk/src/a
ctionscript3/com/adobe/images/
> >
> > -d
> >
> > Rich Tretola wrote:
> >
> > Anyone have a new copy of JPEGEncoder.as?
> >
> > Rich*
> > *
> >
> >
> >
> >
>
>
>
> --
> Rich Tretola
> <mx:EverythingFlex/>
> http://www.EverythingFlex.com
>




--
Rich Tretola
<mx:EverythingFlex/>
http://www.EverythingFlex.com

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.2/472 - Release Date: 10/11/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.2/472 - Release Date: 10/11/2006



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.2/472 - Release Date: 10/11/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date: 10/14/2006


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to