| View previous topic :: View next topic |
| Author |
Message |
Ghoti
Joined: 31 Dec 2005 Posts: 288
|
Posted: Tue Jan 16, 2007 8:55 pm Post subject: capturing video |
|
|
Hi folks,
I was wondering how i can record ingame footage. I have heard of a plugin for devhook but since i myself have no devhook running i was hoping that there was also an other way. I have dark alex's custom firmware running though.
hope someone can fill me in,
grewets ghoti _________________ My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php |
|
| Back to top |
|
 |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Tue Jan 16, 2007 9:26 pm Post subject: |
|
|
Look on dl.qj.net for SVCapture 0.5.
It can capture screenshots and GIF 'videos'. |
|
| Back to top |
|
 |
Ghoti
Joined: 31 Dec 2005 Posts: 288
|
|
| Back to top |
|
 |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Tue Jan 16, 2007 10:50 pm Post subject: |
|
|
| Did you create the file called game.txt and put the path to SVcapture.. then boot into recovery mode of OE and enable the plugin for 'in-game' use ? |
|
| Back to top |
|
 |
Ghoti
Joined: 31 Dec 2005 Posts: 288
|
Posted: Tue Jan 16, 2007 10:58 pm Post subject: |
|
|
i have created the game.txt file in that i have entered this line:
ms0:/seplugins/capture.prx
howeve i use the 3.02 firmware of dark alex and not the 2.71c.
i Have not put the path to svcapture? how do i do that?
i have enabled the plugin both for vhs and for game and i can record and take screenshots in the xmb but in the homebrew it did not work :( _________________ My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php |
|
| Back to top |
|
 |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Tue Jan 16, 2007 11:12 pm Post subject: |
|
|
| It could be that the homebrew you're using is overriding the button calls for SVCapture. Can't see any reason why it wouldn't work. |
|
| Back to top |
|
 |
Ghoti
Joined: 31 Dec 2005 Posts: 288
|
|
| Back to top |
|
 |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Tue Jan 16, 2007 11:24 pm Post subject: |
|
|
| Well if it's your own homebrew you could quite easily add a screenshot function to it. I have in all my homebrew directly after the rendering stage, if a screenshot has been initiated it writes the buffer to a file.. |
|
| Back to top |
|
 |
Ghoti
Joined: 31 Dec 2005 Posts: 288
|
Posted: Tue Jan 16, 2007 11:31 pm Post subject: |
|
|
Yes i guess i will do that but my screen shot code is very slow...
| Code: | // -----------------------------------------
//
// GameTakeScreenShot
//
// -----------------------------------------
int GameTakeScreenShot(void){
saveImage("ms0:/ss.png", getVramDisplayBuffer(), 480, 272, PSP_LINE_SIZE, 0);
return 0;
} |
and the saveimage code (from the graphics.c file form the yelarb tutorials.)
| Code: | void saveImage(const char* filename, Color* data, int width, int height, int lineSize, int saveAlpha)
{
png_structp png_ptr;
png_infop info_ptr;
FILE* fp;
int i, x, y;
u8* line;
if ((fp = fopen(filename, "wb")) == NULL) return;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!png_ptr) return;
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
return;
}
png_init_io(png_ptr, fp);
png_set_IHDR(png_ptr, info_ptr, width, height, 8,
saveAlpha ? PNG_COLOR_TYPE_RGBA : PNG_COLOR_TYPE_RGB,
PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
png_write_info(png_ptr, info_ptr);
line = (u8*) malloc(width * (saveAlpha ? 4 : 3));
for (y = 0; y < height; y++) {
for (i = 0, x = 0; x < width; x++) {
Color color = data[x + y * lineSize];
u8 r = color & 0xff;
u8 g = (color >> 8) & 0xff;
u8 b = (color >> 16) & 0xff;
u8 a = saveAlpha ? (color >> 24) & 0xff : 0xff;
line[i++] = r;
line[i++] = g;
line[i++] = b;
if (saveAlpha) line[i++] = a;
}
png_write_row(png_ptr, line);
}
free(line);
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
fclose(fp);
} |
_________________ My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php |
|
| Back to top |
|
 |
Bytrix
Joined: 14 Sep 2005 Posts: 72 Location: England
|
Posted: Tue Jan 16, 2007 11:39 pm Post subject: |
|
|
I'm not sure how much it'll affect the speed but I save my screenshots basically as a raw dump of the screen in BMP/RAW format. It's the fastest way I've seen to do it (although does mean there is more data to write and screenshot sizes are larger.
SVCapture by default records at half screen resolution I think. Currently I don't think there is a real way to capture full screen video.
So far All I've done is screenshots in my apps, I've not implemented video but by reducing the size (by skipping every other pixel, then skipping every other row) you should be able to get decent speed video. (I know it's not the best method of interpolation just skipping pixels, but properly resampling the image down would probably take longer than it does just to capture the full screen image. |
|
| Back to top |
|
 |
|