Allows us to record video using multiple methods. I am trying to use the second, as it is faster than the first in regard to screen movement.
One thing that I’m having issues with is saving the files as the “preferred” method which is as a folder full of png files.
1.) (Preferred) If you supply an empty directory as the file, then the video will be saved as a sequence of .png files, one file per frame. The files start at 0000000.png and increment from there. You can then combine the frames into your preferred container/codec. If the directory is not empty, then writing video frames to it will fail, and nothing will be written.
2.) If the filename ends in “.avi” then the frames will be encoded as a RAW stream inside an AVI 1.0 container. The resulting file will be quite large and you will probably want to re-encode it to your preferred container/codec format. Be advised that some video payers cannot process AVI with a RAW stream, and that AVI 1.0 files generated by this method that exceed 2.0GB are invalid according to the AVI 1.0 spec (but many programs can still deal with them.) Thanks to Werner Randelshofer for his excellent work which made the AVI file writer option possible.
3.) Any non-directory file ending in anything other than “.avi” will be processed through Xuggle. Xuggle provides the option to use many codecs/containers, but you will have to install it on your system yourself in order to use this option. Please visit http://www.xuggle.com/ to learn how to do this.
So I’m confused exactly how we are supposed to get the png files. 1 says that if we want to get them, we just need to not specify a directory, but then it says you cannot make a file with a directory anyways? 2 talks about avi files, which is the standard given in the examples, and 3 talks about using xuggle for any other file types.
So I’m confused why the “preferred” method is mention as one thing, but isn’t shown as an example. I’m going to try downloading xuggle and see if the png works that way, but the doc isn’t really clear what we need to do…
Edit with Solution: Okay, for some reason I read #1 wrong, and basically thought that in the "CreateTempFile creation there is a 3rd parameter called “Directory” so I thought it was talking about that. I realized that it just wants a normal File = new File (“directory”); and then it will work.
Figured I would keep this post up, just in case someone else fell into this issue… However, doing it frame by frame is much much slower, and I highly recommend NOT using it. I’m going to work with the AVI now, my “short” video is apparently 4.46 gigs big after not much time, and crashed as being “bigger than 4 gigs” so I’m going to port it to Premeir Pro and see if I can work it, because WMP couldn’t open the file :(.
Edit 2: So Premier Pro says the file is “Damaged or Unsupported,” so I will have to see about fixing this issue… I will try to make a shorter video, but my video can’t be any longer than 30 seconds…
Edit 3: So smaller sizes work, but they are super short 6-10 seconds.