Friday, April 6th, 2007

JSMP: JavaScript Media Player

Category: JavaScript, Showcase

Azer Koculu has created JSMP, a JavaScript media player.

It has an interesting effect.

JSMP

Posted by Dion Almaer at 9:52 am
25 Comments

+++--
3.4 rating from 65 votes

25 Comments »

Comments feed TrackBack URI

i don’t get it?

Comment by Liming Xu — April 6, 2007

i don’t get it eather

Comment by Gudbergur — April 6, 2007

I think it is awesome

Comment by craig — April 6, 2007

1) How’d he do it?

2) JavaScript has been used in similar contexts before:

http://solar.physics.montana.edu/YPOP/Intermission/Images/feb98eclipse_event1_j.html

However, that’s all a bunch of sequentially-shot JPEGs, while this is a whole AVI that we’re talking about.

Now throw a Theora vid in there, and license it under a F/OSS license, and this could become Wikipedia’s standard display for video files.

Comment by Rayne Van-Dunem — April 6, 2007

That is an impractical joke, you chop a movie into frames, and save each frame into a separate file and and download all images one by one. Genius!

I prefer this which was already posted on Ajaxian:
http://www.themorningoutline.com/sample/AJAXtream.html

Comment by Bob — April 6, 2007

@Rayne Van-Dunem: This isn’t a AVI. In fact, it’s no different to what you just described. It downloads the frames one by one in JPEG format by adding a tag to the document with “display: none”. I am not very impressed with this as it’s slow and unfeasible.

Comment by Andy — April 6, 2007

hi bob&rayne van, thanks for your interest. but isn’t your post cruel ?
yes, the process is true (like you said in your post) i try play the .avi files that splitted into frames on server. but because of my hosting problems i didn’t do the splitting process on server.

and you are right for file handling. when i get a server that can play ffmpeg, jsmp will only need to enter the number of frames to play the any video.and if ie supported base64 i think it would be more usable..

good day, sorry for bad english

Comment by azer koculu — April 6, 2007

Azer, don’t worry about the haters. Sometimes Ajaxians can be a little critical. It’s definitely a cool proof of concept.

Comment by Michael — April 6, 2007

It downloads the frames one by one in JPEG format

Isn’t that more or less how Flash video was started? I seem to remember reading that that was the case.

This probably isn’t the end of the line for this kind of development.

Comment by Trevor — April 6, 2007

Don’t you think Wikipedia would need audio as well, maybe closed captioning support, etc? This is nice proof of concept, but I don’t see it becoming any sort of a ‘standard’

Comment by hmm — April 6, 2007

This is far better than any of the mentioned.
http://www.xindesk.com/jtemplate

Comment by mikael bergkvist — April 6, 2007

rriight.. well there are enthusiasts that make 3d rendering in javascript too..

Comment by Artjom Kurapov — April 6, 2007

On a side note, this may very well be the shortest-ever Ajaxian write-up. Even for a Friday. ;)

I wonder if instead of using a separate JPG for each frame, these could be combined into larger “tiles” of frames, or perhaps a single monolithic image containing all frames (either as a “filmstrip” in one direction, or a grid.) # of connections vs. file size would be the presumed trade-off, but presentation would simply be repositioning a single background image.

Comment by Scott Schiller — April 6, 2007

Ajaxian will eventually publish ANY JavaScript code that has been written throughout the history.

Comment by Rose — April 7, 2007

Very clever, I like it.

Comment by Richard Kimber — April 7, 2007

@Azer,
you will always find people that spend their time criticizing other projects. Just don´t mind. And thumbs up from me. If nobody worked on problems no problems would be solved.
Frank

Comment by Frank Thuerigen — April 7, 2007

@everyone who had something negative to say:

I don’t understand why in your minds anything good comes out of all these negative comments directed at developers who have ideas different than yours.

It is absolutely retarded to do things like this. By hazing developers in this manner it reminds me very much of when I was in elementary school.

“OH HAHAHHA JIMMY ASKED A QUESTION! ”

“HAHAHHA! POINT AND LAUGH AT JIMMY, HE IS STUPID! WHO THINKS OF THINGS LIKE THAT?!”

