Difference between revisions of "General advice"

From SDA Knowledge Base

Jump to: navigation, search
(Expected final results for self-encoded runs: MQ = D4)
(Expected final results for self-encoded runs)
 
(8 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
===Expected final results for self-encoded runs===
 
===Expected final results for self-encoded runs===
  
If you take a look at Nate's encoding work for SDA, you see that there are usually six different quality versions for each run (don't worry about Flash). While it is a fair amount of work, don't be intimidated; you'll probably only have to create two different AviSynth scripts: one to take care of LQ/MQ, and one for HQ/IQ. It's rare that you will need different scripts for LQ and MQ.
+
LQ/MQ/HQ are required for submission. IQ/XQ are optional but recommended for videos with high resolution/framerate.
  
Editing your run will be the hardest part, but once you've got your scripts ready to go, you will see that compressing your run in MeGUI is quite easy. You can even encode the LQ/MQ XviD versions though MeGUI.
+
Refer to the [[Glossary of terms]]:
 
+
Expected final results, refer to the [[Glossary of terms]]:
+
  
 
<table cellspacing=0 cellpadding=5 border=1 style="border-collapse:collapse;border:1px solid #BBBBBB;" border=1 bordercolor="#BBBBBB">
 
<table cellspacing=0 cellpadding=5 border=1 style="border-collapse:collapse;border:1px solid #BBBBBB;" border=1 bordercolor="#BBBBBB">
Line 21: Line 19:
 
     <th>Framerate</th>
 
     <th>Framerate</th>
 
     <th>Resolution</th>
 
     <th>Resolution</th>
  </tr>
 
  <tr>
 
    <td>LQ</td>
 
    <td>Xvid / DivX</td>
 
    <td>128</td>
 
    <td>MP3</td>
 
    <td>64</td>
 
    <td>F2 / F3</td>
 
    <td>D4</td>
 
  </tr>
 
  <tr>
 
    <td>MQ</td>
 
    <td>Xvid / DivX</td>
 
    <td>512</td>
 
    <td>MP3</td>
 
    <td>64</td>
 
    <td>F2 / F3</td>
 
    <td>D4</td>
 
  </tr>
 
  <tr>
 
    <td colspan=7>- DivX is no longer required for submission to SDA.<br />- While DivX is allowed, it is recommended to use the Xvid codec since it is free and has better quality than DivX.</td>
 
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 50: Line 27:
 
     <td>64</td>
 
     <td>64</td>
 
     <td>F2 / F3</td>
 
     <td>F2 / F3</td>
     <td>D4</td>
+
     <td>D4 / 240p</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 62: Line 39:
 
     <td>64</td>
 
     <td>64</td>
 
     <td>F2 / F1</td>
 
     <td>F2 / F1</td>
     <td>D4</td>
+
     <td>D1 / 480p or D4 / 240p</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 74: Line 51:
 
     <td>128</td>
 
     <td>128</td>
 
     <td>Highest achievable</td>
 
     <td>Highest achievable</td>
     <td>Highest achievable</td>
+
     <td>D1 / 480p or D4 / 240p</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td colspan=7>- Resizing to standard definition is recommended if your source video is high definition and 2048 kbps is not enough.</td>
+
     <td colspan=7>- No High Definition.</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 86: Line 63:
 
     <td>320</td>
 
     <td>320</td>
 
     <td>Highest achievable</td>
 
     <td>Highest achievable</td>
     <td>Highest achievable</td>
+
     <td>Maximum 720p (1280x720) (1368x768 is allowed)</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td colspan=7>- Recommended for D1/F1 video.</td>
+
     <td colspan=7>- IQ is HD 720p but includes D1. Do not exceed 1368 width or 768 height.</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 98: Line 75:
 
     <td>320</td>
 
     <td>320</td>
 
     <td>Highest achievable</td>
 
     <td>Highest achievable</td>
     <td>Highest achievable</td>
+
     <td>Native resolution (HD or greater)</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
     <td colspan=7>- Recommended for High Definition video.</td>
+
     <td colspan=7>- For native resolution, greater than IQ and <u>not</u> limited to 1080p.</td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
  
 
