You don't have to duplicate the whole thing when replying...
For my own projects I'd just copy the whole thing and change the lines at the top. The functions are only there so that I don't have to repeat the code when I want to join several AVI files.
Note that the functions aren't set in stone. They could for example be edited to add a scanline effect (not like a shader, just some darker lines). It's also important to not just copy them without understanding what they do...
That's just a multiplication; that line makes the clip 8 times larger.
A script is like a computer program - you can't just take one line from one script and put it into another script without understanding what it does and/or why it's at that location. Read the Avisynth documentation / wiki and do some experimenting.
I usually don't crop borders.
Preparation:
1. get Avisynth, AvsPmod (Avisynth editor), VirtualDub, x264vfw, lame, mkvtoolnix
2. get the movie's BizHawk version
Dump video:
1. start BizHawk (EmuHawk), load ROM file, pause, disable "always double-size framebuffer" in "menu | SNES | Options"
2. load movie file, start AVI recording (Lagarith codec, enable null frames, use multithreading, RGB mode)
3. unpause, disable speed throttling, wait until movie finishes
Edit video:
1. create directory with the same name as the AVI file, put it in there and rename to "00.avi"
2. create empty text file "00.avs", open in AvsPmod, enter text:
Language: Avisynth
Load("00") # assuming 256x224, convert to 512x720
# Several "Load" calls can be chained together: Load("00a") + Load("00b") + Load("00c")
# Note that you should use the "hires_x" and "hires_y" parameters if you know that the game doesn't use horz. or vert. hi-res.
# If at least one file is > 239p then they should all be loaded as 1080p to minimize blank lines.
function Load(string FileName, bool "hires_x", bool "hires_y", bool "_1080p", bool "fix_audio", bool "fix_aspect") {
hires_x = default(hires_x, false)
hires_y = default(hires_y, false)
_1080p = default(_1080p, false) # 720p if false
fix_audio = default(fix_audio, false)
fix_aspect = default(fix_aspect, false)
AVISource(FileName + ".avi") # 60.0985 fps (NTSC) or 50.0070 fps (PAL)
Fix_FPS # required for Youtube
((!hires_x) && (Width > 256)) ? ReduceX : last # reduce the width if it's known to be low-res
((!hires_y) && (Height > 239)) ? ReduceY : last # reduce the height if it's known to be low-res
(fix_audio) ? Fix_AudioSampleRate : last # required if the audio encoder doesn't accept non-standard rates
(!_1080p) ? Get_720p : Get_1080p # resize
(fix_aspect) ? Fix_AspectRatio : Resize_X(2) # if false then at least adjust for h.264 color subsampling
}
function Fix_FPS(clip c) { # resulting audio is 44028 Hz (NTSC) or 44094 Hz (PAL)
c
i = (abs(FrameRate - 60) < abs(FrameRate - 50)) ? 60 : 50
AssumeFPS(i, true)
}
function ReduceX(clip c) {c.PointResize(c.Width / 2, c.Height )}
function ReduceY(clip c) {c.PointResize(c.Width, c.Height / 2)}
function Fix_AudioSampleRate(clip c) {c.ResampleAudio(44100)}
function Get_720p(clip c) {
c
(Height == 224) ? Resize_Y(3).Letterbox( 720) : last # (NTSC) 48 blank lines
(Height == 448) ? Letterbox( 720) : last # (NTSC) 272 blank lines
(Height == 239) ? Resize_Y(3).Letterbox( 720) : last # (PAL) 3 blank lines
(Height == 478) ? Letterbox( 720) : last # (PAL) 272 blank lines
}
function Get_1080p(clip c) {
c
(Height == 224) ? Resize_Y(4).Letterbox(1080) : last # (NTSC) 184 blank lines
(Height == 448) ? Resize_Y(2).Letterbox(1080) : last # (NTSC) 184 blank lines
(Height == 239) ? Resize_Y(4).Letterbox(1080) : last # (PAL) 124 blank lines
(Height == 478) ? Resize_Y(2).Letterbox(1080) : last # (PAL) 124 blank lines
}
function Resize_X(clip c, int i) {c.PointResize(c.Width * i, c.Height )}
function Resize_Y(clip c, int i) {c.PointResize(c.Width, c.Height * i)}
function Letterbox(clip c, int new_Height) {
c
i1 = int((new_Height - Height) / 2)
i2 = new_Height - Height - i1
AddBorders(0, i1, 0, i2)
}
function Fix_AspectRatio(clip c) { # not required if you put the output file into an MKV file and set the aspect ratio there
c
Spline64Resize(Height * 4 / 3, Height)
}
3. save, open script file in VirtualDub
Encode video:
1. set video encoding to "Fast Recompress" and video compression to x264vfw (convert to YUV, CRF=16, VirtualDub hack checked)
2. set audio encoding to "Full processing mode" and audio compression to Lame MP3, e.g. 44100Hz 192kbps CBR (or extract the audio and compress it with an external encoder)
3. encode to "01.avi" (and "01.wav" if using an external encoder)
4. open the new AVI (and WAV) file in MKVToolNix GUI, set the aspect ratio to 4:3
Then upload to Youtube.
There should be no borders to the left or to the right, unless the game put them there. If so then they would appear on a real CRT TV, and should not be removed before the 4:3 resize. Likewise with the borders on the top or bottom. But even if a game uses horz. borders it wouldn't change much since 4:3 on a 16:9 display results in horz. borders anyway.
You can use for example AvsPmod's preview function to add Crop commands to the script.
Note that you need at least 720 lines to enable HD quality and the 60 Hz functionality on Youtube.
Personally I prefer to do all my editing with Avisynth (scripting language), and encoding with VirtualDub (incl. codecs for h.264 and MP3) (or x264 (video) and lame (audio)). Never heard of PowerDirector before.
If you have a NTSC region game, the video should be 256 or 512 pixels wide and 224 or 448 lines high. This is what should be converted to 4:3. If the game adds black borders to that, it should only be removed after the 4:3 resize.
You don't. Use mkvtoolnix to convert your file(s) to an MKV file; you can specify an aspect ratio there.
This will leave the video data unmodified, but players like Media Player Classic HomeCinema will stretch it to that aspect ratio. Youtube should do the same, afaik.
Afaik with G-Sync, when the game sends a frame, the driver and the graphics card immediately pass it along to the monitor. Then all three (driver, graphics card and monitor) go idle again.
The only limiting factor is the hardware capabilities of the graphics card, the monitor, and the PC.
There's also NVIDIA Inspector.
According to this page, VD supports FFV1 with the help of FFmpeg or Libav.
I'd just install the k-lite codec pack with all options turned on, and try again.
(related?)
You can probably remove them, if you're sure that they're empty all the way through the video, and that you don't need them to get a high-quality encode on Youtube. (Youtube uses lower quality settings for videos with fewer than 720 lines.)
Personally I prefer 4:3.
Should I just use the default settings for x264vfw/H.264 for the videos? I want to get high quality without getting a huge filesize. What settings are good for low file size and high quality?
I always go with CRF 16, or a bit higher if the quality doesn't matter that much.