play motion-JPEG video using javascript (in browser, no plugins, minimal JS)

Motion JPEG test

play motion-JPEG video using javascript (in browser, no plugins, minimal JS)

click a button above to begin!
Huh?

This extracts the JPEG frames, likely without the huffman compression tables (though chrome dont care 8-), found within the .avi bytestream, and then base64 encodes them so they can be easily inserted into a dynamic <img> tag.

Add in a short display timeout and keep overlaying images, and you have your "video", using <img> tags, like a flip book.

WORKS: [ chrome: yes ][ firefox: was yes but now not 8-( ][ safari/iOS: no ][ IE: i bet not ]


Originally created 2006 by Tracey Jaquith. minor updates to jQuery and simplifying 2013

Source (or "View Source"):

About tracey pooh

i like digital video and road cycling
This entry was posted in coding, video and tagged , , , , . Bookmark the permalink.

2 Responses to play motion-JPEG video using javascript (in browser, no plugins, minimal JS)

  1. SaschaNaz says:

    This absolutely helped me. I ported it with standard ArrayBuffer object and it works on IE11. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>