This is a guide intended to explain how to create and upload high quality youtube videos. I made this guide out of frustration with nearly everyone uploading poor quality youtube videos.
Software you need:
MediaInfo:
http://mediainfo.sourceforge.net/
mencoder (get mplayer non-gui)
This guide will explain how to maximize the quality of a youtube video. This does not exploit youtube in any way, it is completely legal and not a hack. This process simply maximizes the data rate of your video so that youtube doesn’t automatically re-encode your video to a low quality video.
This guide will work for people running Windows XP or Vista (x86/x64). I can see this working effectively on linux and mac as well though.
1. Preparing the source video
- First, you will need your source video.
- This should be your high quality, full size video.
- It needs to be in a 4:3 aspect ratio (i.e. if you divide the pixel width by the pixel height, you get 4/3).
- It needs to be a higher resolution (or equal) to 480×360 (if your source video has a smaller resolution than this, then certain parts of the encoding process will need to be changed, i’ll cover this if people want me to).
- You will use this video as the source for your high quality youtube video.
- (Note: Getting your source video how you want it is outside of the scope of this guide, however there are many other guides on the internet that will cover this.)
2. Preparing the utilities
- Make sure MediaInfo is installed.
- Install mencoder by downloading mplayer from the link provided, and make sure you get the non-gui version, as the gui version does not contain mencoder (which is what we need). (At the time this was written, this is version 1.0rc2)
- Once mplayer is downloaded, extract the zip to its own folder.
- In that folder, right click somewhere in the folder (not on an icon) and click New->Shortcut.
- For the location of the item, type in “cmd” and hit enter. Hit enter again for the name of the shortcut since it doesnt matter what you name it.
- Now right click on the cmd.exe shortcut in the directory you just created. You should see a textbox that says “Start in:” or maybe “Working dir” or something. Delete everything in this text box then click ok. This will change the working directory to its home directory so we don’t have to navigate to this directory when we run it.
3. Prepare the video for encoding
Now, we want to make sure our source video is in this directory with mencoder; so move the source video into this directory.
4. Encoding (and maximizing)
Encoding can be quite a time consuming process, depending on the throughput of your processor. If you have a core2 processor and are running Windows Vista x64, I don’t believe this mencoder was compiled for 64 bit instructions, so this won’t take advantage of your awesome machine. This shouldn’t be too big of a problem for just youtube videos, but if you intend on doing larger scale encoding, I recommend using something else if you’re worried about speed.
- We’re going to use both mencoder and MediaInfo sequentially and iteratively to get the maximum quality that youtube will allow for.
- First, we will use mencoder.
- Open up the cmd.exe shortcut we created, and paste this in: (but make sure to change SOURCEVIDEO.EXT to the filename of your source video, and OUTPUTVIDEO.flv to whatever you wish to name the output video, but make sure to keep .flv on the end)
mencoder SOURCEVIDEO.EXT -o OUTPUTVIDEO.flv -af resample=22050:0:0 -sws 9 -vf scale=480:-3,expand=480:360 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=300:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3 -oac mp3lame -lameopts abr:br=48:mode=3 - This will take a little bit of time to complete, depending on your computing power.
- Once it is complete, open up MediaInfo.
- Click File->Open and select the OUTPUTVIDEO.flv file you created.
- Click View->Tree and look at the General tab.
If the bit rate is greater than or equal to 350Kbps, then we need to reduce the encoding bit rate and re-encode (Check below).
If the bit rate is really close to 350Kbps, but just slightly lower than 350Kbps (like 340kbps or something), then you have a near-maximum quality youtube video you can upload.
If the bit rate is much lower than 350Kbps (like 200kbps or 300kbps), then you want to increase the encoding bit rate and re-encode (Check below).
- To re-encode at a higher or lower bit rate, change the value labelled “vbitrate=300″ in the mencoder command to either higher or lower, depending on what you need. (Probably lower is what you want)
- For example, if MediaInfo tells you that your file is about 400Kbps, we should compensate for about 50Kbps and run mencoder again like this:
mencoder SOURCEVIDEO.EXT -o OUTPUTVIDEO.flv -af resample=22050:0:0 -sws 9 -vf scale=480:-3,expand=480:360 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3 -oac mp3lame -lameopts abr:br=48:mode=3 - Notice how “vbitrate=300″ went to “vbitrate=250″ and everything else stayed the same.
- Keep repeating this iterative process until you get a bit rate of less than but almost 350Kbps.
5. Uploading
Now that your .flv video is encoded, you can upload the video to youtube. You’ll need an account to do this!
When I uploaded my video, it wouldn’t let me upload it normally, I had to click “‘Click here’ if you are having problems with the uploader”. (This might be necssary to make sure youtube doesn’t reencode your video, not confirmed though)
5 Comments
Hi,
I’ve been trying to figure this out for the past few days. Everything I upload to youtube looks terrible. I went through what you said and I’m still not real happy with the quality. My source video is:
480×360 and it’s a .mov file that is 85MB and 6min long
http://www.youtube.com/watch?v=e_8e89Ls1I8&feature=user
I don’t notice any difference in the quality if I just upload the .mov file.
Is Youtube compressing .flv file again? I didn’t get an option for “click here if you are having trouble uploading”.
HELP! thanks:)
Steve
also, is there anyway to view the .flv file before you upload it to youtube?
Yeah lots of ways. Open it with FLV.
*VLC player I meant. Or convert it to avi.
this also works if i want to convert low quality videos to high quality videos right?
or am i wrong?