Source Filmmaker

Source Filmmaker

37 ratings
Render the best possible quality for Youtube.
By an0nymooose
How to render your SFM video in the best possible quality
   
Award
Favorite
Favorited
Unfavorite
Setup
SETTING UP: To squeeze the BEST quality of a 1080p video onto youtube, the final video will need to be 1440p (youtube gives us a better bitrate at 1080p if the max quality is 1440p). BUT to do this, SFM refuses to render at 1440p, we'll have to render at 4k by doing

"Right-click Source Filmmaker, click Properties, click the SET LAUNCH OPTIONS button, and add -sfm_resolution 2160 -w 3840 -h 2160 to your command-line startup options."

We will downscale this to 1440p in virtualdub later.

OR: Just render at 1080p and resize to 1440p if you dont care about having true 1440p, and just want a good looking 1080p.
Instructions
1. Render your video as an image sequence (png)





2. Adjust your shutter speed. Take your framerate times 2, and and divide by 1.
24fps = 1/48 = 0.02083
30fps = 1/60 = 0.0167
60fps = 1/120 = 0.00833

SFM will round these numbers.

3. Download VirtualDub[virtualdub.sourceforge.net]

4. Drag in the the first frame of the image sequece.
a) Go to Audio > Audio from other file. Select your audio.
NOTE: To be in sync go to the VERY END of the last clip by hitting the down arrow, then the right arrow.









Your audio length should be EXACTLY the number at the top (audacity is a nice tool for this)

b) set the Framerate by goin to video > framerate > "change so video and audio durations match" (It should be EXACTLY 24/30/60 etc. No decimals such as 60.002, etc.)

c) Video > Compression > Lagarith Lossless Codec (this'll be a very large file)
c2) (still in the compression tab) Configure > mode > YUY2
NOTE: RGB may be better, use it if you have a lot of dark scenes/dark compression artifacts

d) Video > Filters > Add.. >resize


e) File > Save as .avi

5. Download Handbrake[handbrake.fr]

6. Go to import, and import this preset (PRESET DOWNLOAD[drive.google.com])


7. Render using this preset

If your audio is more complex, just render the uncompressed video, put in you favorite video editor, add your audio, re-render uncompressed, and follow the handbrake instructions.

NOTE: I'm not an expert in doing this, these are just the best settings I've had with 100s of hours of messing with rendering options.

Let me know if you've found a better handbrake preset for youtube.
4 Comments
TeenX Jan 10, 2023 @ 3:26pm 
And wwhen i use other ones it errors and when i uupload it :steamsad:
TeenX Jan 10, 2023 @ 3:15pm 
the preset wont work
76561198097110384 Jan 16, 2019 @ 8:38am 
Thanks for an explanation of best quality in SFM. It really helped me much.
1slur Jan 15, 2019 @ 4:18am 
For those that want to know WHY Image Sequence (although TGA is much faster than PNG, but takes up several times more space), here's the reasons:

MP4 implementation by Valve is extremely wonky. It honestly looks bad even at high settings, and it loves to mess with the colours.
AVI implementation by Valve is the worst thing I've ever seen. It was written in 1995 at the very latest and never updated since, as it has bugs that were fixed in the format in February 1996. Yes, you read that right. 1996. This bug corrupts AVIs over 2GB and breaks them completely over 4GB, both due to overflow errors. AND IT'S IN SFM REBORN FOR DOTA, TOO.
Image Sequence. Easiest to rerender if your video goes wrong, and with SFM, it will go wrong. Maybe the render might get stuck. Maybe something ends up inverted. Maybe the colours break. It's far easier to rerender an image and replace the original than use either of the two formats above.