BGMODE or parameter changes during scanline

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

tokumaru wrote:I'm pretty sure all cheap capture devices you can find nowadays will display/capture NES video as interlaced, at least with the bundled software. But you can use VirtualDub or some other tool to convert it back to 60Hz 240p after capturing.
I tend to use VirtualDub as much as possible, but when it comes to deinterlacing I really prefer that the hardware capture device do it natively. To date I have yet to see a software deinterlacer do even a remotely decent job, and it's all because they're working with "post-rendered" results (dunno what else to call it). Things work a hell of a lot better if the actual hardware handling the video signal is what handles the deinterlacing correctly -- that Firewire/DV capture box I have actually does a great job deinterlacing (I used it do save a lot of old VHS recordings that look quite nice), but the last time I used that was like 8-9 years ago, and my PC now doesn't have Firewire nor do I have room for an expansion card, hence new product.

The device I bought claims to do up to 60fps in a multitude of modes, but I always take those claims with a grain of salt (meaning some jackass at the company probably tested HDMI 1080p @ 60fps, was able to do it, and thus said "say we support it, ship it" but probably didn't test anything else). That's what I mean by "it's always a crap shoot". I guess I'll be finding out soon enough. If the product turns out to be crap I can always return it and try this instead.
tokumaru wrote:There is a free (open source?) capture software though, that is able to display and capture the video correctly. I can't remember its name right now... I'll see if I can find it again, if I do I'll post the name here. Anyway, this program treated the video correctly, but it was far from perfect... It was pretty unstable, crashed a lot. While setting it up, 50% of the choices I made caused the program to close.
I remember seeing some (free) Japanese software that supposedly worked wonderfully but also cannot remember it's name. Just remember if you recommend anything, please ensure it works on Windows XP. (The product I was going to buy, which was recommended to me by literally 4 different people, doesn't support XP, which is why I bought what I did).
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: BGMODE or parameter changes during scanline

Post by thefox »

tokumaru wrote:There is a free (open source?) capture software though, that is able to display and capture the video correctly. I can't remember its name right now... I'll see if I can find it again, if I do I'll post the name here. Anyway, this program treated the video correctly, but it was far from perfect... It was pretty unstable, crashed a lot. While setting it up, 50% of the choices I made caused the program to close.
Are you talking about OBS (Open Broadcaster Software)? https://obsproject.com/

I had the same symptoms with it, most deinterlacing options caused it to crash (seemed to be ones implemented with shaders).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: BGMODE or parameter changes during scanline

Post by tepples »

tokumaru wrote:I'm pretty sure all cheap capture devices you can find nowadays will display/capture NES video as interlaced, at least with the bundled software.
I think the worry is that some capture devices won't sync to 240p at all. I have a DVD recorder that records NES fine but records Super NES in black and white. Another device records GameCube fine (because it's 480i) but says "recording failed" for NES.

As for "having the capture card do the deinterlacing", that depends on how you define deinterlacing. A lot of people use it to mean "inverse telecine", or reconstructing 24 film frames from the 60 fields implied by 30 captured frames. That's not the same thing as extracting 60 low-definition, high-motion frames from 30. I'm inclined to just trust VirtualDub to pull out odd or even lines.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

thefox wrote:Are you talking about OBS (Open Broadcaster Software)? https://obsproject.com/

I had the same symptoms with it, most deinterlacing options caused it to crash (seemed to be ones implemented with shaders).
Nah, not OBS (I've posted on their forum anyway asking why XP isn't supported, and there's basically no justification -- and the author actually admits that, stating "Yes it's fully possible, but I just chose not to bother". There's like one specific UI-related feature that uses Vista+ features that that has nothing to do with the actual capturing).

What I'm talking about is some Japanese video capturing software (not SCFH DSF by the way :-) ), it's like VirtualDub but without any editing capability, it just interacts with DirectShow and WDM devices both and lets you adjust all sorts of really low-level stuff. It's just a little standalone app, very small, and bare-bones. I'll ask my friends to see if they remember.
tepples wrote:I think the worry is that some capture devices won't sync to 240p at all. I have a DVD recorder that records NES fine but records Super NES in black and white. Another device records GameCube fine (because it's 480i) but says "recording failed" for NES.
Correct -- you hit the nail on the head.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

And what I feared was true.

First and foremost, nothing can seem to "connect" to the capture driver itself; VirtualDub fails with a vague message, and Skype (just as a test) also fails.

Using the native software that comes with the thing, something called VivaStation, I'm able to get video and audio (makes you wonder what the hell is going on at the driver level that causes this thing to require custom software to interface with it), but the live overlay results (i.e. native screenshots aren't possible) are very badly interlaced -- until you do an actual video capture, then the preview becomes non-interlaced (sometimes, but not always).

Regardless if you're capturing or not, the responsiveness (between pressing a button on the controller and seeing something change on-screen) is nearly 3 full seconds.

