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?
Does someone here have the means to do it?
Dump PNGs from canvas to disc and use virtualdub/avidemux to combine them?
Definitely something to test out, but that'd require to most work as well.
It'll work on your next demo too...
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.
And yes, it's reusable, like rär said.
@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...
Hmm, didn't think about that :) Something to try. Thanks!
rare: Probably because it's a one-off job, and it takes a few lines more than Texture2D.ToFile()...?
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.
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.
The problem with the PNG approach is that you can not write to disc...
Writing to disc with FF. Might work.
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);
?>
"...without using a webserver." is what I meant :)
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.
@gasman: thanks, that'll do the trick, I think!
It works nicely. Now I'll just have to figure out some colorspace conversion poop and find a machine with 1080p :). Thanks again.
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?!
@Lord Graga: to verify that the cap looks nice, no other reason ;P
Here it is: http://youtu.be/yWseM5_u6Pk?hd=1