PNG frame record please

  • Videogamer555
    30th Sep 2012 Member 0 Permalink
    Awesome you finally got a way to document every frame (press R to start recording), but it's fixed at raw/uncompressed PPM image file (every pixel is explicitly saved). However if you had it save as PNG instead, then harddrive space could be saved. If access to raw data pixel is needed for all frames for a person's graphics project, you can just XnView to batch convert PNG to PPM. But saving as PNG would be preferable to save HDD space. In fact, maybe a image format selection dialog box could be used to select between PNG and PPM. Also it needs to be reset. So it automatically checks for the last saved frame by checking file names in the folder, and if there are no frames yet saved, it should ALWAYS start at frame 0. Currently, it works by remembering the last frame saved, even after the frames in the folder have been deleted. The only way to reset the frame counter is to close the program and start it over again. This is VERY tedious!
  • Pilihp64
    30th Sep 2012 Developer 0 Permalink

    PPM recording has actually been in the source since very early versions for the 'r' key.  It was only disabled for release.  PNG takes a lot more time to process and I assume this is why PNG recording is not used.  You could still make a Lua script call the screenshot function for PNG every frame and do it yourself.

  • Videogamer555
    30th Sep 2012 Member 0 Permalink
    What about replacing PPM with BMP for raw video frames instead, or at least include a "file format" selector in the option menu for saving as BMP or PNG or PPM. As BMP saves images in an uncompressed format, it is very fast to write, just like PPM, but unlike PPM, BMP is actually compatible with most available graphics software. I mean most software I know of handles BMP, but most have no clue what a PPM file is, and so have no way of handling it. This includes Virtual Dub, the best free software I know of that can directly convert a series of image files to an AVI video file. Virtual dub is incapable of loading PPM files, but works wonders with BMP files.
  • boxmein
    30th Sep 2012 Former Staff 0 Permalink
    @Videogamer555 (View Post)
    You can use FFmpeg to quickly stitch together frames of PPM, this might be why.
  • Videogamer555
    30th Sep 2012 Member 0 Permalink
    Still we need a "recorded file format" selector in the option menu for saving recorded frames as BMP or PNG or PPM.
    and it would also be a good idea to have a "screenshot file format" for the still shot (screencap) saving method too, that would allow the end user to select the screencap format of BMP, PNG, or PPM. One thing I don't like about software that makes a choice of format for me, is that it denies me the choice of being able to decide what save format that I want to use. Fileformat selectors are always present in any decently written software. Only poorly written software tends to used fixed constants for things like file format, and limited options for the end user.
  • Ximon
    30th Sep 2012 Administrator 1 Permalink
    @Videogamer555 (View Post)
    It isn't as simple as telling the software "oh, save this as JPEG", the format has to be implemented, most pieces of software will use functions from the Operating System (not possible in our case to maintain compatibility on Windows, Linux and Mac OS), or another software library (such as libjpeg) that will either add to executable size or have extra .DLL files. PNG is only supported because someone wrote an encoder for PNG (https://github.com/FacialTurd/PowderToypp/blob/master/src/Format.cpp). And as cracker64 mentioned, PNG is far too slow to use for encoding video.
  • Videogamer555
    30th Sep 2012 Member 0 Permalink
    What about BMP?

    Actually there are some free library you can use that among other things, have the capability of saving in any selected image format (so the library literally has built in encoders for a wide range of graphics formats). One library with that capability is called GflSDK, and it is free. Read about the features here http://www.xnview.com/en/features_gfl.html and download it here http://download.xnview.com/GflSDK-win.zip


    Also PNG will slow the simulation, but lots of stuff slow it anyway (like lots of particles), so the speed loss won't be that great.