Staxrip Templates

This tutorial wishes to present a quick start guide of how an mpeg2 standard definition video (capped from satellite broadcasts) can be transcoded into x264 mkv, using StaxRip. The operating system used in this example is Windows 7.


Basic steps

StaxRip 64 (11/2019 – 2.0.6.0 Stable) Settings: NVIDIA H.265 – NVIDIA (Hardware). Typical x265 HEVC encode times (approximate): 60-minute 1080p video: 3 min (compared to 1.5 hours for CPU encode). 250-400 MB HQ video file size. 60-minute 720p video: 1 min 30 sec (compared to 35+ min for CPU encode). 150-250 MB HQ video file size.

StaxRip v2.6.0 Might break settings from previous version, so starting with new settings is recommended Might break templates and jobs from previous version, so checking or renewing them is recommended Changed (context-)menus from earlier versions must be restored, manually adjusted or need a global settings reset in order to see and use them. StaxRip-Templates Optional:-Organize the DVD into segments/chapters. Open StaxRip and choose a Template. The video in this guide is 16:9 so the NoCrop Template will be used. The Guide is identical for Cropped 2.35:1 videos. Add a.vob file to StaxRip by clicking on the Source tab #2. A Source Files box will open. Add the.vob file.

  1. Capping the raw video
  2. Editing the raw video (optional): this will be our source video
  3. Getting StaxRip
  4. Installing StaxRip
  5. Setting up StaxRip to transcode the source, this includes: codec settings, deinterlacing, cropping, bitrate
  6. Transcoding
  7. Checking the output for various errors
  8. Correcting errors (if they occur)
  9. Enjoying the output :)

The source video

This tutorial assumes that we have a finalized source video (i.e., we have edited it, got rid of commercial breaks and other unwanted parts), ready to be transcoded into x264 in StaxRip. I will use a fairly standard tennis video in my examples below, which I recorded from an FTA (free-to-air) DVB satellite channel, JSC Sports 2. This channel broadcasts in standard definition, its quality is farly mediocre, neither outstandingly high nor too crappy. These are the basic properties of the source video (you can get these information using MediaInfo, for example):
  • video container: transport stream (.ts)
  • video codec: mpeg2
  • frame rate & interlacing: 25 fps interlaced
  • storage resolution: 720 x 576 pixels (counted in anamorphic pixels)
  • display resolution: 1047 x 576 pixels (counted in square pixels)
  • display aspect ratio: 16:9 ('widescreen')
  • average bitrate: 4.9 Mbps
  • audio: mp2, 256 Kbps, 48 KHz, stereo
  • size of file: 59.1 MB
Transport stream mpeg2 is how most non-hd channels broadcast over satellite, it is a standard format, and this is how my satellite receiver card is recordig the dvb stream onto the hard disc drive: the dvb data is captured as it is beamed from the satellite, untouched. So, effectively, this is a raw video. In this tutorial the name of the raw file is x264test.ts.

Getting StaxRip

Make sure that you download StaxRip from the official site: http://staxmedia.sourceforge.net/. Go to the project Summary Page: http://sourceforge.net/projects/staxmedia/. Click on Files, and download the latest version. At the time of writing this guide, the latest version is 1.1.7.1_beta:

Installing StaxRip

Installing StaxRip simply means copying the files and folders in the 7z archive to a directory of your choice (there is no separate setup file). You can open up the 7z file in WinRAR for example. Extract all the files into a folder. In our example we will call the folder where we copy the files 'StaxRip_1.1.7.1beta':
To launch StaxRip, simply double-click on StaxRip.exe. It is perhaps better to create a shortcut on your desktop:

Transcoding in StaxRip

When you first launch StaxRip after successfully installing it, it will show the Getting Started window:
Staxrip TemplatesWe will create our own template, so you can tick Don't show this next startup, and click Close. The main window of Staxrip is now visible:
We will modify the various settings here and save it as a new template that we can use over and over again (so we do not have to do all the settings again).

Setting the x264 codec

