Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > NLE - Non Linear Editing

Reply
 
Thread Tools Search this Thread Display Modes
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
Old 4th April 2012, 17:43   #2  |  Link
profiler 2.0
Registered User
 
profiler 2.0's Avatar
 
Join Date: Dec 2011
Location: In total abstraction ...
Posts: 9
Thanks a lot.
profiler 2.0 is offline   Reply With Quote
Old 6th November 2013, 03:33   #3  |  Link
jriker1
Registered User
 
Join Date: Dec 2003
Posts: 387
Threads been here a while however nice article. Does this work still and on a 64-bit system? I have Win 7 and everything seems to work, however when I select the avi file in Vegas complains its not a valid file. Not sure if its the tools or something else.

Thanks.

JR
jriker1 is offline   Reply With Quote
Old 6th November 2013, 08:26   #4  |  Link
Warperus
Registered User
 
Join Date: Apr 2010
Location: Sain-Petersburg, Russia
Posts: 140
jriker1
Generally you need 64 bit vfw codec to open avi file in Vegas. If mentioned AviSynth Virtual File System and Pismo File Mount Audit Package are only in 32-bit variants, you could need some sort of 64 bit codec for it.
Please install ffdshow tryouts (64 bit version), and try it out. IF it doesn't work that way you can try to use make avi from ffdshow tryouts, but in this case you'll probably have to split avs file streams to different files youself.
Warperus is offline   Reply With Quote
Old 7th November 2013, 02:16   #5  |  Link
jriker1
Registered User
 
Join Date: Dec 2003
Posts: 387
I was able to get it to work, no less with a VC-1 based video no less that Vegas doesn't open. Unlike first try which I did 64-bit avisynth, used all 32-bit on my system. Errored of no codec but adding ConvertToYUY2() to the avisynth script did the trick. Now once it's done converting and saving see if its a viable option visually over doing a lossless conversion to mp4 so Vegas can open it.
jriker1 is offline   Reply With Quote
Old 7th November 2013, 03:24   #6  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 878
Quote:
Originally Posted by jriker1 View Post
if its a viable option visually over doing a lossless conversion to mp4 so Vegas can open it.
Personally, I would go with a lossless video format.

I find that doing anything with avfs can be very slow for previewing or any sort of response time. Depending on your system specs. Last time I tried was on a very poor machine.

With lossless video, if you have the space, you won't get as much of a strain on performance, especially when you want to do live previews of your editing.

For all work I do with anything, I like to keep a spare 1TB external HDD around for lossless intermediates.
__________________
Win10 (x64) build 17134 | GPU Caps Viewer 1.40.1.0
NVIDIA GeForce GT 1030 (GP108) 2047MB/GDDR5 | (R417.22)
NTSC | DVD: R1 | BD: A
Sparktank is offline   Reply With Quote
Old 7th November 2013, 08:28   #7  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
Quote:
Originally Posted by jriker1 View Post
I was able to get it to work, no less with a VC-1 based video no less that Vegas doesn't open. Unlike first try which I did 64-bit avisynth, used all 32-bit on my system. Errored of no codec but adding ConvertToYUY2() to the avisynth script did the trick. Now once it's done converting and saving see if its a viable option visually over doing a lossless conversion to mp4 so Vegas can open it.
I use 32 bit Vegas on Win 7 64-bit and it works fine. I have encountered the same problems you mention, however, on 64-bit Vegas, but haven't spent much time investigating it as I am happy with 32-bit Vegas for this type of project. If you do figure out how to make it work on Vegas 64, please share.

As regards the speed of editing this way, the timeline is in fact slower than an intermediate codec, but if you are using a VP5 NVidia card together with DGIndexNV, or if you have a fast 4-core+ processor and turn on the multi-thread option in FFMSIndex I find the speed more than acceptable for most editing jobs.
JoeH is offline   Reply With Quote
Old 9th November 2013, 23:24   #8  |  Link
jriker1
Registered User
 
Join Date: Dec 2003
Posts: 387
I had no problem with speed once indexed however had a separate issue I never have with any other technique. Audio sync loss. I can encode these videos as many times as I want thru normal encoding techniques and merge in the audio at the end and its fine. With the avisynth mounting technique something happens and the sound is off. Back to the drawing board. Was hoping for one less encode and potential colorspace manipulation before getting it into Vegas.

Hey SparkTank or anyone else. Suggestions on lossless conversion recommendations to get the videos into Vegas? I've tried handbrake lossless which the creator keeps asking me why I'm using lossless, and ffmpeg cp 0 or something like that for lossless. I've been working with these videos for 3 weeks now and getting kind of frustrating.

Last edited by jriker1; 9th November 2013 at 23:27.
jriker1 is offline   Reply With Quote
Old 10th November 2013, 03:32   #9  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 878
Quote:
Originally Posted by jriker1 View Post
Suggestions on lossless conversion recommendations to get the videos into Vegas? I've tried handbrake lossless which the creator keeps asking me why I'm using lossless, and ffmpeg cp 0 or something like that for lossless. I've been working with these videos for 3 weeks now and getting kind of frustrating.
Frameserve to VirtualDub and use something like Lagarith or UtVideoCodec for lossless video.

Easier than x264 lossless, imo.
Handbrake doesn't support other lossless codecs.

You can index with FFMS2 for the AVS script.
__________________
Win10 (x64) build 17134 | GPU Caps Viewer 1.40.1.0
NVIDIA GeForce GT 1030 (GP108) 2047MB/GDDR5 | (R417.22)
NTSC | DVD: R1 | BD: A
Sparktank is offline   Reply With Quote
Old 11th November 2013, 08:33   #10  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
Quote:
Originally Posted by jriker1 View Post
I had no problem with speed once indexed however had a separate issue I never have with any other technique. Audio sync loss. I can encode these videos as many times as I want thru normal encoding techniques and merge in the audio at the end and its fine. With the avisynth mounting technique something happens and the sound is off. Back to the drawing board. Was hoping for one less encode and potential colorspace manipulation before getting it into Vegas.

Hey SparkTank or anyone else. Suggestions on lossless conversion recommendations to get the videos into Vegas? I've tried handbrake lossless which the creator keeps asking me why I'm using lossless, and ffmpeg cp 0 or something like that for lossless. I've been working with these videos for 3 weeks now and getting kind of frustrating.
In my experience by far the best lossless codec is UTVideo, just because it is so much faster than Lagarith (it is larger, however).

I have personally never experienced out of sync sound with avisynth mounting.
JoeH is offline   Reply With Quote
Old 8th February 2019, 17:58   #11  |  Link
jealousy91
Registered User
 
Join Date: Oct 2015
Posts: 10
I've downloaded the latest version of MeGUI and am using HD extractor on the main movie with DTS Master Audio. When I try to change the audio format to WAV it's not available, I only see DTS_Core & DTS nothing else.
jealousy91 is offline   Reply With Quote
Old 8th February 2019, 23:21   #12  |  Link
jealousy91
Registered User
 
Join Date: Oct 2015
Posts: 10
Quote:
Originally Posted by jealousy91 View Post
I've downloaded the latest version of MeGUI and am using HD extractor on the main movie with DTS Master Audio. When I try to change the audio format to WAV it's not available, I only see DTS_Core & DTS nothing else.
Never mind. Went to to Settings and enabled "Extract as: show all demux options"

Last edited by jealousy91; 9th February 2019 at 05:21.
jealousy91 is offline   Reply With Quote
Reply

Tags
blu-ray, demux, framserving, megui

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.