[Howto] Streaming quality FG videos on JustinTv w/ cheap hardware

This is a guide intended the the ones like me who have always wanted to get the most out of a video for fighting games, which as you know require a good framerate besides quality. So here are the results of my findings and an attempt at writing a step-by-step guide.

You can watch the results you’ll hopefully be able to achieve after reading that guide here or here.

Step #0 - Create a Justin.tv Account

Go here :wonder:

Step #1 - Get the softwares

Download and install VLC.
Download an install VirtualDub.
Download and install Adobe (FME) Flash Media Encoder 3.1 (Right-click - Save As).
Download and install [Visual C++ 2008 SP1 Redistributable Package (x86)](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-

3802B2AF5FC2&displaylang=en) if your OS is 32 bits or Visual C++ 2008 SP1 Redistributable Package (x64).
Download SCFH DSF (installation described below).

Step #2 - Set up SCFH DSF

Unpack the archive SCFHDSF041.zip in the destination of your choice and run either install.bat or * install64.bat* depending on your OS. You should get a success message. Now run SCFH.exe. You should get a blank list of processes. Now this is getting a bit tricky because we obviously need something listed in it to go further, so for this we’re going to launch our favorite browser and go to UStream, click on any video there and, back to SCFH, click “Refresh”. You should now have a process listed which will allow us to configure it at last. (I know it’s weird but it’s a japanese software hehe)

On Windows XP you should have zero problems but it’s a bit tricky on Windows 7 (on mine at least), since client coordinates are seemingly ignored at capture time, whichever value you put in the UI. I think this is a bug since it’s mainly designed for XP.

Now I’m going to explain how to configure the width and height of our capture area even though I still haven’t been able to actually set the x and y coordinates of that capture area so we’re stuck to using the top left corner for now :slight_smile: (well if you’re not a XP user, like me).

Leave SCFH DSF open and launch VLC like in the above pic, click “Media”, “Open capture device”, select “SCFH DSF” in the Video device name dropdown list, click “Configure” next to it. Here we can set the width, height and framerate. Enter “640” for the width, “360” for the height", and “60” for the framerate. Click “Apply”, “Ok” to close the window and back to the previous dialog, click “Play” at the bottom : VLC should now display our capture area, the one we’re going to fill with awesome fighting games videos !

Step #3 - Create batch file for Flash Media Encoder (FME)

Notepad c:\justin.bat with this info:

"C:\Program Files\Adobe\Flash Media Live Encoder 3.1\FMLEcmd.exe" /p c:\justin.xml


Run Flash Media Encoder 3.1 (C:\Program Files\Adobe\Flash Media Live Encoder 3.1\FlashMediaLiveEncoder.exe). Select the sound capture device that you wish (Eg. Stereo Mix). Then select “Save Profile”. Then open up that file you have saved and locate the following line:

Line In (Realtek High Definitio

Note: It will have the name of the audio device you selected. Cut/paste that entire line into a new notepad document for step #4. You may now close the profile you opened up as well as the FME graphic interface.

Step #4 - Create FME XML

Notepad c:\justin.xml. Copy and paste the following :

<?xml version="1.0" encoding="UTF-16"?>
        <device>SCFH DSF</device>
        <device>Line In (Realtek High Definitio</device>
            <keyframe_frequency>10 Seconds</keyframe_frequency>

Insert/replace the tag you’ve previously extracted from your created profile in step #3.5.
Now you need your stream ID. To get this JTV stream ID, log into JTV and then click here. Your ID should be at the bottom of the page, just copy and paste it in the corresponding tag of your justin.xml file.

Now select UNICODE in Notepad before saving this, like shown in the pic below (very important).

Step #5 - Start a blank streaming test

Simply run the justin.bat file by double-clicking it and it should pop up a black window that scrolls some stats about FPS and bitrate. Pay attention to the input fps, it should be at 60 fps (and so does the output of course) even if you’re just capturing your plain static desktop.
If it’s not at 60 fps, then maybe you need to check/reconfigure SCFH DSH by launching VLC again like in Step #2, otherwise you can close the black window.

NB : from my recent tests it looks like SCFH DSF also needs to be open BEFORE running the justin.bat file for the framerate to go as high as 60.

Step #6 - Capturing and processing the video you’re going to stream

This is the part where VirtualDub skills will be needed, mostly to compensate the mediocre video quality these USB capture keys (like the one I have) provide (great value for the price though). I’m assuming here that you have everything setup, drivers for your capturing device installed and working.

Open VirtualDub, “File”, “Capture AVI”, pick your capturing device in the “Device” menu (mine is “USB 2861 Device (DirectShow)”), you should see the output screen of your console…

Two scenarii from here : either you want to capture a live feed on-the-fly (ie. for a tourney), then follow #6.a, OR you have all the time in the world to process & improve the video you want to show everyone, then follow #6.b. Both ways eventually lead to #6.c.

#6.a - Capturing and streaming a live-feed “on-the-fly”

Open the “Video” menu, check “Preview”, pick “Progressive - both fields” under the “Previous acceleration” sub-menu right below.
Go down to the “Filter chain” sub-menu, and check “Enable”, click “Filter list…” right below and then “Add”…

#6.b - Capturing a video for postponed processing purposes

Select “Enable audio capture” in the “Audio” menu.
Hit the F6 key to start capturing your favorite match (and Escape to stop the recording).

Open the resulting AVI file with another instance of VirtualDub, click “Filters” in the “Video” menu, then “Add”…

#6.c - Adding filters to fine-tune our video

Double-click “bob doubler” in the list of filters and configure it to : “Top field first” in the field order and “Adaptive ELA” in the Deinterlacing method. Click Ok.

NB : this is the filter that doubles the framerate of your original 25 fps to 50 fps while deinterlacing.

Now you need to add a second filter : the “Resize” filter which we’ll configure in the following way (pic below) :

See how the width and height match the ones we previously configured in justin.xml ?
The key here is to avoid to let FME do the resizing job because it’s plain bad, we’d rather use the more trustworthy Lanczos algorithm from VirtualDub. Once configured close the dialog. You should now have the two filters listed like in the pic below :

Close the filters dialog by clicking “OK” (and hit F7 to save the processed video on your drive if you followed the #6.1 scenario)

Step #7 - Final preparations and live cap to Jtv

Again, two scenarii depending on which option you choosed before : pick 7.a if you choosed 6.a and 7.b if you choosed 6.b. Both ways lead to 7.c :

#7.a - Capturing the ouput of VirtualDub to Jtv

WARNING : the following doesn’t seem to work properly on Windows 7 as I described earlier and I still haven’t been able to find a true solution to this : the coordinates of my custom area selection are always ignored by the SCFH DSF driver somehow, and I’m stuck with a top left corner portion of the screen area only. You should be fine if using Windows XP though (maybe Vista too I need feedback).

Launch SCFH DSF, pick VirtualDub.exe in the “Process list”. Click on “Area Selection”, drag and resize the green selection over the window you want to capture, as shown in the above pic, double-click to apply. Click “Apply” (both buttons).

NB : A good way to check if the selection we just defined is actually properly applied is to launch VLC exactly like in Step #2 and see if the dimensions of the capture area are correct

#7.b - Playback of our processed video in VLC

Apply the same method as described in Step #7.a except that you want to create an area selection over your video player window obviously.

[WORKAROUND for the Windows 7 bug] I use VLC to playback my processed video with the following command parameters :

"C:\Program Files\VideoLAN\VLC\vlc.exe" --no-video-deco --no-embedded-video --high-priority

Write this to a .bat file if you want to launch VLC in “borderless mode” and stuck in the top left corner (yeah cheap workaround but it works).

#7.c - Go live !

Launch the justin.bat file created earlier by double-clicking it and constantly check in the “black window” that your input fps doesn’t drop AND match your output fps (like in the pic below). This really is the key to a smooth stream.

If you get fps drop your CPU is probably overloaded, in that case you may have to decrease the framerate unfortunately, OR switch to FME 2.5 (instead of 3.1 here) which is lighter on the CPU. The only reason I haven’t mentionned it so far is that I couldn’t get a solid 60 fps with it, but you may try it if 3.1 is too CPU heavy on your computer (provided you stick to something less than 60 fps).

Also keep an eye on the “Buffer” value, the higher it gets the more your bandwith is exceeded; A high value means you need to lower the <bitrate> *** in your justin.xml file (Step #4), and yes it requires quite a lot of trials and errors :wonder:

** the bitrate is the value that sets the actual video quality, the higher the better your video quality will be, but the higher the more your bandwith is likely to be exceeded, hence the need to be careful about the buffer value which tells you how much you’re exceeding it.*

Credits go to MultiBoxing for Steps #3 to #4, I ripped off a lot of your text :smiley:

Reserved -

Ok I’m on my way to writing the last part for this guide, if you already have any comments feel free to let me know :slight_smile:

EDIT for Torta below : I’ll re-arrange Step #6 in 2 branches to include both scenarii, “realtime” capture or “postponed” capture of a processed video :slight_smile:

looks cool, but if i want to stream tourneys at the moment, is there any way to make those filters “on the fly”?

nice guide, I’m really interested in your rendering settings. Quality I get is nothing compared to your videos :frowning:
My results in youtube

can this work for ustream?

I guess it should work the same, more or less. I never used Ustream so I really don’t know.

EDIT : I just did a search and found out it also uses FME, so yeah these guidelines should be 99% the same for Ustream.

I would like to see what you can do for YT video uploads with the easycap, the recorded quality is pretty damn nice but this is the best I can get out of YT (i’ve tried Windows Media Encoder and Microsoft Expression Encoder 4 and YT makes the audio go out of sync, capturing via ffdshow or virtualdub makes the original file go out of sync, capturing 640x480 makes the feed go offset to the left about 20 pixels, 720x480 gives an ugly blue stripe on the right side…just a load of problems)

[media=youtube]kZ_YMG4FdP0[/media] <- this is recorded in debut video capture (mpeg4) and then resized in virtual dub
[media=youtube]xeT37HjsOO4[/media] <- this is recorded in avs video capture, left alone (mpeg2)

Good guide so far. I have one of those DiamondMM caps which is like the easycap. Going to try this out later.

That’s a bit beyond the scope of this guide I’m afraid but I’ll do a quick answer for you anyway, yes I [media=youtube]aMEtxHnDI3E&fmt=22[/media] Youtube and the quality can be very nice of course but I find it very annoying to have to wait for the upload to finish, wait for the YT encoding to complete, basically wait so much whereas the method described here is instantaneous (well mostly). Besides I can’t get >30 fps on YT so I didn’t bother with it further.

well I was just wondering if you had tried other software and youtube uploads because basically I believe most want to record and upload with as little steps as possible. Having a program that can record, encode, and resize simultaneously would be great, but every program I’ve tried can only do two of those things and when you introduce the third it gives problems. And even when it does all 3 properly (i.e. WME), when you upload to YT the audio is out of sync.

edit Here is what i can accomplish with a little bit of time (capture with AVS video recorder then resize/recompress in virtualdub)


Correct me if i’m wrong but what im gettin here is that youre post-treating the video after it was recorded.
Is is possible to achieve decent quality for a live stream torney?

I rearranged Step #6 to include both use cases, live or postponed. It’s a bit hard for me because I have no idea if I’m the only one on Earth affected by that annoying SCFH DSF coordinates bug or if it’s a Windows 7 related issue. I believe the latter is more likely though. Your feedback would be valuable if you tried to fiddle with it already.

@Sarda, absolutely yes you can achieve more than decent quality, however I did a few tests following the #6.a scenario and I can’t seem to get 60 fps for now using the “Preview” option in VirtualDub, just 30 fps right now -which is fine anyway-, but maybe there’s a way to accelerate further the “Preview” in VD. Do some tests !

Thank you so much for your tutorial. I’m planning on translating it to portuguese with your permission. We, at Portal Versus (Portal Versus ? Games - Dicas, Táticas, guias e tutoriais de jogos de luta.) are organizing several tourneys here in Brazil and only some are being streamed because we’re using a camera to shoot the tv screen in some cities. If I can get this to work and translate it it will help a lot and we will start to stream more tourneys.

Thank you !

If SCFH DSF isn’t working for you in Windows 7, you should look into using VH Screen Capture Driver. I have tried both and picked the VH Screen Capture Driver to use overall. It’s easier to use, imo, and is really stable.

You can download the freeware here: VH Screen Capture Driver

I am going back and forth between VH and SCFH. I like SCFH due to lack of a watermark, aka it is free.

If you google for an older version of VH, there is no water mark. Just search for the hmelyoff version, before it was bought by split media. :slight_smile:

Great write up by the way Boulotaur2024!

Awesome, I’ll do that! I am also installing XP on my computer to see if I can get better results. I am using a HD PVR>GraphStudio>VHScnCpr>FMLE 3.1, I get 20FPS in high quality, but a weird blur happens in the steps of conversion from the VH to the Output screen on the FMLE…and now that I think about it, I didn’t look at the input screen to see if there was the same blur in the FMLE.

I am also going to reformat my Laptop with XP and see if I can replicate Boul’s streaming on that.

I am hoping to get some stream up from my Hotel Room for Summer Jam, in hopes to replicate what Philly-One had rolling at NECX.

If you need help, just let me know. I’ve been streaming with the HD PVR for a while and got that on lock. I streamed at 25fps and 1500kbs data rate. In my new setup, I use the included software (TotalMedia Extreme) > VH > Wirecast (Windows 7). My old setup was TotalMedia Extreme > VH > FME 3.1 (Vista).

The one thing I learned with using the HD PVR to stream, is that you need a CPU and GPU that can handle it. I would sit between 90-100% CPU usage when streaming on my old laptop. It had 4gig of ram, Intel Core Duo 2.0ghz and just build-in Intel graphics. Now I am running an AMD Phenom II x6, 4 gig of ram and a Radeon 5770 GPU. My CPU usage doesn’t go above 45% and I have a much smoother stream because of it.

I’ll be arriving in Philly Friday afternoon if you want some assistance setting things up. Just hit me up.