+
<font color="red">
<font color="red"><b>Note:</b> H.264 is not allowed inside the avi container. Use MeGUI or Anri-chan for the mp4 container.
+
* Xvid/DivX is no longer submittable
All H.264 .mp4 files are expected to be compatible with QuickTime. Opening and playing in QuickTime counts as "compatible."</font>
+
* H.264 is not allowed inside the avi container. Use MeGUI or Anri-chan for the mp4 container.
 +
* LQ, MQ and HQ H.264 .mp4 files are expected to be compatible with QuickTime. Opening and playing in QuickTime counts as "compatible."
 +
</font>
  
 
<br>
 
<br>
Line 128: Line 107:
  
 
[[Image:ghostingexample.jpg]]
 
[[Image:ghostingexample.jpg]]
 +
 +
[[Field_Blending | More details on field blending...]]
  
 
<br>
 
<br>

Latest revision as of 13:39, 8 March 2014

Introduction

This page is for advice / tips / tricks related to everything in the knowledge base.


Expected final results for self-encoded runs

LQ/MQ/HQ are required for submission. IQ/XQ are optional but recommended for videos with high resolution/framerate.

Refer to the Glossary of terms:

Quality Video codec Video bitrate
(kbps)
Audio codec Audio bitrate
(kbps)
Framerate Resolution
LQ H.264 128 AAC 64 F2 / F3 D4 / 240p
- F3 framerate is to preserve flickering effects, e.g. Mega Man getting hit.
MQ H.264 512 AAC 64 F2 / F1 D1 / 480p or D4 / 240p
- With the extra bitrate, you can use F1 instead of F3 to preserve flickering effects and still have good quality picture.
HQ H.264 2048 AAC 128 Highest achievable D1 / 480p or D4 / 240p
- No High Definition.
IQ H.264 5000 AAC 320 Highest achievable Maximum 720p (1280x720) (1368x768 is allowed)
- IQ is HD 720p but includes D1. Do not exceed 1368 width or 768 height.
XQ H.264 10000 AAC 320 Highest achievable Native resolution (HD or greater)
- For native resolution, greater than IQ and not limited to 1080p.

  • Xvid/DivX is no longer submittable
  • H.264 is not allowed inside the avi container. Use MeGUI or Anri-chan for the mp4 container.
  • LQ, MQ and HQ H.264 .mp4 files are expected to be compatible with QuickTime. Opening and playing in QuickTime counts as "compatible."


Never use single-pass bitrate mode

When encoding your run, never use single-pass bitrate mode. Two-pass bitrate mode is preferred because the first pass analyzes the video, seeing which parts need more bits to look good and which parts need less while still looking good. The second pass does the actual encoding. So you see, single-pass bitrate mode will produce sub-par quality because it encodes the video blindly.

Do not confuse single-pass bitrate with single-pass quantizer mode. While the former should never be used, the latter is a valid option and is sometimes used by folks at SDA. Don't worry about it though, the guides will always recommend that you use two-pass bitrate mode.


VirtualDub: Blending is not the best option

Noblend.png


Never deinterlace your video by blending the fields together. Yes, it says "best" next to it, but that's a relative term. Blending takes each field in a frame, stretches them vertically and then applies one on top of the other at half opacity. The result is loss in vertical detail and ghosting. What is ghosting? Well think about it, field 1 happens at a certain point in time, field 2 happens a split second later. So when the fields are blended together, you can see two moments in time in the same frame. Ghosting is most obvious in scenes with lots of motion. Look at the following example where Kratos is kicking the statue to the right. That statue doesn't look too good, does it?


Ghostingexample.jpg

More details on field blending...


Running VirtualDub(Mod) in low priority mode (Windows)

One nice feature of MeGUI is that it runs by default in low priority mode. We can do the same with VirtualDub(Mod), but it must be done manually. Setting a task to low priority will allow you to run other things that run at normal priority without computer lag. Basically, you'll be able to browse the internet, play music, etc while encoding your run without any computer lag. Very convenient! There are two ways to accomplish this.

Method 1. The temporary way... With VirtualDub(Mod) running, press ctrl+alt+delete on your keyboard to bring up the Windows Task Manager. Go to the Processes tab and look for the program. Once you find it, right-click on it and set it to low priority.

Method 2. The better way... Create a shortcut to the program if one does not already exist. The following steps assume you don't have one.

  • Navigate to the VirtualDub(Mod) folder, should be in "C:\Program Files\".
  • Right-click on VirtualDub(Mod).exe and select the Create Shortcut option.
  • Move the shortcut somewhere more convenient, the desktop is good.
  • Right-click the shortcut and select properties.
  • Click on the Shortcut tab.
  • In the target box, type the following in:
C:\WINDOWS\system32\cmd.exe /c start "VirtualDubMod" /low "C:\Program Files\VirtualDubMod\VirtualDubMod.exe"

This example is for VirtualDubMod, remove the "Mod" for regular VirtualDub.


Finding frame numbers for the Trim command

VirtualDub(Mod) beats Avisynth in this aspect. To find the range of frames for your cut, open your avs file in VirtualDub(Mod) and look at the frame numbers at the bottom of the screen. Plug those into the Trim() command.


d2v file path

If you're working with DVD source material and have created your DGIndex project file (the d2v), you may get problems if you move your source files around. This is because the d2v file is using an absolute file path. There are two ways to solve this problem.

1. Open DGIndex, go to the Options menu and deselect Use Full Paths. Future d2v files will use relative paths.

2. Open the d2v file in Notepad or any text editor. The third line should have the path to the source file, change it to your liking.


Keep your source files

This rule should be followed especially by people new to encoding. Chances are you will mess up, not following SDA's strict standards and be asked to redo your encodes. Try as hard as possible to backup your source files somewhere, even if you've encoded your run properly and it's already up on SDA. Burning your data to DVD discs is a good idea. Use lossless compression if needed. At the very least, encode your run with a very high bitrate in Xvid/H.264, but beware that these codecs use the YV12 colorspace and could mess up your interlaced source material. The next section explains why.


Never convert to YV12 colorspace before deinterlacing

Compare the following two avisynth scripts in VirtualDub(Mod) to see why. No actual deinterlacing is done, but you can see how the color is messed up in the second script.

color1=Blankclip(pixel_type="yuy2",color=$800000).assumefieldbased() 
color2=Blankclip(pixel_type="yuy2",color=$80FFFF).assumefieldbased() 
interleave(color1,color2).weave
color1=Blankclip(pixel_type="yuy2",color=$800000).assumefieldbased() 
color2=Blankclip(pixel_type="yuy2",color=$80FFFF).assumefieldbased() 
interleave(color1,color2).weave
ConvertToYv12()

Wouldn't want to deinterlace that...


Preview avisynth scripts in Media Player Classic

When creating your avisynth script, it is possible to preview your work by playing the avs file directly in Media Player Classic, instead of encoding it first and then playing it. Of course, whether or not you can play it live without lag depends on how fast your computer is. Don't expect smooth playback if you're deinterlacing your video with mvbob. Though for the purpose of previewing you can try replacing mvbob with the faster leakkernelbob.


Save time with MvBob

MvBob is a very slow deinterlacer. When encoding the HQ and IQ versions, you typically do two-pass encodes for each. This means you'll be mvbob'ing your video four times! It only needs to be done once! You can save time by encoding a new mvbob'ed source file to lossless format (HuffYuV, Lagarith) and loading that into a new script.


DivXlogo.jpg

You may have noticed the DivX logo showing up in videos at the bottom right corner. This thing is ugly, and must be turned off! Navigate to where you installed DivX and look for the file named config.exe, it should be in the "C:\Program Files\DivX\DivX Codec\" directory. Run it. In the decoder tab, turn off the option "Support decoding for Generic Mpeg-4 video". In the toolbar tab, turn off the option "Show DivX logo watermark". Click ok.

(or hell.. just uninstall the damn thing. Xvid ftw!)




Check encoder settings used in mp4

Here is a quick way to check the settings that were used in an H.264 file created by MeGUI/x264.

  • Create a text file.
  • Open it in Notepad or any other text editor.
  • Paste the following code inside:
find "options" %1
pause
  • Save and close.
  • Rename the extension from txt to bat.
  • Drag the mp4 onto the batch file.
  • You should get something like this:

Cmdx264settings.png


Load H.264/AAC MP4 in VirtualDub(Mod)

To import H.264/AAC video into VirtualDub(Mod) you'll need to install Avisynth and FFDShow. When installing FFDShow you can just use the default installation settings. Once installed, go to Start -> Programs -> FFDShow -> Video Decoder Configuration. In the decoder tab click on the codecs section; it's probably already selected. Look to the right for H.264 and set it from disabled to libavcodec.

FfdshowH264.png

Personal tools