Documentation


Home
Up

Introduction

Logo Cutter is intended for users of TV-recording applications like GB-PVR or SageTV. It is able to cut mpeg files according to picture given as a still image.

Usually when you have scheduled recording, the show will not start exactly on time, so you have to skip a couple of minutes when you view it.

Logo Cutter is able to do it automatically for you!

All you need is a show logo picture. Many TV-series have some kind of logo that is displayed right in the beginning. Given such logo as a still image, Logo Cutter will search for it in the recorded show, and once it is found, cut the show from the beginning up to the logo frame.

 

Program components

Logo Cutter consists of two main components:

  • FindFrame Avisynth plugin, that is able to search for a frame given as a still image.
  • logoCutter.vbs VBScript, which can execute FindFrame and cut the video accordingly. It should be configured as a post processing tool in TV recording application.

 

Installation

  • Download and install:
  • Open logoCutter.vbs in text editor. You will see at the beginning:

    'DGMPGDec directory (should contain dgindex.exe and dgdecode.dll)
    Const DGMPGDEC_DIR = "c:\Program Files\dgindex"
    
    'Media Player
    Const AVS_PLAYER = "c:\Program Files\Windows Media Player\mplayer2.exe"
    
    'Mencoder tool
    Const MENCODER = "d:\Video\mencoder\mencoder.exe"

    Update the installation path of the tools above.

 

Quick start guide

Extract logo from video file as a still image

Fist, you need to find logo frame number. Do it with your favorite media player (given it has the ability to show frame number), or you can use the following command:

saveFrame.cmd <movie_file>

The configured video player will open with frame number shown in the top left corner. Now you can find logo frame number. After this perform the following command:

saveFrame.cmd <movie_file> <logo_frame_number>

The logo will be saved as logo.ebmp in the movie directory.

View logo from .ebmp file

showEbmp.cmd <logo_file>

Cut the video up to the logo

The basic way is just

cut.cmd <movie_file>

The script will use logo.ebmp in the movie directory as a logo to search for. The cut version will be saved with ‘_cut’ suffix in the file name.

Run cut.cmd without any parameters to see the list of all available options. Any parameter of the form ‘param=value’ will be used to run FindFrame Avisynth plugin (note no space before or after the ‘=’). Read FindFrame description for more information.

Here is an example of command I’m using in GB-PVR postprocessing.bat:

call d:\utils\logoCutter\cut.cmd %1 /overwrite threshold=13 allow_over_threshold=10 chroma=false upto_minute=10

 

Troubleshooting

  • Check for Avisynth errors: run cut.cmd with debug=true parameter. Media Player will open when FindFrame start working (note: it may take a couple of minutes before the player start responding). If there are Avisynth errors, you will see them in the player window. Additionally, you may see FindFrame progress information using DebugView utility.
  • FindFrame is working but logo frame is not found: threshold and allow_over_threshold parameters need to be adjusted. Find frame number that looks like logo and then run cut.cmd with

    analyze=<frame_number> log=”log.txt” 

    File log.txt will contain 3 columns. First column is a threshold value; it is going from 1 to 15. For each threshold, you can find what there should have been the allow_over_threshold value, in the following way: 

    allow_over_threshold = 100 - <third column value>

    Try to keep both parameters as low as possible.


Home | IE Middle Clicker | Logo Cutter | Find Frame | Contact Information

  2004-2005 iemdl.com
Last updated: 11/23/07.