Author Topic: Ortega's HD Reauthoring Tutorial.  (Read 392 times)

0 Members and 1 Guest are viewing this topic.

Offline Ortega

  • Not Hurt By Pain
  • ******
  • Posts: 1677
  • Liked:
    • Ortega's Covers
Ortega's HD Reauthoring Tutorial.
« on: May 20, 2017, 03:03:10 PM »
I've noticed a dearth of HD re-authoring tutorials here on the forum.  I suppose that with DVDs becoming less common, and that RiffTrax has seemingly made VOD a priority over Just the Jokes format, that the old DVD re-authoring has become an obsolete art.  And as seeing as the definitive tutorials are now tragically outdated, even Thrifty's excellent guide was posted in 2009, i thought it would be good for me to finally post an updated HD reauthoring guide.


First, the end result will be a digital file that can be played on a variety of formats, with a optional emphasis on m4v(AppleTV/iTunes), as that is my preferred streaming player. For those that don't use or want that, the other option is MKV(Mastroka).  Its a very versatile container that can support multiple audio and subtitle streams.  This should go without saying, but VLC can readily play mkv's with no secondary codec for you to install, and should be any PC owners go-to medial player. (Plus its open-source free!)

Second, the purview of this guide will not be covering burning of blurays.  I personally find Dual layer blurays to be prohibitively expensive, and also not very practical.  I've long since abandoned physical media altogether, so that's not what this guide will be covering.

Third, as it pertains to the audio editing portion of the movie, i won't be reinventing the wheel on this and will defer to other guide on the forum for the basic of that, however i will mention certain steps that i take that differ from those guides.


Programs you will need:

A BluRay Drive(Obviously) And at least 30-60 GB of hard drive space, at least temporarily

Share-Ware programs: No links, Google it. (For obvious reasons).

MakeMKV (For the ripping of BR disc)  Its a shareware program that can bypass AACS and allow you to rip the movie to your HD.  What it actually does is convert the m2ts files that a BR uses into a Mastroka file with audio and video streams that we can manipulate and work our dark riff magic onto.  This is the only app that cost money.  The initial trial is 30 days, and after that you need a licence.  I will let the reader decide if that is worth the money. Another alternative is ANYDVD.

Open-Source Programs: links provided

gMKVExtractGUI( As its states, it extract the separate streams where we can get to our audio file)

Audacity( I shouldn't have to explain what and why this is used for) This little Open Source app has definitely matured since the heady days of 2007. While we used to use this as initial step in our audio editing, and using a variety of programs like Goldwave, Aften, and Besweet; we can now make full 5.1 audio tracks all using Audacity.

XmediaRecode (For re-encoding video) A Dutch/German? open source app that is extremely versatile in encoding in multiple formats. Some people swear by Handbrake, but i found Xmedia can handle far more formats, and can also export raw video streams, which are what we need.

MKVToolNix( This is similar to Rejig and other programs that mux the audio and video streams together)

MKVtoMP4( And optional program to convert the resultant mkv to m4v that can be used in AppleTV and other streaming players.)

Tutorial:

For the purposes of this post, ill be reauthoring Star Trek. No reason, it was just the first BR I grabbed.

First, insert your BR into your drive. Then load up MakeMKV:

Spoiler (click to show/hide)

Here we see the initial screen. Go to "File>Open Disc' and select the BR Drive.

Spoiler (click to show/hide)

Here is where we can select our audio and subtitle streams. Any other special features on the disc will also be here, but the app usually unchecks these by default. Uncheck any unwanted audio like french, or spanish, and likewise with subtitles. I'd avoid and DTs or TrueHD streams and that are lossless and very large. Most have Dolby Digital 5.1 and that all we need. Once you have the streams you want, make sure the output folder is correct, and click the MAkeMKV button on the upper right-hand corner.  This process usually takes about 20-30 minutes.

Here is where we have a problem. The resultant mkv file is now a video file with no quality loss.  However that lossless quality comes at a price: disc space.  For reference, my Star Trek Mkv has a file size of 32.5 GB.  Even if we were to try and burn this, it would still be to big to fit on a SL BR. Since we aren't doing that, and if you want to maintain a signifcant HD Rifftrax Library, we need to re-encode and compress the file into something manageable.  For an action movie like the one we are doing today, i would suggest 8-12 GB as a respectable size.  A rule to know, the smaller we make the file size, the more compression there is which will increase quailty loss.

(Its at this point that i should add where we heading, that on certain unnamed sites, there will be mkvs that are already at our target file size. ill just say that : Tony Only Rail Roads Every Next Thursday.)

First, lets get our audio extracted so we can start editing audio now, because the video portion of the encode will take a while. Multi-tasking rules!

Ripping Files

Open gMkvExtractGUI.

Spoiler (click to show/hide)

As we can see the Star Trek Mkv has all the diff streams , we want the ac3. You'll notice i left the TrueHD in the file.  This is to show you how you can have multiple streams in a file. Anyway, make sure you check ac3 and the Chapters( I'll explain later) and click extract. This will take about 3-5 minutes.
We have our audio file,but lets put that aside for now, and move on the video encoding. This where Xmedia Recode comes in, and one of the best things about this app, is its versatilty in format and options. What we will be doing is converting the video portion of the mkv to a raw video format that we can later remux with the riffed audio. As we are re-encoding we will also be compressing the file size down to more manageeble size.

