E. Encoding

After exporting your AMV from the editing software using UtVideo RGB video codec, it is recommended that you use AviSynth to handle the color space conversion to YUV so that you can insure the correct color matrix is used. If your video is standard definition you will need to use the Rec.601 and if your video is high definition you will need to use Rec.709. Using the incorrect color matrix will affect how the colors are displayed during playback. Mac users will also need to recontainer their exported lossless MOV into an AVI container.

Need the software mentioned in this guide? Visit the Setup Guide for more information.

Encoding Options After Preparing Script:
A. FFmpegYAG
B. Zarx264GUI

Recontainer Video (Mac Only)

  1. Open the FFmpegYAG software.
  2. In the “Select Video Converter” window select ffmpeg.exe and click OK.
  3. In the main window click the “Add Task(s)…” button.
  4. Select the AMV.mov file and click Open.
  5. In the main window type “avi” in the Format drop down box.
  6. In the Video section, select “copy” in the Codec drop down box.
  7. In the Audio section, select “copy” in the Codec drop down box.
  8. At the bottom of the main window click the Encode button.
  9. Once the process finishes you can exit the FFmpegYAG application.

Result:
You will have AMV.avi to use with an AviSynth script.

Setup AviSynth Script

  1. Open AvsPmod then go to File > New tab and then go to File > Save script as…
  2. Browse to the directory where the AMV.avi is located then save the script as AMV.avs.
  3. In AvsPmod use one of the following examples:
    Standard Definition Example

    #Input video
    AviSource("AMV.avi")
    #Changes color space to YV12 using the Rec.601 color matrix
    ConvertToYV12(matrix="Rec601")

    High Definition Example

    #Input video
    AviSource("AMV.avi")
    #Changes color space to YV12 using the Rec.709 color matrix
    ConvertToYV12(matrix="Rec709")

    (NOTE: It is important when converting the video’s color space to YV12 for encoding that you use the proper color matrix so that the colors will be decoded properly during playback.)

  4. Go to File > Save script, then close AvsPmod.

Result:
You will have AMV.avs to use with encoding software.

A. FFmpegYAG

  1. Open the FFmpegYAG software.
  2. In the “Select Video Converter” window select ffmpeg.exe and click OK.
  3. In the main window click the “Add Task(s)…” button.
  4. Change “Files of type:” to “All Files (*.*)”.
  5. Browse to the folder where AMV.avs is located, select it, and click Open.
  6. In the main window select “mp4” in the Format drop down box.
  7. Right click on the Video text.
  8. In the “Main Menu” go to Presets, then click AMV Deluxe.
    NOTE: If not using FFmpegYAG included with AMVpack, use the following settings:
    Video Settings

    Codec: libx264 -preset:v slower -tune:v animation -pix_fmt yuv420p
    Bitrate: -crf 18
    Frame Size: no change
    Aspect Ratio: no change

    Audio Settings

    Codec: libfdk_aac
    Bitrate: 192k
    Frequency: no change
    Channels: no change
  9. At the bottom of the main window click the Encode button.
  10. Once the process finishes you can exit the FFmpegYAG application.

Result:
You will have AMV.mp4

B. Zarx264GUI

  1. Open Zarx264GUI, then click on the yellow folder next to “Input Video”.
  2. Browse to the folder where AMV.avs is located, select it, and click Open.
  3. CClick the “Encode” button in the bottom right corner.

Result:
You will have AMV.mp4