|
Register | Projects | FAQ | Members List | Calendar | Today's Posts | Search |
|
Thread Tools | Display Modes |
|
12-24-2009, 07:39 AM | #1 | |
Initiate
Join Date: Oct 2008
Posts: 2
|
Guide: Sony Vegas x264 Encoding tutorial
Copied from my OP at http://www.numen-guild.com/forum/vie...php?f=2&t=2010
Since I've seen many wow videos that were either poor quality or with good quality a way too big filesize I wanted to show you how to make decent looking videos with an appropriate filesize using the x264 codec. What you need: Sony Vegas up to Version 8.0b Debugmode frameserver Avisynth Simple x264 launcher mkvtoolnix When you install the Debugmode frameserver make sure to select the sony vegas plugin. The simple x264 launcher you can just extract anywhere you want. Vegas Output When you render your video first render the audio to a seperate file. Select MainConcept AVC/AAC (mp4) as type and then click Custom... and create a new template. Make sure you uncheck the option to include video. On the audio tab select 44100 or 48000 Hz as sample rate, depending what your source is and the bitrate should be 128k, you could of course go higher, but I haven't heared any difference so far. Then you save it and let it render. Now you render the video, select DebugMode FrameServer (avi) as type and for reasons you can see later just name the file untitled.avi. Leave the settings you see when you click save just as in my screenshot. Script Creation Then it begins to frameserve and you can create a Avisynth script. Open Notepad or any other editor and write: Code:
AVISource("C:\Users\Gabor\Desktop\untitled.avi") Code:
LanczosResize(1920, 1088) Then I save the file as untitled.avs x264 Launcher settings Next I open the launcher.exe from the x264 launcher. As source I select the just created avisynth script. You can also select the output container, but to mux it later using mkvtoolnix you should select either Matroksa(.mkv) or Raw H.264 data(.264). Now comes the important part, the compression settings. As I don't care about filesize (well to an extent, but as long as it is under 1gb I don't care) I select CRF as mode, that means you set a quality and the application decides what bitrate to use, so your videos will always have the same quality. Under Quantizer/CRF I select something between 24 and 26, 23 is the default and it can be between 0 and 51, with 0 being lossless and 51 worst quality. But when doing some test encodes I didn't notice any difference up to 26 and it still looked good, you can of course go lower, but that's totally up to you and I'd do a few samples with different CRFs when encoding for the first time, so you can choose what value to go for. As preset I choose slower, because in this mode the preset doesn't effect quality but only final filesize I chose a good tradeoff between the default(medium) and the best compressed(placebo) and I really wouldn't choose any slower setting as you will only have minimal decrease in filesize for 2-3* longer rendering time. Under Tuning I select none as this isn't a real movie/anime or grainy footage. And for the profile I select the high profile, this setting is only important if you want your video to play on anything other than PC (PS3, Xbox360, ipod etc) but at that resolution you probably want it only to play on systems that support high anyway. If you want your video to be DXVA compatible you have to specify some custom parameters, for my video that would be: Code:
--level 4.1 --ref 4 --vbv-bufsize 50000 --vbv-maxrate 62500 Quote:
When you have set your stuff, you click start and it will begin the encode. Remember to not close Sony Vegas or the Frameserver during all that time. When you're done encoding close the launcher. Now you can also close vegas and the frameserver. Muxing Open Mkvmerge GUI (mkvtoolnix) and add your created videofile (Important this is not the untitled.avi it is either a .264 or .mkv file) If you created a .264 file you get this message: That means you have to specify the framerate manually so you have to know what fps you set in vegas and then select the videotrack and go to the Format specific options tab and select your fps. Then you add your audio and if you have multiple audiotracks it might be handy to select which one is default and also a name for it like the genre (Rock, Trance, Ventrilo etc.) Then you specify the final output name and destination and click Start muxing, that will take about 10 seconds and then your done and have a good looking video. Last edited by izolight : 01-10-2010 at 02:17 AM. |
|
12-30-2009, 12:58 PM | #2 |
Member
Join Date: Jun 2009
Posts: 31
|
"a way too big filesize" seems a bit too subjective, especially since later in your guide you suggest 1gb to be an ok filesize; 1gb may be alot for certain people.
I noticed you suggested to do quantizer/CRF compression... what makes that better than multipass compression? I thought it was like outdated now that multipass options are available. Generally a pretty good guide, but imo too much information/control the average machinima maker needs. Most people will be happy enough with the quality they get from clicking the Render As button in SVP and then just selecting x264 as the codec. |
12-30-2009, 10:47 PM | #3 | |
Initiate
Join Date: Oct 2008
Posts: 2
|
Quote:
Lord Marrowgar video: ~8700 kbit/s Lady Deathwhisper video: ~8000kbit/s Gunship Battle video: ~5500 kbit/s Deathbringer Saurfang video: ~4000kbit/s So this should be pretty much the range one can expect with that crf and resolution as the first video has much (camera)movement and fancy effects like the fire on the ground that eat bitrate while the last one is pretty much just one perspective without much happening. Well the advantage of crf compared to multipass is, you always have the same quality, whereas you have to tweak the bitrate a bit according to your footage with multipass and in most cases you don't have to hit a certain filesize so there is no need for multipass. And crf is also a bit faster than 2pass. I know that there is also an option in sonyvegas for x264 if you have the vfw codec, but 1st you can only choose avi, which wasn't supposed to have avc content in it and has a bit too much overhead compared to mkv and mp4. Also the vfw version of x264 is very outdated and doesn't include at least 2 new algorithms which really improved the quality/bitrate. Also it is actually less work than it looks at first because it is basically just clicking render on vegas and then encode on the x264 gui and the muxing part because most times your settings will be the same. Last edited by izolight : 12-30-2009 at 10:53 PM. |
|