Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: August 4, 2021, 7:58 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capturing SNES video
#1
Capturing SNES video




You guys probably don't care about this (and yes in an ideal world I'd post this on a more relevant forum), but somebody (who wants to record their SNES though their capture card) might find this useful.

I know you may be wondering, why go to the trouble? why not just use the emulator for videos - if you're a lazy then yes you'll want to use the emulator. Heck knows how many youtube users literally film their TV sets because they can't even use capture cards. The video above shows that the quality holds its own against the Z-SNES, for best results view the full 480p version of the video.

So what I've set about doing is finding the right way to capture the video from the SNES using its inbuilt S-Video out (from the multi-out). I'm using S-VIDEO, but the SNES itself is capable of RGB out and even component with little modification. The video processor in the SNES is much higher quality than what was in the MegaDrive/Genesis consoles. This makes the SNES attractive for capturing video, even though you could use emulators and get a 100% clean picture.

I've worked on capturing my SNES video through s-video. Regardless of whether the SNES is in PAL or in NTSC mode the resolution of the game is 256x224 (with some rare exceptions to this) either at 60fps or 50fps. For the remainder of this discussion I'll be assuming NTSC mode, but it makes little difference.

The SNES does not resize the picture vertically, instead it adds a border of 8 pixels to the top and bottom, typically this will be hidden by overscan. Thus the full frame size is 720 x 240 @ 60p. The actual picture size is 644 x 224 and it looks like this:

[Image: dkcsnes.jpg]

Ouch! Is that ever stretched! Let's have a look at what it's supposed to look like from Z-SNES:

[Image: dkczsnes.jpg]

What we want to try and do is reconstruct the 256x224 image as best we can, and then we can resize it ourselves to whatever we want (like 612 x 480). We can't do it perfectly of course, since the image has been horizontally stretched, but it turns out with just a simple resizing we can come pretty damn close.

Now, I have my capture program set to automatically crop the video to size (644 x 448 video frames x 30i). From there it's a simple matter in avisynth to resize it to 256 x 224. First we'll need to separate the fields and put them in the correct order using SeparateFields() and interleave(selectodd(),selecteven()). Then we'll use PointResize and LimitedSharpen like this:
Code:
ConvertToRGB()
Stackhorizontal(crop(2,0,-1,0).PointResize(255,224),crop(642,0,-1,0))
ConvertToYV12()
LimitedSharpenFaster(ss_x=1,ss_y=1,Smode=4,strength=50)
Now let's have a look at the result:

[Image: dkcsnesresized.jpg]

Much better.

Here's my full avisynth script:

Code:
avisource("Video_1216-1619(S-VIDEO).avi").killaudio()
LimitedGamma(1.4,50)
Tweak(0,1.4,0,1)
ConvertToRGB()
SeparateFields()
interleave(selectodd(),selecteven())
AssumeFrameBased()
Stackhorizontal(crop(2,0,-1,0).PointResize(255,224),crop(642,0,-1,0))
ConvertToYV12()
LimitedSharpenFaster(ss_x=1,ss_y=1,Smode=4,strength=50)
EEDI2()
LimitedSharpenFaster(dest_x=608,dest_y=480,strength=80)
maa()

function LimitedGamma(clip clp, float "gamma", int "strength") {
clp.mt_lut(Yexpr="x 255 / 333 106 / * sin "+string(float(strength)/100.0)+" ^ x 255 / 1 "+string(gamma)+" / ^ 255 * x - * x +",U=2,V=2)
return last }

function maa(clip input, int "mask") {
mask = input.mt_edge("sobel",7,7,5,5).mt_inflate()
aa_clip=input.spline36Resize(width(input)*2,height(input)*2).TurnLeft().SangNom().TurnRight().SangNom().spline36Resize(width(input),height(input)).MergeChroma(input)
return mt_merge(input,aa_clip,mask) }

Laterz.
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Best NES/SNES emulator(s) vulcanlogician 24 1554 January 1, 2019 at 5:48 pm
Last Post: Shell B
  Opinions on the NES & SNES Classic? ƵenKlassen 9 1251 December 8, 2017 at 3:21 am
Last Post: Edwardo Piet
  Does anyone here have any favorite SNES games? ƵenKlassen 18 1769 November 18, 2017 at 1:44 pm
Last Post: Cecelia
  SuperUfo on the SNES Aractus 5 1793 December 13, 2012 at 9:19 am
Last Post: Aractus



Users browsing this thread: 1 Guest(s)