First, we modify and configure the codec. (Notice that the MKV container was already active, so we don't need to find and select it.) Click on DivXPlus, then click on x264 Film HQ:
With this, we selected the x264 codec. The small window displays the most important settings of the codec that we selected. Next, click on Config Codec:
The window that opens up next is where all the x264 settings can be configured:
Let us first concentrate on the Mode setting. Select Bitrate.
Bitrate and Two Pass both achieve the same thing: with this setting we can aim at a particular file size or a particular (average) bit rate. Bitrate uses only one pass of transcoding, while Two Pass achieves the same thing slower as it requires two passes: the first pass is a quick one (unless you put a tick next to Slow Firstpass – but it is really not necessary): it creates a stats file, which “contains information about every input frame, which can be input to x264 in order to improve the output. The idea is you run a first pass to generate the stats file, and the second pass will create an optimized encode of the video. The improvement is mostly gained from better ratecontrol” (source: Official x264 settings). For average or low-quality SD sources, I usually use the 1-pass Bitrate mode:
The only setting we modify for this basic example is the Frame Options. Tick Deblocking and write -2 for both Strength and Threshold:
No other setting will be modified. Click on OK.

Deinterlacing

Next we will specifiy a deinterlacer filter. Our source is an interlaced video, so it is very important that during transcoding the video is deinterlaced, otherwise the quality will be inferior. Interlacing basically means that each picture frame contains two half pictures or “fields” mixed together, but they are slightly shifted in time. Since there are 25 such frames every second, there are 50 half-fields shown in a video per second (or 60 in the case of NTSC video). StaxRip includes a built-in deinterlacer, but in this tutorial we will use another deinterlacer, which will make sure that the moving scenes in the video will be smooth, fluid, without so-called saw tooth edge distortions (also known as “combing” artifacts). It achieves this by separating the two half fields of each interlaced frames, and placing them after one another (so there is no mixing together, no interlacing) – this is called progressive scanning. Thus, the deinterlacer will create a 50 fps progressive video if the source video was 25 fps interlaced (as in our example); if your source is 30 fps interlaced, the output will be 60 fps progressive). This interlacing method is called progressive “bobbing” or full framerate deinterlacing. The filter that we will use and install into StaxRip is LeakKernelDeint (we will use its Bob module, called LeakKernelBob, to achieve bobbing deinterlacing). (Of course, if your source is not interlaced but progressive, you do not have to use deinterlacing! Put no tick before Field.)
To get LeakKernelDeint, go to http://avisynth.org/mediawiki/External_filters#Deinterlacing. Click on the Plugin link for LeakKernelDeint: http://leak.no-ip.org/AviSynth/LeakKernelDeint/. Download LeakKernelDeint_1.5.4.zip. We will install LeakKernelDeint into a folder where StaxRip can automatically load this filter from. This folder can be found if you click Tools > Directories > Plugins. Extract all the content of LeakKernelDeint_1.5.4.zip into the folder that opens up
2020Now, we create the filter profile for LeakKernelBob in StaxRip. Right-click the Filters list and select Profiles... from the context menu.
A window opens up showing the filter profile definitions. Write this line right below [Field]: LeakKernelBob = LeakKernelBob(order=1,sharp=true) After writing in this line, click OK.
Now, we can select the LeakKernelBob deinterlacer filter when we click on the Field inside Filters:
Before we save all these settings as a template, make sure that you have NO tick before Crop in the Filters (it is always advisable to set the cropping manually, not automatically):

Saving the settings into a template

It is time to save all these settings as a template. Click Project > Save as Template. A small window opens up. Give a name to your template, e.g. SD x264-mkv Leak. If you want this template to open up whenever you start StaxRip, tick Load template on startup (this is a good idea if you use these settings a lot...). Click OK.
Now, close Staxrip, then start it again. All your settings will open up as you saved them into the SD x264-mkv Leak template.

Loading the source

