TASVideos

Tool-assisted game movies
When human skills are just not enough

Deleted Pages / High Definition / How To Contribute / Old Guide

This page is deleted and archived - not a part of the current site.

Use the “page info and history” feature to peer into past versions of the page. See DeletedPages for details.
THIS PAGE IS ONLY RETAINED FOR HISTORICAL PURPOSES, IT DOES NOT COVER THE CURRENT STATE OF HIGH DEFINITION ENCODING TODO?: Delete this page?

So you've decided to assist the HDification of the published movies on TASVideos? Great! We could always use more contributors!

This guide assumes that:

Assuming you have all of the above, we can begin. First, dump the AVI from the emulator into the lossless RGB based codec as standard and open it up in VirtualDub, trimming the end for any spare frames. This is where we begin to stray off the standard path; save the AVI into a folder named Avisynth or another name of choice and open up Notepad, copy the following lines into the Notepad document and save as script.avs. The filename can be anything you want, just make sure the file extension is .avs.

#Raiscan's Magnificient Picture biggerizer.
#Upsamples an AVI Source to HD.
#ONLY FOR 2D PIXEL GAMES.
#Use this on anything else and it will be fuggin' ugly.

#VERSION 0.6

#Open the source.
a = AVISource("mixed.avi")
#Check the source is RGB. If it isn't, throw an error, because we want an RGB input.
a = a.IsRGB() ? a : BlankClip(10,800,50).subtitle("Error: Your Source is not RGB. Capture using a RGB codec such as FFV1.",0,0,0,a.framecount-1,"Arial",25,$FF0000)
#Setting the maximum possible size. The script won't resize higher than this. 
MAX_WIDTH = 1920
MAX_HEIGHT = 1080
#Get the current width of our source.
curWidth = a.width
curHeight = a.height

#This big block of code checks the dimensions of our source. If it's above or equal to our maximum dimensions,
#We do nothing. Otherwise we check various scalings until we get one which is an integer value yet still
#within the bounds of HD. If source is YUV, don't resize.
e = (a.IsYUV()) ? \
    "global b = factor(1,a)" :  \
    (curWidth >= MAX_WIDTH) && curHeight >= MAX_HEIGHT ? \
    "global b = factor(1,a)" :  \
	(curWidth*6 <= MAX_WIDTH && curHeight*6 <= MAX_HEIGHT ? \
	"global b = factor(6, a)" : \
	(curWidth*4 <= MAX_WIDTH && curHeight*4 <= MAX_HEIGHT ? \
	"global b = factor(4, a)" : \
	(curWidth <= MAX_WIDTH*2 && curHeight*2 <= MAX_HEIGHT ? \
	"global b = factor(2, a)" :  \
	"global b = factor(1, a)")))

Eval(e)

#Get the current width and height of our upscaled source.
curWidth = b.width
curHeight = b.height
#Calculate border dimensions. We want to pad out any space left that the resize did not fill.
borderWidth = (MAX_WIDTH - curWidth)/2
borderHeight = (MAX_HEIGHT - curHeight)/2
#Add the border (unless source is YUV)...
c = (a.IsYUV()) ? b : \
b.AddBorders(borderWidth, borderHeight, borderWidth, borderHeight)
#...colour convert to prevent bleeding...
c = c.ConvertToYV24(chromaresample="point").ConvertToYV12(chromaresample="point")
#...and return the finished product.
return c


Function factor(amt, a)
{
	b = a.PointResize(a.width * amt, a.height * amt)
	return b
}
The above script automatically upscales the video to HD. Optimal resizing is automatically selected so that the video is smaller than 1080p, then borders are added to make it 1080p.

Put the .avs file in the same directory as the video you wish to upscale and either rename the avi to "mixed.avi" or modify the above script in notepad so that the following line:

a = AVISource("mixed.avi")
is changed to match your avi's filename.

Next, open the avs you have made in VirtualDub. You should encounter no problems. From here, save the result into the lossless H.264 codec and make sure that the logo combiner is set up with an appropriate logo for you to you (It is assumed you already know how to do this).

When the video is combined (This should take a while, 10 frames per second on my computer), run the mixed AVI through the following script.

x264.exe --qp 1 -b 0 --threads 2 --keyint 600 --output encodedboth.mp4 mixed.avi

You can set the keyint much higher (Assuming it is a single part video) but for the sake of simplicity, lets not bother setting it higher, the filesize benefits aren't that worth it considering it will take a while to upload anyway.

While the video is encoding, extract the WAV from the mixed AVI using VirtualDub (This is my time management side speaking, you can do it whenever the hell you want) and save it into the appropriate place, it isn't worth reencoding it because even if it was, the file will be huge anyway. FLAC encoding can be used if you really want to anyway, YouTube processes it correctly.

When the video finishes encoding, mux the WAV and MP4 into an MKV; MP4 isn't compatible with having WAV data muxed into it. It is worth noting that tests using AVI files haven't been conducted yet.

When that is done, give yourself a pat on the back and upload the video to the Streaming Media website, be sure to follow the StreamingMedia guidelines for the website that you upload to.

When all is done, post a link to the video inside the topic and see about getting vested editor powers from an admin after a few video uploads.

For movies longer than 10 minutes, you will want to use the MKV splitter to split the MKV into multipart segments, we suggest 8 minute segments.

When that is all done, amend the High Definition page with your movie (Assuming it is published) and post links to your upload in the games Submission topic.

Special thanks is given to sgrunt and OmnipotentEntity for their parts in making the guide. With particular thanks given to Raiscan and Aktan for creating the heavily revised script.

TODO: Write a section of the guide dedicated to Nintendo DS HD encoding, perhaps create another sub-page?


Combined RSS Feed
DeletedPages/HighDefinition/HowToContribute/OldGuide last edited by Flygon on 2010-09-19 12:58:47
Page info and history | Latest diff | List referrers | View Source