Recording With Fusion For YouTube

Discussion in 'Tutorials' started by MainMemory, Nov 29, 2019.

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've seen a lot of people complaining about video artifacts in videos recorded with Fusion's built-in AVI logging and uploaded to YouTube. The problem isn't that Fusion's recorder doesn't work, it's that YouTube doesn't properly support the codec it uses. In fact, if you read the manual, it specifically says:
    So, let's do just that, and while we're at it, let's upscale it to 720p so YouTube will play it back at 60fps, and so that YouTube's compression won't wreck the video as much.
    First off, you will need to install the x264vfw codec, then VirtualDub (probably the 32-bit version).
    Now, take your recorded avi file, and open it in VirtualDub, it should look something like this:
    [​IMG]
    From here you can perform various edits that I won't be getting into. What I will get into, is resizing the video. For me, Fusion always records at 640x480 (2x native), so to upscale to 960x720 (3x native), we first have to downscale to 320x240 (1x native) so we get a clean upscale. So go to Video -> Filters (Ctrl+F), Add, resize, then set it up for 320x240 (50%) and Nearest neighbor, like so:
    [​IMG]
    Now, you can add another resize filter with the size set to 960x720 (300%). You can go higher, but none of the other standard resolutions map cleanly to multiples of 240. Adding a letterbox to make it widescreen generally isn't worth it, it just increases the video's size and YouTube can handle that automatically anyway. Your filters should look like this:
    [​IMG]
    If you want to apply any other filters, they should go after the first resize or after both resizes.
    Now go to Video -> Compression (Ctrl+P), and select x264fvw. You may want to click the Configure button to adjust the quality and compression speed, I have it set up like this:
    [​IMG]
    Now, make sure "Full processing mode" is selected in the Video menu, and you can begin the encoding process with File -> Save as AVI (F7). Make sure you save with a different name than the original file. Once that's finished, you should have a second avi file which will be much larger than the original, and you can upload that to YouTube.
     
    Painto, JayKuriN, ESauce64 and 9 others like this.
  2. Trickster

    Trickster Well-Known Member Member

    Joined:
    Aug 22, 2018
    Messages:
    110
    Location:
    Brazil Bad Future
    Thanks man! I always had problems when recording gameplays.
    And well, I HAD! :v

    Btw the SMPS of gigapolis in your hack is so good! Sometimes I even listen to it while making sprites.
     
    Bluestreak likes this.
  3. Cass10

    Cass10 Active Member Member

    Joined:
    Nov 29, 2008
    Messages:
    31
    Location:
    General Mines.
    I have a question.
    Fusion can't do rerecordings. I want to make TAS, but I can't record with Gens RR. Is there any way to re-record with Kega? Or what better codec to record a video at 60fps with Gens RR or another emulator?
     
    Bluestreak, RandomName and ProjectFM like this.
  4. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    BizHawk is made specifically for TASes, so I guess use that? Any codec should work, really.
     
    Cass10 and ProjectFM like this.
  5. yami

    yami the homing attack addict Member

    Joined:
    Sep 24, 2020
    Messages:
    34
    Yea, BizHawk is a good one. I use that for rerecording, and it works really nicely, and records really well.
     
    Cass10 likes this.
  6. Cass10

    Cass10 Active Member Member

    Joined:
    Nov 29, 2008
    Messages:
    31
    Location:
    General Mines.
    Thank you very much!
     
  7. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    So recently I had to figure this out for myself, but I was really insistent on keeping the quality high. Since I plan to do post-processing with the video footage, I couldn't really find a neat way to handle that without quality loss with either VirtualDub or Handbrake. Unfortunately, just converting my video to .mp4 didn't work either because my video editor wasn't having it. Fusion records in a 4:4:4 YUV format as opposed to 4:2:0 YUV that is the most common (plus its something called "adaptive", and for some reason that does not work at all, so even 100% lossless mp4 files don't work!) Therefore, I spent a lot of time figuring out with ffmpeg how to do this properly. The sad fact is: You can never escape quality loss if you can't edit 4:4:4 video like what Fusion will output. However, I have a method of minimizing this quality loss, that could even be used as an alternate way to render to youtube. This will probably be more complicated, but its what worked for me.

    • Step 1: Download ffmpeg
    • Step 2: Create a bat file, with this as its contents: ffmpeg -i %1 -y -vf scale=1600:1200:flags=neighbor -c:v libx264 -x264-params crf=1 -pix_fmt yuv420p %1.mp4
    • Step 3: You can see scale=1600:1200. This will be final size of the output video. This will be scaled with nearest neighbor. From the looks of it, even if Windows and VLC insist Fusion outputs at 640:480, it will actually be 320:240 resolution (No idea why this is or how the confusion happens, but looking at it with ffprobe seems to suggest this either way). You should ideally use any multiples of 320:240, here it is 5x resolution.
    • Step 4: You can see crf=1. This will be the compression ratio of the video. 0 will mean its lossless, however that may not work. If you want the cleanest possible video for further editing, and don't care about file size, use 1. Otherwise, you should try something between 15-30 depending on how much quality loss is acceptable. For youtube videos that range should be idea. Youtube uploads will likely cause more quality loss, so using a smaller value is preferred, if you can don't mind waiting for the upload to finish.
    • Step 5: Drop your files into the batch file and it should start converting. The videos while not perfect, should look really good. The file that ffmpeg spits out should work on most video editors or as a straight upload on youtube.
    • Step 6: I have not tried this, but Youtube may accept 4:4:4 videos. Someone could try removing -pix_fmt yuv420p from the command, which will not convert the color space of the video. For me, using my editor, this has lead to an audio only video, so it may cause issues with Youtube too. However, it should in theory be higher quality still if it works.
    Thanks for the tutorial MainMemory, it helped me get started figuring this out. And I think your method will be easier and simpler to adjust for anyone not familiar with ffmpeg, but I thought to include this for people who can't tolerate a little bit of quality loss =P
     
  8. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    For the record, if you're having trouble with Fusion's codec, you should always remember that Gens ReRecording can dump avi files with any codec you want, including lossless ones.

    It's not without bugs, though, as it loses a frame whenever the avi is split (by default, every 2 gigabytes). A "Gens Split" branch exists which supposedly fixes this bug, but in the end it actually doesn't. I usually dodge this by splitting long videos by hand when the screen is black (e.g. between two acts in Sonic games), but I ultimately had to rely on Gens Split when I dumped my 392-minute playthrough of Sonic Delta, so that particular video does skip a few frames throughout it.

    Still, if you only want to record short videos, Gens ReRecording allows you to steer away from Fusion's weird codec in favour of more usable ones, and you can still proceed from there.
     
    ProjectFM likes this.
  9. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    This is true, howrever Gens in general has poor hardware compatibility and audio quality, which may be an issue depending on the person. Other emulators can output video files too, for example Bizhawk.
     
    ProjectFM and vladikcomper like this.
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Can't you set those same options in VirtualDub though?
     
  11. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    Probably, I didn't really think it through because I wanted to keep it at 320:240 so I can upscale it in the editor, but I thought it might have been software issues on the converter side. I knew ffmpeg could probably handle anything I threw at it, so I figured I'd give it a shot and only figured (hours later) what I was supposed to actually do. I thought to include this information to anyone interested in the topic but in hindsight I probably could've done exactly just that.
     
  12. Ronald Rose

    Ronald Rose Newcomer In Limbo

    Joined:
    Feb 7, 2016
    Messages:
    10
    One thing about recording KEGA is that the screen is messy and buggy.
     
  13. ExtremeBehavior

    ExtremeBehavior Indefinitely inactive Member

    Joined:
    Jul 8, 2021
    Messages:
    70
    Location:
    Malaysia
    I does have the Game Bar Recording on my Windows 10 computer, which works almost well. But it doesn't work on a few other game emulators programs. It is unknown if other Windows 10 computer have that recorder or not, but it is really good!

    (This is my first post after a week of being Prospect and then promoted to member)
     
  14. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    I usually edit my Kega videos with a video editor that accepts AVIs. Easy conversion would be adding AVI saving as MP4. Videopad is what i use, a lesser version