View Single Post
Old 29th December 2011, 12:00   #1  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
GUIDE: How to prepare a Blu-ray for editing in a NLE

Guide to prepare a Blu-ray for editing in a NLE

In this guide I will explain how to prepare a Blu-ray for editing. Our goal is to extract the video and audio from the Blu-ray into a format which we can use to edit. We want to do so as quickly and simply as possible, and in a lossless fashion both for video and audio, and regardless of whether the audio is MPEG, AC3, TrueHD, DTS, or DTS-MA. We will extract the video and audio tracks from the Blu-ray, converting the audio at the same time as we extract it to mono WAV files corresponding to each channel of audio. If you have the right codecs installed this process will be lossless, even for the audio! We will edit the video without reencoding to an intermediate format, and we will do so in a frame accurate way.

This whole process takes less than 25 minutes on a normal hard drive, and probably around 10 minutes on an SSD.

Programs which need to be installed
Download and install the following programs (all free), if you haven’t done so already.
The following programs will be used “in the background” and need to be installed first:
AviSynth (latest stable build) – The following programs require this to be installed.
AviSynth Virtual File System – This and the next program will allow us to directly edit the Blu-ray video file without re-encoding it.
Pismo File Mount Audit Package

Also install MeGUI, which is the only program we will need to open during the entire process of preparing our Blu-ray for editing:
MeGUI – The will be the program we use to extract the streams from the Blu-ray and convert the audio losslessly to mono WAV files. We will also index the video with MeGUI.

Copy Blu-ray to hard drive
Using AnyBlu-ray, Blu-rayFab Decrypter, or some similar program, copy the Blu-ray to your hard drive.

Export video and audio streams from the Blu-ray
Open MeGUI. Open the “HD Streams Extractor” in the “Tools” menu.


Make sure the option “Select Folder as Input” is selected, and then hit the button on the upper right to select the files.


Select a Blu-ray folder (if you want to select an MKV, TS, or M2TS file you can do so by selecting the option “Select File as Input” above).


MeGUI will analyze the Blu-ray structure and present a list of “features” available in the movie. In this case there are two “features”.


Look at the length of them and choose the one which corresponds to the main movie. In this case, the first one is clearly the movie. Once I select that “feature”, MeGUI will present a list of the video, audio, and subtitle streams present in the movie. The main movie will probably already be selected, but if not, select it. You can leave the default option of MKV as the file format.


Now select the audio tracks you want and change the output format to “WAVS”. This will output a single mono WAV file for every channel in the audio file (v.gr. it will output 6 files for 5.1 audio, 2 files for stereo audio, etc.). If you have the right codecs installed, it will do so losslessly (you can search around for info on that). If there are any other tracks you want select them and the output format as well.


Review the other tracks, and unselect any track which is selected but which you aren’t interested in (this will make the output process go faster). Finally, select the “Output” directory and hit “Queue”.


Go to the “Queue” tab and hit the button “Start”.


MeGUI will export a log file, the video file, and the audio tracks, as well as any other tracks you had selected. Notice that the audio tracks are named according to their channel names – “L” is for the “Front Left” channel, “R” for the “Front Right”, etc.


Index the video file
We must now index the video file. This will allow us to edit it in any video editor, and will make sure that any edits we make are frame accurate. Even if you video editor directly supports editing the video file MeGUI exported, you will probably find that it will run faster if you index the file.

First, however, I recommend changing one of the default options in MeGUI. We are going to index our file using FFMSIndex. By default, MeGUI uses the single thread version of FFMSIndex. However, there is a multi-thread version which is included with MeGUI, and which has always worked well for me. It is MUCH faster than the single thread version, so if it works for you I highly recommend changing this option. If it were to give you problems, you can always change back and recreate the index.

To change to the multi-thread version of FFMSIndex, choose “Options” and then “Settings”. Navigate to the “External Program Settings” tab. Change the option “FFMS Thread Count” to “0”. This will automatically use 1 thread for each core (or virtual core) in your processor. Select “Save”.


In MeGUI open the “File Indexer” from the “Tools” menu.


In the File Indexer, select the video file you just exported as your “Input File”. The file extension should be MKV. Then select “FFMSIndex” or “DGIndexNV” as the “File Indexer”, and hit “Queue”. Make sure the options “On completion load files” and “and close” are selected.


Go to the Queue tab and hit the “Start” button.


Once MeGUI finishes indexing the video file, a window like this will appear, as well as a window with an image from the video. Hit the button “Save” on the bottom right. This will save an AVS file (i.e. an Avisynth script) in the folder where you exported the video and audio tracks. Don’t worry if you don’t understand what’s going on, just keep following the instructions!


After hitting the save button another window may appear. You can now close that window and MeGUI as well. Your folder will now look something like this:


Notice that you now have an AviSynth file with the extension AVS. This small text file plus our index (the ffindex file) will allow us to edit the original Blu-ray video in a frame accurate manner without an intermediate codec!

Mount the AVS file
Right click on the file with the extension “AVS” and select “Quick Mount”. If the option to “Quick Mount” does not appear, install these two programs, both free:
AviSynth Virtual File System
Pismo File Mount Audit Package
After selecting “Quick Mount” the AVS file will disappear, and a folder will appear. It should look like this:


If you go into that folder you will see three files, one of which is a video file with the extension AVI which you can then use in your video editing program. Don’t worry if the video file appears to be huge. It is a “virtual” file, and takes up only a few KB. This virtual file is what you want to edit with, not the MKV (or 264) file directly.


Edit your Blu-ray
At this point you are ready to begin editing your Blu-ray. Simply import the AVI video file and the audio streams into your video editing program (v.gr. Sony Vegas Movie Studio or Magix Movie Edit Pro). Here is how it looks in Sony Vegas. The video and audio are in perfect sync and are complete. You are now ready to edit the Blu-ray!


NOTE: If your video editing program does not recognize the video stream, add the command "ConvertToYUY2()" to your AviSynth script. If that doesn't work, try "ConvertToRGB24()".

Last edited by JoeH; 11th January 2012 at 18:21. Reason: Added note at end about what to do if video editor doesn't recognize video
JoeH is offline   Reply With Quote