It seems to support VMR7 and VMR9, and the resulting capture files are something called m2ts, which is some kind of BluRay MPEG-2 stream, which VirtualDub cannot read. Crap I found on the web indicates Windows Media Player can load m2ts, but not on Windows XP. So I'm not sure what VMR7 and VMR9 have anything to do with m2ts, which is MPEG-2. Very confusing.

On the bright side, VLC 2.1.5 can play it, but man I hate that software. You also have to adjust specific settings in VLC to get it to look right, specifically Video / Deinterlace / Automatic, then set Video / Deinterlace Mode / Discard. Otherwise the video either flashes between a frame and a black frame, or the brightness is too dim.

It also randomly seems to "get lost" with its video syncing, in the sense that sometimes at the bottom of the video there's just a flashing colour, preceded by a darker thick line. *shakes head*

So when I talk about these things being extremely wonky/sensitive/ridiculous, regardless of cost, this is what I'm talking about. I've included a screenshot but it doesn't do it justice even remotely. Edit: I've added a couple screenshots from within VLC of Super Metroid (with the above settings applied).

@byuu -- if you can work with the above (m2ts files and use VLC), I can capture something for you. I'm just worried about the quality because we're talking about something that's very timing-sensitive and any kind of garbage or anomalies make analysis even harder. I'm really not thrilled that I can't capture with VirtualDub, because that'd make frame-by-frame analysis a hell of a lot easier.
Attachments
vlcsnap-2014-08-01-13h49m07s150.png
vlcsnap-2014-08-01-13h48m55s30.png
20140801_132014_0.png
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

And now it looks like my SWC DX is also broken somehow. The first time I plugged it in, some device (pretty sure the SWC) made a noise that sounded like electrical interference or something very bad happening power-wise, so I shut the SNES off. Now no matter what I do I can't get the thing to give a picture with the SWC DX plugged in, so I have a feeling my copier is fried. (I'd better go harass Front Far East! Hahahaha...)

I'll have to take it apart and see if I can figure out if something is blown and/or replace it. Otherwise I guess I need to get myself some kind of SD card for the SNES, or maybe one of those SNES PowerPaks. *grumbles*

Edit: Oh foo. I forgot the damn thing uses its own AC power supply, although I don't remember it requiring one to function... so maybe some part of it is just busted. Else I'll go figure out what voltage and polarity that has. And once I opened it up, it looks like the CMOS battery is... well, let's just say it probably needs to be replaced, I see what looks like corrosion on one of the leads.

Edit #2: Well all the repair techniques I know of for these things (I've had to deal with 4 or 5 during my life), including an AC adapter (12V, centre-pin-negative (per docs I found)) don't work, so it's just "another dead SWC DX". I'll have to pick up an SD2SNES (thought about Super Everdrive but I figure this is one of those one-time purchases that should last me a long time, so I'm happy to shell out the extra cash). Sorry about all the delays -- just goes to show how long ago I used all this stuff. :-) I'll use the opportunity to also pick up a different capture device too, hopefully something that works with VirtualDub directly.

P.S. -- If anyone wants the SWC DX I'll be happy to send it to 'em, if they want to try to repair it.
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: BGMODE or parameter changes during scanline

Post by thefox »

koitsu wrote:
thefox wrote:Are you talking about OBS (Open Broadcaster Software)? https://obsproject.com/

I had the same symptoms with it, most deinterlacing options caused it to crash (seemed to be ones implemented with shaders).
Nah, not OBS
My reply was to tokumaru, not to you. :)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

*waves hands randomly* Details details... ;)
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: BGMODE or parameter changes during scanline

Post by Near »

Well, thanks for trying anyway. Appreciated all the same.

I guess it doesn't have to be perfect, I just need a longer capture of the wave effect. A cell phone capture would probably be fine, so long as you convert it to something mplayer can open (I know Android stores videos in some stupid ass phone format by default.)
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: BGMODE or parameter changes during scanline

Post by tokumaru »

koitsu wrote:It seems to support VMR7 and VMR9, and the resulting capture files are something called m2ts, which is some kind of BluRay MPEG-2 stream, which VirtualDub cannot read.
Have you tried the FFMpeg Plugins? VirtualDub becames capable of opening a crapload of different formats once you install these.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

@byuu -- No problem. When my SD2SNES gets here I'll be able to get you something either way (regardless of which capture device I use). I'm blocked until then. I'm just glad my S-Video cable still works. :-)