VIDEO EDITING:

Next, Start up XMedia Recode.  Now, load the MKV we created earlier.  Onthe initial format screen, make sure the profile is set to custom, and find the format "h.264 raw video".  The output steam type should say "Video Only". Click on the Video tab, make sure the mode is set to "Convert", the framerate is set to match the source(i.e. for a movie its 23.976), and set the rate control mode the "2-Pass Average Bitrate", and set the Bitrate to 10000. Set the Profile to "Main". The are other options to use, but i wouldn't mess with them.

Now what we need to do is makes sure when we encode the video, it doesn't encode what we don't want it to. More specifically those pesky black bars. So we need to crop. So click on the Filters/Preview tab, and click on Crop. You should see an "auto Crop" Button

Spoiler (click to show/hide)

Click on that and we should see the black bars removed. Now when it encodes it won't spend time encoding that portion of the image.

Spoiler (click to show/hide)


Use the pic to make sure everything is set, and click "add to queue". On the queue tab,  we can see the job we just added, and at the bottom of the screen we see the total size. Set it to "BluRay25GB"which will allow us leway on our final file size. As we can set its set to around 9GB which is around where we want. Remember, the smaller the bitrate, the smaller the size. But also beware, at lower bitrates, you will see a loss of quailaty. Set the destination file to where you want it to go. Click the encode button. warning this will take quite a while. I can't really give defintev times, as everyones PC is different, but expect an hour to 2 hours, maybe more on an older rig. I timed mine at a total time of 1hr 11mins.

Spoiler (click to show/hide)



Now that the video is doing it thing, we'll move onto the audio portion of our guide and spend the encode time editing the riff to the movie audio.

AUDIO EDITING:

Open up Audacity. First , open up Preferences, and click on Libraries. check to see if the LAME and FFMpeg Libraries are present, and if not click on the download links the app provides, and install. Next click on Import/Export, and make sure that "Use Custom Mix" is checked.

Spoiler (click to show/hide)

Before we do anything, lets make sure the project rate is set to 48000 hz. On the lower left-hand side click on the box and set it.  Next load the ac3 into audacity. It will take a minute or two due to the file size. Once they are loaded, we can see the seprate audio tracks broken down starting from the top: Left, Right, Center, LFE(Sub), SL, SR. The pic will not show all trhe way down, but trust me, ther're there.

Spoiler (click to show/hide)

At this point ill defer to other guides step to sync the riff audio to the movie, i won't rehash that here.
I'll assume you have  a riff audio track that is already synced up, with the intro removed and the Dis sync lines removed. If you dont know what i'm talking about, check Thrifty's guide, its a sticky. Click on the synced rifftrack audio track, on the topdown menu, click on "Name" and Rename this to Rifftrax Audio Control Track.
First we need to apply Auto-Ducking to all the tracks. Make sure the Rifftrax Audio Control Track is the last track(Seventh) at the bottom. Then Select all track BUT the riff audio. This will act as a control track and lower the volume to the appropriate levels to all tracks.

Go to Effect>Auto Duck.

Spoiler (click to show/hide)

