From Fraps to YouTube (work in progress)

by Zacariaz

YouTubeMany have discovered the fantastic piece of software called Fraps, which enables you to record game videos and similar, and many have tried and failed to get their hard work on YouTube in a reasonable quality. After days of research trying just about everything, I may just have the answer for you.

frapsInstead of rambling about how much trouble I have had getting this to work, I’ll get right to it. First of all you need to acquire Fraps. It’s available for free, albeit with rather annoying limitations, but you can try it out and if it works for you, it really isn’t that expensive.

When that is said and done you need to go record some material, but first a few pointers:

1. If at all possible, record at 30 frames per second. Less will do if necessary, but more will not benefit you in relation to Youtube.

2. Do not force lossless RGB capture. It will come back to haunt you later if you do.

3. Use only 16:9 standard resolutions: 1920*1080, 1280*720, 854*480, 640*360 or 426*240. My recommendation is to not go below 720p.

If you follow these simple rules, you should have no problems with the next steps an it shouldn’t take long to record some video for testing purposes.

 

Preparations

VirtualDubNow that you have finished recording, you should be able to find some rather large video files in your Fraps folder and if you have recorded long enough, there will be multiple files, but don’t worry, we’ll fix that in a moment.

Before we can go on you will need to download VirtualDub and don’t worry, we will only be using it for two simple task that has little to do with the actual encoding.

When you have downloaded it, simply extract it and execute virutaldub.exe, or veedub64.exe, should you have opted for the 64 bit version.

Next step is to go to File > Open. find the first part of your video and open it. You may have noticed that the file names Fraps generate aren’t too easy to comprehend at first sight, but in reality it’s not that hard.

Name of the application you have recorded from followed by year, month, day, hours, minutes, seconds and 1/100 of seconds (I think). If you just keep your atention on the minutes and second, it shouldn’t be hard to determine which file was the first.

When you have opened the first file, you simply go back to File > Append AVI segment, find the next part and open it. Repeat until all the files have been opened and posibly play a little with the slider at the bottom, to ensure that it is all in the right order.

Next we want to rip the sound, which is done simply by going to File > Save WAV.

Lastly we need to save the video to one file without actually altering anything. This is done by choosing the option Video > Direct Stream Copy and while you’re at it you might as well choose the option Audio > No audio as we won’t be needing it embedded in the video at this point.

Lastly go to File > Save as AVI and save the video.

 

The long and tedious encoding process

x264Now it’s time to take those gigabytes of video and compress them, and for that purpose we need the x264 encoder. If you choose the 32 or 64 bit version doesn’t really matter.

Now simply open a command prompt, find your x264.exe and do the following:

x264 –bitrate 5000 –output-csp i420 –bframes 2 –b-adapt 2 –keyint 15 –ref 3 –output “output.mp4″ “input.avi”

The above is for 720p video. For 1080p a bit rate of 8000 is recommended. More on that at YouTube.

The rest of the options are non to obvious and even though I know what they do, I really don’t know what they do. All I know is that they adhere to the recommendations set forth by YouTube.

neroOf course we also need to do something about the audio and for that purpose you need the Nero AAC Encoder, which is free for non commercial purposes. This time you should end up with 3 executables, but you only need the one named neroaacenc.exe.

Open you command prompt again and execute the following:

neroaacenc -br 384000 -2pass -lc -if input.wav -of output.mp4

Again we adhere to the recommendations. 384Kbit and LC (low complexity). The -2pass option is my own doing and is not needed, but it is the proper way of doing things I think.

 

Putting it all together

Assuming that everything has gone to plan, you should be left with two MP4 files of the same length. One is a video file compressed with the H.264 codec and the other is and audio file compressed with the AAC codec.

Obviously we want these two files to become one, which is easily done with MP4Box so download it and get your command prompt ready.

The command needed is as follows:

mp4box -add input_video.mp4 -add input_audio.mp4 output.mp4

And that’s basically it. You should now be left with one file named output.mp4 which is ready for YouTube.

 

All that work for this?

The sad reality of things is that when the video has been uploaded to YouTube, it will once again be subject to alterations that is beyond our control, thus you should not be too disappointed it you experience a drop in quality.

In my experience the best way of handling any such problem, is actually in the editing phase, which is beyond the scope of this tutorial, but is doable in virutaldub, to a certain extend at least. You may for example have an verydark video, which is not something that YouTube likes, but this can of course be changed before the encoding process.

 

This tutorial sucks!

Hmm… I might have to agree with you on that part, but it is on purpose.

The fact is that this is a rather advanced subject that don’t end with this tutorial. You will likely be reading a lot more about the subject after reading this, in hopes that you may be able to tweak various settings, which is as it should be, so you can understand that if you can not handle the command prompt, manage where to save your files, what to name them and so on and so forth, then this topic is too advanced for you, at least for the moment.

 

This is the end of this tutorial for now, but as I learn, I will return at revise it. I would for example like to find a command line alternative to VirtualDub, that way people can begin to make automated scripts. I would also like to do multipass video encoding to further bring down the size, though for now I haven’t figured out how.

It took me many hours to get to this point and I will get further. I only hope that it’ll benefit not only my self, but you as well.

 

Should you have questions, I’ll try to answer, and should you have suggestions, I’ll be happy to listen. Simply write a comment at your earliest convenience and I’ll answer as soon as possible.

 

Best of luck and best regards.