@tokumaru -- No, because I've never understood ffmpeg and how exactly those filters fit into how DirectShow works. Rephrased: I have deep concerns over things that "tie in" to DirectShow via some system-wide installation vs. using something like MPC-HC (which is what I prefer to use to play video files) which includes its own ffmpeg stuff. But right now the major problems I have are with the fact that I no longer have a working copier (working on that, re: SD2SNES in the mail) and capture devices being dicks. :-) I'll figure something out either way, I just don't want to give byuu some crappy results where he can't get a clear frame-by-frame. I really prefer capturing in a raw or lossless compression format, especially for short clips (~3-4 minutes tops), followed by doing lossless compression using XviD or another codec that does a better job (MPEG often makes a mess of things), as long as it's compatible with software (ex. mplayer that byuu uses).
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: BGMODE or parameter changes during scanline

Post by tokumaru »

thefox wrote:Are you talking about OBS (Open Broadcaster Software)? https://obsproject.com/
Hum... This looks suspiciously familiar, but I can't say for sure. I'll have to check on my computer that has the capture card, which I haven't turned on in months. Thanks for the link.
koitsu wrote:Rephrased: I have deep concerns over things that "tie in" to DirectShow via some system-wide installation
I have good news for you: this is not a system-wide installation, it's just some files you unpack to VirtualDub's plugins folder. Then every time you open VirtualDub it will find the plugins and load them automatically.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: BGMODE or parameter changes during scanline

Post by Sik »

I was under the impression that VirtualDub already came installed with the ffmpeg plug-ins by default (unless that changed recently). It is true though that ffmpeg isn't used by default when encoding (you need to select the format explicitly, but that's trivial). Not sure how it goes around decoding.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: BGMODE or parameter changes during scanline

Post by koitsu »

New capture device came in today. Yay -- it works in VirtualDub! (once I figured out what to pick in some of the menus -- I may have to go back with the older device and try some of the same, because there were settings I didn't even know existed).

I had to set the device into "Game Mode" which removes lag of some sort (the device buffers 3-4 full seconds for whatever reason by default, but Game Mode turns that off). Capture results were interlaced (sigh), but I had VirtualDub do the deinterlacing and the results turned out pretty good. Problems I can detect:
  • It occasionally drops frames (not in VirtualDub but the actual encoder), although it may be the 29.97fps vs. 30.00fps situation. Hard for me to tell. It's noticeable during panning parts (there is always a little bit of stutter, but then big jumps at times, and those concern me).
  • Brightness is significantly off (too dark) compared to emulators/actual on-TV results -- I can adjust this post-processing if needed (I imagine we might need it to see subtle glitching during the MODE change).
  • Audio frequency gradually becomes off -- not video/audio sync, but the actual frequency of playback sounds like it gradually gets faster/higher-pitched (especially noticeable in the first 15-20 seconds or so). This is not the first time I've seen VirtualDub do this (though there it started dropping audio and video frames with the frequency decreasing). This only happens during the actual recording and not when simply using VirtualDub to preview the input. That gives me a lot of ideas of things to adjust. (Edit: Ah yes, it's Capture / Timing / Sync audio to video by resampling the audio to a faster or slower rate option -- this explains it)
  • If the deinterlacing isn't good, I have *lots* of deinterlacing options in VirtualDub to try.
I'm not too worried about the audio issue (for this thread, because it's not relevant), but I do worry about it long-term if I plan on using this to record video game play (which would be incredibly useful, to be honest, as I'd love to do some actual Famicom recordings). The only thing I'll change is really jacking up the XviD quality (like doubling it), or possibly using a different (lossless with compression) codec.

It's seriously been 15 years since I've played Super Metroid yet I was able to notice those issues immediately, especially the audio playback ramping up. Guess I have good eyes and ears. ;-)

Sorry about the video recordings being from two separate demos/self-plays -- it would have been better had I reset the console each time.
  • VirtualDub-recorded clip from Super Metroid (demo/self-play) (16.7MBytes)
  • Video: Xvid 720x480 29.97fps 2073kbps [V: mpeg4 advanced simple profile, yuv420p, 720x480, 2073 kb/s]
  • Audio: MP3 48000Hz stereo 112kbps [A: mp3, 48000 Hz, stereo, 112 kb/s]
  • I was sure to use CBR MP3, not VBR (VBR can sometimes cause audio-video desync over time)
Then I moved on to using the native software ("WinTV v7"), which has craploads of options (including device-level features, really low-level stuff, pretty neat). The most idiotic thing is that changing any of the options -- including things like "Video Recording Path", requires you to reboot! What the hell! So moronic. But I figured what the hell, right? Might as well see which one works best for us.
I don't like the results of this. I really prefer the VirtualDub results. (I will admit the in-app preview looked good though). But at least the audio doesn't increase in frequency ;-)

These can both be played in MPC-HC, and probably mplayer.

Let me know when you have these so I can delete them from DropBox.

@byuu, is this sufficient quality, particularly the VirtualDub recording? There's lots I can adjust of course. I just wanna make sure you can see what you need.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Re: BGMODE or parameter changes during scanline

Post by Near »

Sure, that looks to be of sufficient quality to ascertain the offset-per-tile effect. Thanks!
Post Reply