We need to set the level to -15db. and set the outer fade level lengths to .25 seconds. Click OK and let it do its thing.
Once that's done, we need to merge the riff audio. My personal preference is to add the riff to the back channels so over a sound system is sounds like they're sitting behind you. You have the option to apply it to the center channel if you want something more traditional.

Take the track or tracks you want to mix with Rifftrax Audio Control Track and paste into a new project window. Either both Back Channels or the Center Audio Track, and then the Rifftrax Audio Control Track on the bottom . Go to File>Export Audio, save as AC3, give it a name (Star Trek BACK Channels for instance), then on the output channels slider, set to 2. Click on the bottom RiffTrax and it should highlight red, then click on the channel 1 and channel 2 tracks so it mixes in with both. ( if your using just the Center Channel, set the output slider to 1, and make your riff connection to it). Check the pic.

Spoiler (click to show/hide)

Once that is saved we will have our riffed audio track. Plop them back into main project window, and delete the unriffed track that we are replacing and the Rifftrax Audio Control Track. If you used the center track, just delete the center track, or Track 3. If you used the back channels, delete Tracks 5 & 6, then  the Rifftrax Audio Control Track. Click on the top-down menu of the new Mixed audio track, and click on the Split Stereo Track.(Skip this if you are using center, but make sure the new mixed track is the THIRD track) Now we should have six distinct channels with the riff audio on your desired track.Once we have our 6 Channels, go to File.Export Audio, save as AC3, and make sure you see this screen.

Spoiler (click to show/hide)


If so, Click OK.  Now that we have our finished Audio stream, lets move onto Muxing.

Muxing:

Open up MKVToolNix, and load in the h.264 Video file, and any audio files you want to add, like for instance, the original movie audio. Its completely up to you. you can also add any subtitle files you want as well.


Spoiler (click to show/hide)

As a personal addition i like to do, we are going to add the funny Chapter titles from the Rifftrax ReadMe. Next, Click on Chapter Editor and open the Chapter XML we ripped with MKVExtract.

Spoiler (click to show/hide)

We should see this screen:

Spoiler (click to show/hide)

Click on "Chapter 2", and copy and Paste the Chapter titles from the readme into there corresponding chapters.

Spoiler (click to show/hide)

Once that is done go to Chapter Editor> save as XML File.

Now go back to the Multiplexer tab, and make sure everything is set to how we want it., and when we are ready click "Start Multiplexing"

Spoiler (click to show/hide)

START WATCHING :

We now have a HD RiffTrax Video File with multiple audio tracks with funny chapter titles and everything.  Open it up in VLC Media Player, and enjoy.
In the interest of not wanting to make a post even longer, i will add any additional steps like converting to mp4/m4v on a separate post in this thread if anyone is interested. I'll Also cover such things like editing MetaData( Artwork and Movie information like Cast and crew that will show up in some streaming media players.

Any questions, suggestions or comments are most appreciated.
« Last Edit: May 21, 2017, 03:22:23 PM by Ortega »


Online RVR II

  • Samurai Cop
  • **********
  • Posts: 50943
  • Liked:
  • There can be Only 1...
    • RVR II's YouTube Channel
Re: Ortega's HD Reauthoring Thread.
« Reply #1 on: May 20, 2017, 03:22:02 PM »
SWEEET!! :o

Standing by.. 8)


Offline Ortega

  • Not Hurt By Pain
  • ******
  • Posts: 1677
  • Liked:
    • Ortega's Covers
Re: Ortega's HD Reauthoring Thread.
« Reply #2 on: May 20, 2017, 10:57:00 PM »
OK, guys! Fully updated tutorial with nice pictures to help you along the way!


Offline Ortega

  • Not Hurt By Pain
  • ******
  • Posts: 1677
  • Liked:
    • Ortega's Covers
Re: Ortega's HD Reauthoring Thread.
« Reply #3 on: May 21, 2017, 12:16:18 PM »
Edited main post because i stupidly forgot to take into account cropping and aspect ratio. For instance a 1080p movie has an resolution ratio of 1920x1080.  But take for instance a movie like Star Trek actually has a cinematic aspect ratio of 2.35:1..  But we don't actually need all that dead space in the picture. By Cropping, it only encode the actual picture information, and takes the dead space out.  They'll still be there when you watch it on Media player or on VLC, but it will be proper empty information and not part of the actual picture. As an example, the Star Trek movie in the tutorial will now have a resolution of 1920x800.