It's time to load the source file into StaxRip. In our case, the source is x264test.ts. Simply drag the file into the Source field of StaxRip:
Now, StaxRip will start demuxing the ts file, and will be ready to start the transcoding.
If, however, the following window pops up, do the following:
Close the warning. Go to Tools > Settings. Select Demuxing. Make sure there are NO ticks before DGIndexNV. (I usually do not tick ProjectX either as I do not fix Mpeg-2 sources inside Staxrip). After unticking, click OK.
StaxripNow, you can drop your file to the Source field, Staxrip will demux it, and it is now really ready to transcode. (Notice that StaxRip has created a folder next to the source file. This folder contains various helping files for StaxRip for the transocding. You can delete this folder after the transoding has finished successfully.)

Cropping

The next step is to check if it is necessary to crop the video. Click on Crop:
The Crop window opens up, showing the first frame of the source video. Now, if you see black bars on the top/bottom or left/right, you should crop the video, otherwise the transcoding into x264 will not be efficient enough. In our example, it is necessary to crop (look at the black bars at the edges):
Move your cursor to the edge where the black bar is. A blue bar will occur. Use the + or - key to move that edge/margin (one click on the + or - key moves the edge by 2 pixels). Important: the value for “Mod” must always be 16/16after cropping! In our case the original resolution was 720x576 pixels. After cropping the four edges by -8 pixels, we get 704x560 pixels, which is Mod 16/16 (there are no errors). Close the window.
Notice that the main window now shows the cropped values (and that there are no errors):

Specifying the bitrate, begin transcoding

Last, we specify the Target settings. We will give 1600 for the Video Bitrate. For medium/low-quality SD mpeg-2 sources a value between 1300–1800 Kbps is enough (you may want to experiment with the values depending on the quality of your source); notice that the approximate output size is also automatically given:
The Audio settings (at the bottom) can remain as they are: we will use the default 96 kbps AAC audio codec.
Click on Next. The Job window pops up, click on Start. The transcoding begins. First the audio is being transcoded:
Then the transcoding into x264 is being done.
Finally, mkvmerge merges the x264 video and AAC audio into an mkv “container”. The transcoding has finished, the output is

Staxrip Templates For Sale

x264test.mkv. Play the file, check if everything is fine. If you open up the file in Mediainfo, it shows that the output is indeed x264 with AAC audio, and it is 50 fps progressive (thanks to the LeakKernelBob deinterlacer filter).
Congratulations! You have transcoded an mpeg2 SD file into x264!

Downloading StaxRip:

StaxRip x64 is portable – meaning StaxRip does not install on your computer (although most of the external support programs and plugins require installation).

First Time Installations:

  1. To use StaxRip x64, extract the download file to a folder.
  2. For later simplicity (when updating), rename the extracted folder to “StaxRip”.
  3. Move the extracted folder to the “Program Files” folder (where most other programs files reside – or anywhere since StaxRip is portable).
  4. Open the StaxRip folder.
  5. RIGHT CLICK “StaxRip.exe” – select CREATE SHORTCUT
  6. Drag ‘N Drop (move) the shortcut to the desktop (or elsewhere) and then click the shortcut when you want to run StaxRip. (Alternative: SELECT shortcut – CTRL X – cut. Click on the desktop (clear area) – CTRL V – paste. Or , RIGHT CLICK -menu – select CUT, RIGHT CLICK clear area on desktop – menu – select PASTE ).

Updating StaxRip:

Check the above link frequently. Always update – Don’t stagnate. The latest version fixes and enhancements are included at no extra charge.

Updating StaxRip is easy (copying and pasting to the same folder will retain custom settings and templates).

  1. Extract the updated version to a new folder.
  2. Select (highlight) the files and folders in the extract folder.
  3. RIGHT CLICK one of the highlighted items – menu – COPY (make sure all the items remain highlighted). Alternative: Press CTRL+C.
  4. Go to your original run folder (Program Files or where ever).
  5. RIGHT CLICK a clear area – menu – PASTE. Alternative: Press CTRL+V
  6. When asked – choose MERGE and/or REPLACE all folders and files (also check DO THIS FOR ALL ITEMS if present).

