pouët.net

Could somebody capture our WebGL demo?

category: offtopic [glöplog]
 
I'd like to have a high quality 60fps 1080p capture of our Stream8 WebGL demo, but I have do idea how to accomplish this without some serious hardware that I don't have.

Does someone here have the means to do it?
added on the 2011-05-24 11:18:20 by visy visy
Dump PNGs from canvas to disc and use virtualdub/avidemux to combine them?
added on the 2011-05-24 11:20:33 by raer raer
Definitely something to test out, but that'd require to most work as well.
added on the 2011-05-24 11:23:37 by visy visy
It'll work on your next demo too...
added on the 2011-05-24 11:25:14 by raer raer
mortzERR did that for the last Outracks prod, since it was .NET. Didn't take more than a couple hours to get everything working and tested; captured overnight and it was good to go. I think that's definitely your best option here, too, as you'll have the raw frames dumped already and you can try a multitude of video encodings without recapping.
added on the 2011-05-24 11:38:27 by ferris ferris
And yes, it's reusable, like rär said.
added on the 2011-05-24 11:39:17 by ferris ferris
@ferris: If you have .NET, why not write code to dump frames to an AVI container (e.g. using the lossless HuffyUV codec) and then re-encode. Is probably much faster and saves you time when encoding to different video formats...
added on the 2011-05-24 11:47:03 by raer raer
Hmm, didn't think about that :) Something to try. Thanks!
added on the 2011-05-24 11:49:01 by ferris ferris
rare: Probably because it's a one-off job, and it takes a few lines more than Texture2D.ToFile()...?
added on the 2011-05-24 11:51:53 by kusma kusma
If you do go down the PNG-dumping route, take a look at PhantomJS (although I don't know if it supports WebGL yet, so taking a look may just consist of trying a test page and going "oh, it doesn't, so screw that").

I've played around with it briefly, and there's something undefinably voodoo-magic about being able to fire up the complete Webkit stack on the command line... which got me seriously thinking about a kkapture-alike tool that works by redefining setTimeout and friends. Probably one for the "cool project ideas I'm never going to get round to doing" pile though.
added on the 2011-05-24 12:01:41 by gasman gasman
The problem with the PNG approach is that you can not write to disc...
added on the 2011-05-24 12:10:03 by raer raer
added on the 2011-05-24 12:15:47 by raer raer
Quote:
The problem with the PNG approach is that you can not write to disc...


You can with phantomjs, which is why I mentioned it :-)

...of course, you can also go the roundabout route of having a PHP script on a local webserver that your JS posts to. Which reminds me that I have 8000 PNGs of Antisocial sitting around on my HD where I did exactly that, which I really ought to do something with. Here, have some code:

Code: var imageData = screenCanvas.toDataURL(); $.post('http://127.0.0.1/~gasman/canvascapture/index.php', {frame: this.captureTime, data: imageData});


index.php
Code:<?php $data = substr($_POST['data'], 22); $png = base64_decode($data); $filename = str_pad($_POST['frame'], 10, '0', STR_PAD_LEFT); $handle = fopen('/Users/gasman/Sites/canvascapture/frames/' . $filename . '.png', 'wb'); fwrite($handle, $png); fclose($handle); ?>
added on the 2011-05-24 12:26:47 by gasman gasman
"...without using a webserver." is what I meant :)
added on the 2011-05-24 12:28:43 by raer raer
memo to self: before going to next demo party, ensure that laptop doesn't have a PHP script on it with blatant arbitrary-file-writing security hole that I've just advertised on Pouet.
added on the 2011-05-24 12:50:56 by gasman gasman
@gasman: thanks, that'll do the trick, I think!
added on the 2011-05-24 12:51:49 by visy visy
It works nicely. Now I'll just have to figure out some colorspace conversion poop and find a machine with 1080p :). Thanks again.
added on the 2011-05-24 14:02:14 by visy visy
Why find a machine with 1080p? Just force the canvas to 1080p and grab it.
gasman: either that, or turn it into an unofficial compo: who can fill your drive with the most clown porn before it runs full?!
added on the 2011-05-24 14:54:43 by kusma kusma
@Lord Graga: to verify that the cap looks nice, no other reason ;P
added on the 2011-05-24 15:00:17 by visy visy
Here it is: http://youtu.be/yWseM5_u6Pk?hd=1
added on the 2011-05-24 18:01:28 by visy visy

login