Online RVR II

  • Samurai Cop
  • **********
  • Posts: 50943
  • Liked:
  • There can be Only 1...
    • RVR II's YouTube Channel
Re: Ortega's HD Reauthoring Thread.
« Reply #4 on: May 21, 2017, 12:22:12 PM »
Cool :o
I'm gonna try this sometime and see if I can do it


Offline Ortega

  • Not Hurt By Pain
  • ******
  • Posts: 1677
  • Liked:
    • Ortega's Covers
Re: Ortega's HD Reauthoring Tutorial.
« Reply #5 on: July 29, 2017, 04:21:55 PM »
Here's a guide to creating a mp4 to better run on steaming media players.

Making MP4/M4V for AppleTV or Media Players

Now that we have our MKV, some steaming media players will not be able to play Mastroka files, or you end up having to use 2 or 3 different apps to make everything work right. However, I myself, after many different attempts with plenty of different streaming media players, found that the AppleTV combined with iTunes pretty much does the trick.
What you'll have after we are done is a m4v(mp4) file with HD video, and multiple audio tracks, even in 5.1 if you so choose.  The upside is that the mp4 will also be compatible with Roku or other players, not just AppleTV.
Anyway, lets breakdown the tools we need:

Xmedia Recode (Yeah, we'll be using this one again, as its a pretty versatile little program)

MetaX ( Another payware program, that cost $9.95 US, but is a onetime cost. Personally, i think its worth the small amount)

Fireup Xmedia Recode, and when it loads go to the format tab, and on the profile pull-down menu, select Apple. on the tab below it you'll see many different apple formats, we want "Apple TV 3 (h.264 1920 x1080 FULL HD)"

Spoiler (click to show/hide)

Now load the finished MKV into Xmedia. You should see the options open up, now let click on the video tab:

Spoiler (click to show/hide)

Now click on the mode menu. and select "Copy". Since we already re-encoded this file we don't need to bother with encode times, and this option will not even touch the video portion of the file.  Now lets click on the Audio tab. 

Spoiler (click to show/hide)

Now here is where you get to choose how you want to optimize your file. You can have multiple audio tracks on the file, you can even downmix our 5.1 file to Stereo if you choose. Just know that unless you choose AC3 with 384 Bitrate, you won't be able to play it out of your TV speakers, as it will only passthrough to your Speaker system. (Luckily, the riff 5.1 we made is set to that exact standard.)  If the audio track is already at that specific standard, we can click on the copy tab, just like we did the video, and if you want to include the original audio, you can add it as a seperate track, but since it will most likely be DTS, you will have to convert it to AC3.


Another optional step, if use want to add subtitles, we have the option to add them as MOV text. Click on the subtitle you want use and click on the little arrow button to add it as asub track.

Spoiler (click to show/hide)

Now that we have everything we want to add. Click on the "Add to Queue" button at the top, and click "Encode Job". This shouldn't take more than 5 minutes, even if you're downmixing or rencoding audio. Now that we're done, let get into metadata editing.

EDITING METADATA TAGS

Now that we have our file, lets tag that sumbitch.  I know, you'll ask "Ortega, what the hell is metadata editing, the hell i need that for?".  Well, strawman, what it does is adds information into the file such as cast and crew names,  release dates, synopsis, and artwork.

Load up MetaX and add the riffed mp4. You see the first page, with all the initial data.  On the artwork page lets use the Rifftrax Poster for this example. on the artwork click on select file, and use the rifftrax poster. and then add all the relevant data.  One thing to make sure of is on the Video tab to set the Video Kind as a Movie. Use the pic as an example.

Spoiler (click to show/hide)
Once we're done, Click on the big green button and it will start writing the data.  The upside of this is that now all the information is now permanently embedded into the file, so now whenever you import it to whatever media player you choose, it will always have all that information there automatically.

Here's what it will look like in iTunes:

Spoiler (click to show/hide)

And here's what it will look like in AppleTV.

Spoiler (click to show/hide)

In my next post i'll try to delve in to subtitles next, and will cover a different way of handling forced subs that i think you'll enjoy.