[Tutorial] Encoding in X264 | HD

preview_player
Показать описание
[Update - 7/16/2010]

[Update - 1/08/2010]

[Update - 12/19/2009]

Commenting:
Feel free to post questions and suggestions in a friendly manner. Failing to do so will get your comment removed.

First and Foremost:
My apologies for the black bars on the side of the video. My native screen resolution is 1680x1050 16:10 and youtube displays videos at 16:9. I didn't want to change the aspect ratio as I feel that would make the video look a bit unnatural - hence the black bars.

This is just a quick tutorial, for starters, on how to encode in X264 using MeGUI. This tutorial isn't meant for those who already know what they're doing, but you are all welcome to leave comments and criticisms regarding my video. I certainly hope this video comes in handy for those who are completely lost and just want to get started. Below, I've listed some important information regarding the process of encoding in X264 that I also go over in the video.

Tutorial Encoding x264:

Software:
1. Sony Vegas
2. MeGUI
3. AviSynth

Links:
Steps:
1. Install MeGUI, AviSynth
2. Install MeGUI Profiles. Also updates itself
3. Render video in Sony Vegas (Video Only - AVI\Huffy)
4. Render audio in Sony Vegas (Audio Only)
5. Create Synth script (*.avs).
Two Ways:
1) Write your own script according to Crest:
Write:
"Directshowsource("FILE NAME.avi")
ConvertToYV12()
2) Use the script creator in MeGUI

Note: AviSource vs. DirectShowSource: Wiki says to use AviSource before using DirectShowSource. Usually, only use DirectshowSource when you're using files AviSource can't read such as DirectShow-only Codecs

6. Multiplex your Audio and Video

Notes:
1. Try not to change the resolution of your principle footage.
2. If you must change the resolution, try not to change the aspect ratio of your footage

Vimeo Version:
- Vimeo has a download link to the source as well

[Sidenote]
You MUST render the audio and video separately. Rendering straight to MP4 will NOT multiplex your audio for you - regardless of what others say.

[Troubleshooting]
If you are having any problems and would like to ask me for help, please send me your log. Please follow these steps:
1. The moment you have an error rendering your video, go to the "Log" tab in MeGUI
2. Right click anywhere in that window. Select Save, Log
3. Find your log file and copy all the text in it
4. Send it to me via youtube message, with a brief description of the problem, including any error messages that pop up.
5. I'll try to get back to you as soon as possible with an explanation of the issue and a possible solution

Remember, I can only help you as much as you let me. The more information I get, the better. Don't simply tell me "it doesn't work."
Рекомендации по теме
Комментарии
Автор

Just one suggestion: If you're not aiming for a very specific filesize (burning to optical media like CD/DVD/BD) then there's really no reason to do a 2-pass encoding, it just wastes time. Use CRF instead (lower value means better), here you enter a quality value and x264 decides on it's own what bitrate it uses to reach the quality you entered. Personally I'm using CRF 19 for HD material and 16-17 for SD and below for a visually transparent encode. One can always go higher or lower of course.

bla
Автор

Agreed. The side panel next to the youtube video has been stating that the Lagarith Lossless Codec is preferred over Huffy for some time now.

heliosk
Автор

The Lagarith codec achieves higher compression ratios than Huffy in most cases. You can explore the mathematics behind its algorithm on the official website or on multimediaWiki.

Furthermore, Lagarith allows you to encode videos in the YV12 colorspace, which will allow you to skip the color-space conversion during the x264 encoding.

But, feel free to use any lossless codec to render your media files from a video editor.

heliosk
Автор

Thank you so much! The whole convertion thing seemed so intricate until I watched this video.

PlatonicWanderer
Автор

6:05 - During ten seconds I was like a kid in a candy store, exited by a video tutorial about the different options and advanced settings with x264... and then at 6:12 you just broke my dream lol. I was like "NOOoooo!!!" Oh well, too bad... damn you! lol

NetTubeUser
Автор

@x0fiz You can use whatever you want. Huffy is an lossless compression format. You can also use Lagarith Lossless Video Codec.

heliosk
Автор

Thank you for bringing the broken link to my attention. It has been fixed.

heliosk
Автор

Agreed on:
- 2-pass encoding is used in the context of a specific file size
- CRF being a better rate-control method when file size isn't important

heliosk
Автор

THANK YOU...finally a tutorial that was made by a professional (or atleast you sound professional)...im tired of watching other useless tutorials made by 12 year olds that lead to nowhere

Piece_of_Sheet
Автор

I believe it's best to use whatever tool best fits your needs.

If encoding your media using MeGUI fulfills your needs, then use it. If StaxRip fulfills your needs, then use that.

heliosk
Автор

You either need to:
1. Download the profiles manually and install them.
2. Update MeGUI and have it install your profiles. This is done during the update when you see a window pop-up and a series of check-boxes associated with each profile.

heliosk
Автор

@x0fiz You cannot deem raw, uncompressed video as "lossy" or "lossless". Lossy and lossless describe compression algorithms and methods. So if you are not compressing your video stream, you don't have to worry about the quality of the video.

heliosk
Автор

@HDRoppiN A "codec" stands for "compression/decompression" which a compressed video file contains. Some are better than others at compressing video to a small file size while keeping descent quality of the video. All compressed video losses some image quality, but the higher the bit rate the better. Uncompressed video files offer the original quality of the video and is best by far, but causes the video file to be extremely huge. Uncompressed video = no codec.

bobbyknight
Автор

really nice work, very nice tutorial, Now what was hard to do before now is like basic of moviemaking...good job m8

Pedjo
Автор

There is an option called the "One Click Encoder" that is under the tools menu. You can load in your video source, your audio source, and your target profile.

From my understanding, you just click "Go!" and let it fly.

I would not recommend it because it gives you the least amount of control over the video encoding options.

With an AVS script, you can apply all types of filters to post-process your video

heliosk
Автор

MeGUI has the AVS Script Creator. It's under the tools menu. This was covered in the tutorial at 3:57

heliosk
Автор

@HDgameplay23 You have two options. You can try using an older version of Huffy or you can use the Lagarith Lossless Video Codec instead. I would choose the latter.

heliosk
Автор

I don't know the specific details behind those three different profiles, but you can view them in the config window. In general, encoding anything for bluray will probably take a long time.

heliosk
Автор

You have to update MeGUI. During the update process, a pop up will come up asking if you want to override several profiles. By default, they are NOT selected and you must select them manually. If you have already updated MeGUI and forgotten to allow MeGUI to override your profiles, you will need to go to megui(dot)org(slash)auto and download the latest "x264_presets" zip file. After you've done that, you can move that file to the megui profile folder that's located in the install directory

heliosk
Автор

It's up to the user to decide if using VirtualDub or MeGUI best fits their needs. This tutorial is not meant to advocate for MeGUI or suggest in any way that there is only one method to encoding in X264. If you want to know the advantages of VirtualDub or MeGUI, please visit their respective websites.

Personally, I have not used VirtualDub; that is why this tutorial features MeGUI.

heliosk
visit shbcf.ru