Which video exporting methods have best quality?

#1

Hi, I am trying to add some frames that I created via Processing in a video clib. But when I try to record the sketch by using the code saveframes and video maker the video quality is so bed. Which way do you think is the best way to make a movie in processing?

0 Likes

#2

Try VideoExport by Hamoid.

Kf

0 Likes

#3

Hello I tried this but it did not work (I installed ffg codec as well, win 10). Are there other alternative methods?

0 Likes

#4

Hi! What didn’t work? It would be nice to know how it failed, maybe there’s something I can fix.

Did you install ffmpeg? No need to install codecs afaik.

0 Likes

#5

Hi, Hamoid (you are Abe Pazos right?). Yes I installed ffmpeg (ffmpeg-20190323-5252d59-win64-static). I start your example, “basic” and I get this error message;

java.io.IOException: Cannot run program “C:\Users\diabo\Downloads\basic\ffmpeg.txt”: CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.hamoid.VideoExport.startFfmpeg(Unknown Source)
at com.hamoid.VideoExport.initialize(Unknown Source)
at com.hamoid.VideoExport.startMovie(Unknown Source)
at basic.setup(basic.java:37)
at processing.core.PApplet.handleDraw(PApplet.java:2401)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1557)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 7 more

VideoExport error: Ffmpeg failed. Study C:\Users\diabo\Documents\Processing\libraries\VideoExport\examples\basic\ffmpeg.txt for more details.

Could not run the sketch (Target VM failed to initialize).
Make sure that you haven’t set the maximum available memory too high.
For more information, read revisions.txt and Help ? Troubleshooting.

0 Likes

#6

It seems like it’s trying to execute a text file (ffmpeg.txt) as a program. My guess: maybe the library asked you to point at the ffmpeg.exe file (a program) but you selected ffmpeg.txt (a text file) so it fails to run?

If that’s the case, you could delete the file settings.json that should be located in the libraries/VideoExport/ folder inside your sketchbook and it will ask again for the location of ffmpeg.exe.

I will update the library to detect such issues.

0 Likes

#7

Yes you were right, this time I chose the right file and i get the movie file, thanks.

But I had to try a new video export method for this reason.

My laptops res. is something like 1366-768.
I need to export a 1920, 1080 p3d sketch
when i try to saveframe it cuts up and right side of the frames. So I have a 1920-1080 picture which has two black sides (up and right).

I can get full picture when i add nothing into size paramaters like size(1920,1080);
if i add p2d or p3d i get black sides. (one of p3d file worked btw (i had full picture).

Your library worked very good but I get black sides again. Is this problem familiar to you?

0 Likes

#8

Good that it worked :slight_smile:

I haven’t experienced the black borders issue. So you mean that your Processing window is 1920x1080, which is larger than your screen? And then you get black borders in the video?

One thing I would try is rendering to a PGraphics. This PGraphics can be any size, smaller or larger than the Processing window. And you can save that to the video. There’s an example called usingPGraphics. But that means making changes to your program, and if it’s a very complex program it may be a bit of effort.

But it is a useful approach, because you can render larger than the screen, and then show a scaled down version on your main window. Or even a thumbnail. I do this sometimes. For example, working on a 4096x4096 canvas, and I have implemented panning and zooming, so I can paint on this large surface and just see part of it on the main window.

0 Likes

#9

Thank you hammoid, I will try PGraphics. My programs not so complicated so it is worth to try i guess. Thanks a lot again.

0 Likes