Author Topic: any idea about creating video from jPCT?  (Read 7634 times)

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
any idea about creating video from jPCT?
« on: May 01, 2007, 06:48:37 pm »
Hi,EgonOlsen,
    Could you give me some idea about converting the 3d game based on jPCT to a video?
    And in the new version of jPCT, does the FrameBuffer.getOutputBuffer() still return an Image?  I got a nullpointexception here, while in previous version, it works good.
    My way to generate a video is as following:
    1. get images from the framebuffer using getOutputBuffer();
    2. create a mov file from the images created.
    I think it is not a good way to create a video, could you give me some tips about this? Is there an existed way in OpenGL, Lwjgl to do such a job?
Thanks a lot.

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #1 on: May 01, 2007, 09:28:10 pm »
http://www.fraps.com/

This is a good tool for recording video (also does audio!) from any game. Should work with jPCT as well but I haven't personally tried.
Quote
Fraps is a universal Windows application that can be used with games using DirectX or OpenGL graphic technology

Offline halcor

  • byte
  • *
  • Posts: 28
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #2 on: May 02, 2007, 10:34:32 am »
Quote
I think it is not a good way to create a video
Why do you think this is not a good way to create a video? I think it's the simplest and best way, after all video is a sequence of still pictures (properly compressed, of course)...

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #3 on: May 02, 2007, 06:53:29 pm »
Because the performance is not good enough.
And you have to open an openGL window which is the source of the pics.

Offline manumoi

  • long
  • ***
  • Posts: 121
    • View Profile
    • http://www.iro.umontreal.ca/~blanchae
Re: any idea about creating video from jPCT?
« Reply #4 on: May 02, 2007, 10:17:33 pm »
Quote
http://www.fraps.com/

This is a good tool for recording video (also does audio!) from any game. Should work with jPCT as well but I haven't personally tried.

Yep it works with JPCT... I tested it with an app running AWTGLrenderer and i obtained a vidéo of the JPCT canvas (and only it). Does anyone knows a good tool for obtaining decent movie capture from the whole screen (i.e. not only the open GL part of it)

Thanks.

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #5 on: May 02, 2007, 11:39:13 pm »
Fraps works well when recording the screen, but the problem is:
1. it only records the screen, I need back-end generating the movie.
2. it seems that no compression for the movie, I am not sure about this.

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #6 on: May 02, 2007, 11:49:21 pm »
Quote from: manumoi
Does anyone knows a good tool for obtaining decent movie capture from the whole screen (i.e. not only the open GL part of it)

This is a good one that I've used many times:
http://www.techsmith.com/camtasia.asp

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #7 on: May 02, 2007, 11:54:55 pm »
does anybody has the idea about generating a movie from OpenGL 3d in BACKEND, not just recording the screen?

Offline Mr.Marbles

  • int
  • **
  • Posts: 81
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #8 on: May 02, 2007, 11:58:17 pm »
Quote from: qjvictor
1. it only records the screen, I need back-end generating the movie

Why? What will the "back-end" visually contain which is not also being displayed on the screen?

Quote from: qjvictor
2. it seems that no compression for the movie, I am not sure about this

That is correct, there is no compression for the movie and the really good reason is that there is no time to encode the movie while recording at 30+ FPS. This will cause a significant performance hit. There is a way to post-process the movie and compress it with other tools however. Here is the full FAQ from the fraps site.

Quote
Why is the AVI movie generated by Fraps so big? How can I reduce the size?

The filesize is big because there isn’t enough time to encode the movie while the game is running. The movie frames are slightly compressed, but still require a large amount of disk space due to the high resolutions. Once you have finished capturing you should convert the saved AVI into one of the popular compressed movie formats such as mpeg or divx. Recommended programs for doing this are tmpgenc (Tsunami Mpeg Encoder), and VirtualDub.

Using VirtualDub is quite easy. To create a compressed version of the AVI follow these steps:

    * Start VirtualDub
    * Select File->Open and choose the AVI in the Fraps directory you wish to compress.
    * Select Video->Compression and choose the codec you wish to compress with (usually divx)
    * Select File->Save As AVI and specify a filename for the new AVI.

If you have Windows XP you can also use Windows Movie Maker to compress the video files. If you use Windows Movie Maker it's recommended that you keep your Fraps video files at 800x600 or under.

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #9 on: May 03, 2007, 12:16:38 am »
The reason I need backend generating is that my game will be something like a TV station, it will constantly play 24X7X365. So if using backend generating, at least I needn't a monitor, and my code can be running in a more stable OS, like UNIX, Linux, to generate the movie.

And the generating process should be automatically, no manual operations like "save as..."

Offline halcor

  • byte
  • *
  • Posts: 28
    • View Profile
Re: any idea about creating video from jPCT?
« Reply #10 on: May 03, 2007, 10:34:49 am »
So then you have to find a codec that encodes video at least at real time speed on your hardware... don't know how hard this task is, you can loot at ffmpeg - it's popular free open source codec and it has java wrapper also :)