These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:21 pm Advanced search

rendering images as a movie

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

rendering images as a movie

Postby davuluri » Tue Oct 12, 2010 6:13 pm

Hello Everyone,

My task is to get the video data from the network, decode and rendering.
For this i have created an ATL activex, and i am doing all these in the activex. And i am using this Activex in the browser (Till now i used IE only), by using JScript. Everything is working fine in IE.

So, now i am planning to use the HTML5's renderer functionality in my application(I am feel free to use any browser,ie, firefox, chrom, or opera).

What i mean was, i just want to do network data reading and decoding in the activex. And i want to render this decoded data(Pixel image data) in HTML5(using Canvas and JScript functionality.).

So, Is it possible to do it(using HTML5 and JScript)??

So, how can i pass this data to HTML5/Canvas?

Please let me know.

Thanks in advance.
Davuluri.
davuluri
<h6>
 
Posts: 3
Joined: Tue Oct 12, 2010 4:30 pm

Postby zcorpan » Wed Oct 13, 2010 4:43 pm

I don't really follow. What are you serving over the network? A video stream? Is it in a format that browsers support decoding themselves in <video>?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby davuluri » Thu Oct 14, 2010 4:46 pm

Dear zcorpan,

Thanks for the reply.

Yes..actually its a video stream but its not a standard format. It is our own proprietary format. Thats why i need to decode it my self and send this to the renderer.

Thanks,
Davuluri.
davuluri
<h6>
 
Posts: 3
Joined: Tue Oct 12, 2010 4:30 pm

Postby zcorpan » Thu Oct 14, 2010 7:54 pm

Can't you convert it to a webm and/or mp4 before sending it over the wire? Why are you using a proprietary format?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby davuluri » Thu Oct 14, 2010 9:06 pm

Proprietary format is to get the excellent quality and low latency.
Right now what i am doing was , i am decoding every frame to yuv, and displaying these by using DIBDRAWDIB library.
So, at least Can i send these yuv data to the canvas??
davuluri
<h6>
 
Posts: 3
Joined: Tue Oct 12, 2010 4:30 pm

Postby zcorpan » Fri Oct 15, 2010 7:52 am

Once you've decoded a frame and converted it to pixel data (using an ImageData object) you can use context.drawImage(imagedata, 0, 0). That's the easy part, the harder part is actually sending the stream over the wire in a good way. Ideally you would send it as binary data (using a Stream object) over a WebSocket, but that's not supported in the spec yet. So you would have to convert it to a UTF-8 string first (e.g. by base64-encoding or using your own scheme to take advantage of the high bit for each character). Moreover since WebSockets is message-based you'd have to chunk the stream into smaller messages. So if you want to do it today it's going to be a bit hacky, and I'm not convinced the result is going to be better than a supported video format in <video> even if your format is theoretically superior.

What surprises me is that you say your proprietary format has better quality than webm and mp4. Does it really? Maybe you should join the webm team to help improve the experimental "webm.next" branch format? :)
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests