daipenger / minema

A Minecraft mod for offline rendering and video capturing.
The Unlicense
108 stars 15 forks source link

Capturing depth buffer not compatible with 2x render quality in Optifine #12

Open BenYangOvO opened 4 years ago

BenYangOvO commented 4 years ago

When 2x render quality is enabled, the depth footage will only displays the bottom left quarter of the screen. Also, when recording videos, the FXAA filter in Optifine will be invalid.

daipenger commented 4 years ago

Render res and FXAA from Optifine has never worked in combination with Minema and I never bothered to do much debugging with that, because it could break again any time in the future.

You have several alternatives, however:

  1. You can double the frame width and frame height in the minema settings. That's a tested, built in feature of Minema and effectively 2x render res. You will, however, also get a video file with double the width and height, but if that works for your workflow, perfect.

  2. Double the frame width and frame height, but tell FFMpeg to scale down the video file. So, for example, if you want to record a 1080p video file with 2x render res, set frame width and frame height to 4K and then adjust your encoder arguments to look like this: "-f rawvideo -pix_fmt bgr24 -s %WIDTH%x%HEIGHT% -r %FPS% -i - -vf vflip -c:v libx264 -preset ultrafast -tune zerolatency -qp 18 -pix_fmt yuv420p -s 1920x1080 %NAME%.mp4" Notice the "-s 1920x1080" at the end. That tells FFMpeg that the output should have that resolution. "-s %WIDTH%x%HEIGHT%" is the resolution of the input and Minema fills that in automatically.