Hacker News new | ask | show | jobs
by userbinator 4254 days ago
base64 encoded JPEGs

MJPEG is supported in all browsers I know of, and would cut down on bandwidth by 33% over base64.

(If you really want to use WebSockets, a more dense encoding than base64 could also help - look into base85, for example.)

1 comments

MJPEG is good, but keep in mind that Chrome doesn't support playback of MJPEG streams as a main resource, it has to be in an <img> tag.
Looks like that functionality used to be there, was broken, fixed, and then broken again sometime later. The latest bug for it appears to be https://code.google.com/p/chromium/issues/detail?id=308999

For this application you'd need it to be in an <img> tag anyway since there's the other stuff on the page too, so that's a moot point.

Not only <img>. The MJPEG stream could theoretically be embedded in an <iframe>, thus being affected by this bug.