Well, my little first graders. Let me tell you this, if people never thought of things outside the collective norm, then nothing innovative will ever come to be. It is things like this, whether they are useful or not that inspire. You may think it is stupid, but some guy across the planet might not–he might think its pretty fricken cool, and it just might give him an idea that causes big things to happen.

I’m not saying that this will do that. But what I am saying is that you are ignorant.

Comment by Pissing_Contest_Man — April 7, 2007

Had the title been JavaScript sequential image display there would have been a lot less haters. This isn’t a media player. When it can play .AVI (or any other “movie” file format) then I’ll look at it. I was doing this kind of stuff in the 90s when I was learning JavaScript.

Comment by Mr. Muskrat — April 7, 2007

It might be an interesting idea to create a framework as fallback for older browsers not supporting the forthcoming APNG standard. A server-side PHP-Script could split an APNG into single PNGs and a JavaScript in the web page could render these images as animation.

Comment by AndiSkater — April 7, 2007

Brilliant idea. However, I do believe that generally video compression that can not utilize information across frames (as is the problem with individual jpegs) is fundamentally a seriously limiting problem for quality video.
Kris

Comment by Kris Zyp — April 7, 2007

Azer,
it’s a very cool looking player, congratulations. And don’t worry about the negative comments.

Comment by Cagan Senturk — April 8, 2007

@Pissing_Contest_Man, It’s not that we disapprove of the script. It’s just that it has alot of room for improvement. For example, if it downloaded a jointed file that was cleverly engineered to reduce filesize instead of downloading the frames one-by-one in JPEG format, this would be a great advancement. And as for your comment about negative critisism being “retarded”, I’d have to disagree. Critisism, negative or not, is an important part of product evolution. Weither if you like it or not. I find it perfectly natural and reasonable for people to show what they like and don’t like.

Comment by Andy — April 8, 2007

nice post.

Comment by Sue — May 10, 2007

Comment by Liming Xu — April 6, 2007

i don’t get it eather
Comment by Gudbergur — April 6, 2007

I think it is awesome
Comment by craig — April 6, 2007

1) How’d he do it?

2) JavaScript has been used in similar contexts before:

http://solar.physics.montana.edu/YPOP/Intermission/Images/feb98eclipse_event1_j.html

However, that’s all a bunch of sequentially-shot JPEGs, while this is a whole AVI that we’re talking about.

Now throw a Theora vid in there, and license it under a F/OSS license, and this could become Wikipedia’s standard display for video files.
Comment by Rayne Van-Dunem — April 6, 2007

That is an impractical joke, you chop a movie into frames, and save each frame into a separate file and and download all images one by one. Genius!

I prefer this which was already posted on Ajaxian:
http://www.themorningoutline.com/sample/AJAXtream.html
Comment by Bob — April 6, 2007

@Rayne Van-Dunem: This isn’t a AVI. In fact, it’s no different to what you just described. It downloads the frames one by one in JPEG format by adding a tag to the document with “display: none”. I am not very impressed with this as it’s slow and unfeasible.
Comment by Andy — April 6, 2007

hi bob&rayne van, thanks for your interest. but isn’t your post cruel ?
yes, the process is true (like you said in your post) i try play the .avi files that splitted into frames on server. but because of my hosting problems i didn’t do the splitting process on server.

and you are right for file handling. when i get a server that can play ffmpeg, jsmp will only need to enter the number of frames to play the any video.and if ie supported base64 i think it would be more usable..

good day, sorry for bad english
Comment by azer koculu — April 6, 2007

Azer, don’t worry about the haters. Sometimes Ajaxians can be a little critical. It’s definitely a cool proof of concept.
Comment by Michael — April 6, 2007

It downloads the frames one by one in JPEG format
Isn’t that more or less how Flash video was started? I seem to remember reading that that was the case.

This probably isn’t the end of the line for this kind of development.

Comment by suyog kale — May 11, 2007

This is a very interesting piece of code. I wonder it is possible to do something with audio, WAV or mp3.

Comment by raf — October 6, 2007

Leave a comment

You must be logged in to post a comment.