Using Datapath VisionRGB with OBS Studio

Thread in 'Hardware' started by Dark-Aries, 31 May 2016.

  1. Version 1.1
    - I've modified the tutorial as I have figured out how to make it simpler and achieve better quality video based on what I've been shown with the datapath card. A tutorial for dialing in settings might happen later, but this is still the easiest way to have your capture in OBS-Studio with point-filtering resize. The old outdated parts will be crossed out because who knows, it still might be of use to some people.

    This is my longer overdue tutorial on how to use this framegrabber in OBS studio without it looking crap. Which we know this card captures beautifully so why not showcase this. The following images are 240p upscaled to 480p so you aren't staring at tiny images for ants. It also shows how to properly upscale your capture for a 480 or higher resolution stream, because streaming at 240 is for plebs.

    Normally if we try to window capture the preview window we end up with a slightly blurred image like so :

    Screenshot 2016-05-31 00.00.26.png

    What we really want to capture is a nice sharp image, like this :

    Screenshot 2016-05-31 00.00.20.png

    Which we can actually get from the window preview by resizing it then keeping the left mouse button held down. Nobody wants or even should play around with macros or weights to achieve this. Also it locks up your mouse, which you kind of need. My solution to this is taking the 240p video and resizing it in something we can control. Like avisynth. There is some prep to this. These are the results of doing so however.

    vlcsnap-2016-05-31-00h28m48s818.png

    Here is a side by side comparison, with OBS Studio native capture on the left, and resized in avisynth on the right. Now I didn't adjust my capture settings like phase and what not, and honestly I don't think capturing component on a 18ft cable run helps either (don't ask, it's getting fixed though) but as you can see, the results are much sharper. I didn't size it any bigger then 480p because well, monitor sizes and honestly it gets the point across anyways. Alright so now we see the results, how did I achieve it. Well first we need to download some programs.


    The first is GraphStudio. This program allows you to create graph files in windows to view their capture or use them in programs that can utilize them. It's basically doing the manual work for a program to get some sort of usable video/audio from a capture device, etc. You can grab it in the link below, it's not very large.

    http://blog.monogram.sk/janos/tools/monogram-graphstudio/



    We also need the actual program that allows us to do this. Well a majority of it. Avisynth itself. We'll be using the newest version since it's compatible with the resize plugins we'll decide to use. It also means it should be compatible with a lot of other plugins.

    http://avisynth.nl/index.php/Main_Page <- you'll want to grab version 2.6 32bit under official builds


    Alright, last piece of the puzzle. TECHNICALLY we could call it a day here, and just window capture our results. But that's boring. We want this as a video capture source in OBS Studio. Or even regular OBS, even xsplit. Use whatever you feel like. I don't care. This tool is avisynth as directshowcapture. It creates a video capture device in windows and then whatever avisynth files you pipe into it, it displays.

    https://sourceforge.net/projects/avisynth-dshow/files/

    **********Fully Optional************
    You'll also have to grab yourself a copy of ffdshow as we will use it's video codecs to allow us to manipulate the video as we see fit. I actually can't remember if it's full on needed, so actually skip this step, and if things don't work, install this and try again. It might replace your copy of Avisynth so just reinstall.

    If you prefer to just window capture instead of using the avisynth as source program you can insert the fddshow raw video decoder filter , connect it to the graph, then have the video renderer attached to it as so. This allows you to use ffdshow to do any resizing, cropping etc and just window capture it. This method doesn't work as nicely as I would like looks like it might be the future based on some avisynth video source limitations.


    https://sourceforge.net/projects/ffdshow-tryout/

    ******************

    Grab version 0.0.2 because well it's the newest. Once you have everything installed in that order we need to create a graph file. So open up graphstudio and make it look exactly like mine

    Screenshot 2016-05-31 00.41.05.png

    Yup. It's that simple. To add it all you need to to is at the top, click graph, insert filter, then select Datapath VisionRGB-E1 Video 01 , then add. To avoid any colour issues or conversions later down the road you will want to right click , properties on the Datapath VisionRGB-E1 Video 01 , double click the preview pin and a window should appear. Change the colorspace to RGB32 , apply, OK. Then save it as a GRF file. I like to make and put all this stuff in a separate folder out of the way. This is where you can get creative. Download the pointsize filter set from the Avisynth wiki here

    http://avisynth.nl/index.php/PointSize

    I put the .dll in my install folder and in the folder where my grf file is. Sometimes it doesn't set up global pathing correctly or maybe I suck with writing my scripts. I dunno, but this works. Now open up notepad and paste in this script

    V:DirectShowSource("DataPath.GRF",seek=false, audio=false, framecount=2000000000)
    loadplugin("PointSize_x86.dll")
    ConvertToRGB32(V)
    scalex(2)


    ****The previous code is not needed, it was also doing an EPX/AdvanceMAME2x scale, if that's what you want cool. But it's not needed, below is the updated avisynth script******

    V=DirectShowSource("DataPath.GRF",audio=false, framecount=2000000000)
    C=Crop(V,40,1,320,240)
    PointResize(C,C.width*3,C.height*3)



    Obviously replace the grf name with whatever you named yours, I happened to call mine DataPath. What these lines of scripting do is tell it we have a video source (our graph) , we can't seek it, it has no sound and it's frame count is large. (80 days apparently, I guess if we assume 30fps. Either way, it wont' expire on us). It also says to load our resize plugin, convert the video to RGB32 which the plugin can manipulate, then use the scalex PointResize function to double it's size. We also crop our input as needed. This will be explained in the dialing in tutorial. You can choose to ignore the line if not applicable to your situation. If you read the wiki page it has more resize algorithms so feel free to play around. You then want to save that file as a .avs . I think I just called mine datapath.avs . Then in your start bar, find where you installed avisynth as capture , choose it's configure file. It'll ask for a avs file. Pick your own, then choose the test current setup option. If you have video YAY! Now just feel free to close it an add it as a source in OBS.


    Screenshot 2016-06-18 01.13.13.png

    Hopefully this helps people out. I wrote this up at about...well it's ~1am now. I started about midnight. Feel free to ask questions. I'm also looking into seeing if there is anyway to simplify this or something. Maybe using amarec. Who knows. Anyways have fun peeps. Above is an example of the now line tripled capture and the original 320x240p capture from the datapath. Enjoy
     
    Last edited: 19 Jun 2016
    Qlex and Burbruee like this.
  2. Your images aren't public :3
     
  3. pffffffffffffffffffffffffffffffff, hold up

    edit: okay now it should be public
     
  4. Still not working ...
    You can upload the images on the forum to make it work.
     
  5. Yeah, I don't have good experiences with hotlinking Dropbox images either.
     
  6. There, direct upload. This will teach me to try to do things late at night. I swear if I somehow messed it up...it's just gonna get fixed after I sleep.
     
  7. Muf

    Muf

    FYI, the next version of OBS-Studio is going to support point scaling natively, just like OBS1 does.
     
  8. Thank god. I like the advanced things you can do this with setup but simplicity is best.
     
  9. expect an update to this guide because it's gonna get simplified. I have recently been shown easier ways to do things
     
    Qlex, Muf, Tomek and 1 other person like this.
  10. And updated. This should be easier to setup and less prone for causing headaches.
     
    Qlex likes this.
  11. Muf

    Muf

    https://github.com/jp9000/obs-studio/releases/tag/0.15.0
     
  12. Wow, those are all really welcome additions to OBS! Can't wait to try it out.

    How "dangerous" is the using a scene as a source feature when it comes to performance overhead?
     

Share This Page