Note: In some cases, updates may require modified settings and template files. In that case, old settings and templates will be lost.

If you don’t need to retain custom settings and/or templates, follow the instructions for a First Time Installation when you update.

Running StaxRip for the first time:

The first time StaxRip starts, it will ask where to store the Settings Directory. C:ProgramDataStaxRip x64 is the most logical choice or choose any of the other locations or browse for a custom directory (bottom menu choice).

Before encoding, it is a good idea to create some templates (Set up customized defaults used most often. Note: Templates cannot be saved after loading a video file.).

Change SOURCE to preferred choice (RIGHT CLICK for menu). No preference – choose AUTOMATIC.
If no source filter is chosen as default, the program will display a dialog each time a video file is loaded.

Creating Templates:

Staxrip Templates 2020

Creating custom templates let you do the same conversions over and over without having to change settings each time. Once a template is created, it can be chosen from the list and all special settings are loaded automatically.

Before creating a template ask yourself: WHAT DO I WANT TO DO – HOW DO I WANT TO CHANGE THE VIDEO?

  1. Video encoder profile. x264, x265, xvid, mp4 or other? Have a NVIDIA video card or 2nd generation+ Intel processor and a motherboard with built-in video? Hardware encoding is extremely fast and with modern enhancements, just as high quality as CPU encoding. x265 encoding requires a NVIDIA GeForce 900+ with Maxwell or better GPU. Intel x265 hardware encoding requires a 5th or 6th+ generation (Skylake+) processor. GPU hardware encoding can be 10x (or more) faster than CPU-based encoding.
    .
    SEE: http://aerobytepc.com/index-html/nvidia-hardware-encoding/ for futher info.
    .
    LEFT CLICK x264 (or current encoder selection – right side, middle) for menu.
  2. Encoded video quality (or other/more options depending on encoder selected)? Higher quality (lower number) = longer re-encode time and larger file sizes = increased quality.
    LEFT CLICK item to change (unless Disabled).
  3. Crop – Check the CROP item (see below to visually adjust crop after loading video).
  4. Deinterlace? Check FIELD (RIGHT CLICK to change deinterlace filter type).
  5. Remove Grain? Check REMOVEGRAIN (RIGHT CLICK – NOISE for other choices).
    ­
  6. Video resolution – RESIZE?
    Which resize filter should be used (RIGHT CLICK for menu)?
    What size should the finished video be?
    After clicking RESIZE, the Width and Height can be typed in and saved with the template – StaxRip allows upsizing the video resolution (quality will not be better than the original – upsizing does, however, reduce generational loss. Example: re-encoding 16×9 DVD movies to 1280×720 will maintain better quality than coding at the original 480p resolution). Note: will maintain NOT increase quality.
  7. ADD other filters(RIGHT CLICK clear area below other items for menu).
  8. Audio(LEFT CLICK default for menu).
    Click EDIT (right side of default) to change current audio settings or create a new audio setting.To save a new audio setting: Menu – PROFILES – SAVE (custom audio profiles will appear in main screen audio menu – #8 above – Example: AC3 5.1 192 Kbps added to menu).Repeat for second audio track (set to NO AUDIO if not needed).

When finished setting up the template go to PROJECT menu – SAVE AS TEMPLATE.
CHECK – LOAD TEMPLATE ON STARTUP to have the template loaded each time StaxRip starts (can be changed in TOOLS – SETTINGS – GENERAL or by loading another template and saving with the LOAD TEMPLATE ON STARTUP checked).

Saved templates will appear in the TEMPLATES menu.

Loading files:

You can load the files to be re-encoded by DRAG ‘N DROP or to get the load file dialog click the ASSITANT area – CLICK HERE TO OPEN A SOURCE FILE (bottom main screen) or SOURCE (top, left main screen, below the menu).

Staxrip Templates

Open file dialog:
Single file opens a file explorer browse window to select the file to be loaded.
Multiple files can be batch loaded using FILE BATCH or DIRECTORY BATCH (see below).

CROPPING:

Coming soon…

BATCH PROCESSING:

Coming soon…