BRUCESHANKLE

How To Negate GLideN64 Overscan Borderings

Dec 23rd, 2023 (edited)
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. -------------------------------------------------How To Negate GLideN64 Overscan Borderings-------------------------------------------------
  2.  
  3.  
  4.  
  5. DISCLAIMER: You must set your Aspect Ratio setting to "Adjust" in your GLideN64 plugin settings for any non-4:3 resolution sizes. You can also reduce how much storage is used up on your hard drive if you lack sufficient space by changing my ffmpeg command to use a higher crf value (range is 0-51), such as -crf 20.
  6.  
  7.  
  8.  
  9. GLideN64 has a black border around its display which causes the emulator to output gameplay at slightly lower image quality. In this guide, I will be comprehensively explaining how to remove the border from gameplay recordings (most likely for N64 Tool-assisted speedruns) with a standardized native resolution. This is assuming you have already downloaded and become accustomed with Bizhawk.
  10.  
  11. First, download ffmpeg.exe by attempting to "Config and Record AVI/WAV" and instruct the use of FFmpeg to be greeted with a download prompt. After ffmpeg has downloaded to your Bizhawk folder, prepare to record your footage by examining the list of sizes that I have calculated below, and customize your resolution to the values on the right to get the values on the left. So, if you want your quality to be in 240p, you would use a 321x244 resolution, and if you wanted a 16:9 4k resolution, you would use a 3852x2189 resolution, and so forth. Keep in mind that N64 input/movie files can desync across different resolutions.
  12.  
  13. 320x240p-SD-4:3 <- 321x244
  14.  
  15. 432x240p~SD-16:9 <- 433x244
  16.  
  17. 480x368p~SD-4:3 <- 481x373
  18.  
  19. 640x368p~SD-16:9 <- 642x373
  20.  
  21. 640x480p-SD-4:3 <- 642x487
  22.  
  23. 864x480p~SD-16:9 <- 866x487
  24.  
  25. 960x720p-HD-4:3 <- 963x730
  26.  
  27. 1280x720p-HD-16:9 <- 1284x730
  28.  
  29. 1440x1088p~HD-4:3 <- 1444x1102
  30.  
  31. 1920x1088p~HD-16:9 <- 1926x1102
  32.  
  33. 1536x1152p-2K-4:3 <- 1540x1167
  34.  
  35. 2048x1152p-2K-16:9 <- 2054x1167
  36.  
  37. 1920x1440p-2K-4:3 <- 1926x1459
  38.  
  39. 2560x1440p-2K-16:9 <- 2568x1459
  40.  
  41. 2880x2160p-4K-4:3 <- 2889x2189
  42.  
  43. 3840x2160p-4K-16:9 <- 3852x2189
  44.  
  45. After setting your desired resolution, confirm that the movie syncs from start to finish if applicable. Initiate the FFmpeg writer within the A/V Writer list and choose the "AVI Lossless FFV1" codec format. Name your movie file without any spaces and then encode the video file in Bizhawk's dll folder. "Stop AVI/WAV" when you're done encoding the gameplay. Remember that you can configure "On Movie End->Pause" to keep the encode from continuing too long while it is left unattended, so that you can later stop the recording manually.
  46.  
  47. After the encode is finished, navigate to Bizhawk's dll folder and enter "cmd" in the file explorer bar. This will open up a command prompt. From here, you must type the following command according to the name of your encode and the desired resolution on the left:
  48.  
  49. ffmpeg -i GLideN64-CroppedVideo.avi -vf "crop=AXIS1:AXIS2:0:0" -c:v libx264rgb -crf 0 -pix_fmt rgb24 -preset placebo -acodec copy insert-desired-file-name-here.avi
  50.  
  51. For example, if the name of my encoded TAS was MyTAS, and I set Bizhawk's resolution to 1284x730 for the recording of my encode to ultimately get 720p in 16:9, then my command would be as follows:
  52.  
  53. ffmpeg -i MyTAS.avi -vf "crop=1280:720:0:0" -c:v libx264rgb -crf 0 -pix_fmt rgb24 -preset placebo -acodec copy asdf.avi
  54.  
  55. Here is one more example for achieving 16:9 1152p, the minimum resolution I recommend for YouTube uploads. This would assume you also encoded the TAS in 2054x1167.
  56.  
  57. ffmpeg -i MyTAS.avi -vf "crop=2048:1152:0:0" -c:v libx264rgb -crf 0 -pix_fmt rgb24 -preset placebo -acodec copy allyourbasearebelongtous.avi
  58.  
  59. After all of that, the resulting video file should be of prestigious quality with no bordering present within the frame. The oeuvre awaits your arrival at the dll folder ;). Resolutions of 1152p and beyond will result in the best-looking video quality for uploading to YouTube.
  60.  
  61. However, you can improve your quality even further by changing some of your GLideN64 settings, such as...
  62.  
  63. Aspect Ratio -> Adjust
  64. Bilinear filtering mode -> Auto
  65. Bilinear filtering mode -> ThreePoint
  66. Copy Color To RDRAM -> SyncMode
  67. Copy Depth To RDRAM -> SoftwareRender
  68. FXAA -> True
  69. HW Lighting -> True
  70. Max level of Anisotropic Filtering -> True
  71. N64 Depth Compare -> True
  72.  
  73. (Suggestions from https://tasvideos.org/EncodingGuide/VideoDumping#N64)
  74.  
  75.  
  76.  
  77. This is the end of my guide. If something doesn't work or if you have questions, please reach out to me on my discord account at bruceshankle or email me at [email protected]. I'm also on YouTube if you're interested in any of my past or future works.
  78.  
  79. Hoping this helps other preventionists out there who wish to avoid wasting frames both in the sense of time, and the frames themselves!
  80.  
  81. - Bruce Shankle IV, December 23rd 2023, GMT-05:00 19:41
Advertisement
Add Comment
Please, Sign In to add comment