Handling MKV & MP4

This section will explain how to prepare the video in MKV & MP4 containers and get it ready to use with video editing software. If your software supports the importing of MP4 video files and your video is in a MKV container, you can follow the first set of instructions. If you need to or prefer to convert your source to AVI, you will need to read second set of instructions.

IMPORTANT: Make sure the full path of the directory that you work out of does not contain any unicode characters as it will cause errors when using AviSynth!

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

NOTE: It is highly recommended that you convert the source to lossless AVI files to work with as it will improve the efficiency of the footage in the editing software.

Footage Handling

I. Recontainer MKV to MP4

NOTE: If the video is Hi10P (10-bit) you will be required to convert it to AVI to use it with your video editing software unless you are working with Adobe CC 2015 or higher!

  1. Rename file to video.mkv to avoid unicode characters in the file name causing problems.

  2. Open the AMVtool software.

  3. In the main window click the “Add” button.

  4. Select the “_t##.mkv” file and click Open. (NOTE: If you have more than one file to recontainer, make sure to add them all before proceeding!)

  5. In the main window click the “Configure All” button.

  6. In the Configure dialog box on the Video tab click the “Copy Compatible (Recontainer)” checkbox.

  7. In the Audio tab change Use Stream to "None" then click "OK".

  8. In the main window click the “START” button.

  9. Once the process finishes you can exit the AMVtool application.

Result: You will have video.mp4 which will be usable with editing software.


II. Convert MKV/MP4 Files to AVI or MOV

A. AMVtool (Basic)

NOTE: If you need to clean up the video footage you will need to use the advanced method.

  1. Open the AMVtool software.

  2. In the main window click the “Add” button.

  3. Select the “_t##.mkv” file and click Open. (NOTE: If you have more than one file to convert, make sure to add them all before proceeding!)

  4. In the main window click the “Configure All” button.

  5. In the Configure dialog box change “Container:” to “AVI” or "MOV".

  6. Change "Codec" drop down to either "DNxHR", "ProRes", or "UT Video".

  7. Click the “Audio” tab and change “Use Stream:” to “None”.

  8. Click the “OK” button to save the settings and return to the main window.

  9. In the main window click the “START” button.

  10. Once the process finishes you can exit the AMVtool application.

Result: You will have an AVI video file which will be usable with any editing software.


B. AviSynth (Advanced)(Windows Only)

1. Rename the file to video.mp4 or video.mkv to avoid unicode characters in the file name causing problems.

(HELPFUL TIP: The default setting for Windows is to hide the file extension, if you do not see .mkv or .mp4 when renaming do not add it.)

2. Open AvsPmod then go to File > New tab and then go to File > Save script as…

3. Browse to the directory where the video.mp4 or video.mkv is stored then save the script as Video.avs.

4. In AvsPmod use the following example:

Video.avs Example

LWLibavVideoSource("video.mp4", format="YUV420P8")

(HELPFUL TIP: It is recommended that you visit the Using Script Filters section before proceeding to learn more about using additional plugins to clean up the video.)

5. Click the triangle in the bottom left to preview the script and generate the index file.

(NOTE: When previewing a script with “LWLibavVideoSource()” AvsPmod will appear to lock up and not respond for a short period of time. This is normal, DO NOT force close the application as the script is creating an index file for itself. This should ONLY happen the first time a particular video is previewed!)

6. After the script is finished and previewed go to File > Save script, then close AvsPmod.

7, Open the AMVtool and in the main window click the “Add” button.

8. Browse to the directory where video.avs is located and open it.

9. In the main window click the “Configure All” button.

10. In the Configure dialog box change “Container:” to “AVI” or "MOV".

11. In the Video tab change "Codec" drop down to either "DNxHR", "ProRes", or "UT Video".

12. In the Audio tab change "Use Stream" to "None" then click the OK button.

13. In the main window click the “START” button.

14. Once the process finishes you can exit the AMVtool application.

Result: You will have an AVI or MOV video file which will be usable with any editing software.


C. VapourSynth (Advanced)

1. Rename the file to video.mp4 or video.mkv to avoid unicode characters in the file name causing problems.

(HELPFUL TIP: The default setting for Windows is to hide the file extension, if you do not see .mkv or .mp4 when renaming do not add it.)

2. Open VapourSynth Editor then go to File > New Script and then go to File > Save script as…

3. Browse to the directory where the video.mp4 or video.mkv is stored then save the script as Video.vpy.

4. In VapourSynth Editor use the following example:

Video.vpy Example

#Import VapourSynth Core

import vapoursynth as vs

core = vs.get_core()

#Import Video

video = core.lsmas.LWLibavSource(r'video.mp4', format="YUV420P8")

#Sets Video Output

video.set_output()

(HELPFUL TIP: It is recommended that you visit the Using Script Filters section before proceeding to learn more about using additional plugins to clean up the video.)

5. After the script is finished go to File > Save script, then close VapourSynth Editor.

6. Open the AMVtool and in the main window click the “Add” button.

7. Browse to the directory where video.vpy is located and open it.

8. In the main window click the “Configure All” button.

9. In the Configure dialog box change “Container:” to “AVI” or "MOV".

  1. In the Video tab change "Codec" drop down to either "DNxHR", "ProRes", or "UT Video".

  2. In the Audio tab change "Use Stream" to "None" then click the OK button.

  3. In the main window click the “START” button.

  4. Once the process finishes you can exit the AMVtool application.

Result:

You will have an AVI or MOV video file which will be usable with any editing software.