[Home] [QCL] [NeuroGen] [WaveTools] [Programs] [Papers] email

Vobcut

Vobcut is a lightweight commandline program to analyse and cut mpeg2 program streams without decoding and demultiplexing. Current version is
1.0.

Features


Installation

  • Download and unpack the tarball.
  • Compile as root with
      g++ -O2 vobcut.cc -o /usr/local/bin/vobcut -lm
    
  • Enjoy!

    Options

    USAGE: vobcut [options] <mpeg-file> ... (normal mode)
           vobcut -D <mpeg-file> ...        (dump mode)
           vobcut -T <blocks> <mpeg-file>   (truncate file)
    analyse and cut mpeg2 program streams without decoding and demultiplexing
    version 1.0, (c) by Bernhard Oemer, 2009, licence: GPLv3
    
    general options:
    -h         help (this message)
    -v         verbose messages
    -Q         supress warnings
    -t         disable timestamp recalculation
    -k         keep incomplete mp2 audio packages
    -P <len>   mpeg PS pack size in bytes (2048)
    -D         dump sequences and audio packets and exit
    -T <n>     truncate single file to n blocks (dangerous) and exit
    -f <time>  force cut around PTS <time> given in seconds
    -F <block> force cut at next sequence after the given block
    I/O, scanning and caching options:
    -c / -C    do not read / write cache file even if .vobcut dir exists
    -d         create .vobcut cache directory if nonexistent
    -o <file>  output file, use -o- to write to stdout
    -0 ... -9  write chunk number 0...9 (default: largest)
    -p [len]   preview: write first and last [len] seconds to stdout (5)
    -q [len]   preview boundaries enclosing selected chunks
    -a <offs>  soft adjust start (no hard transitions) *
    -b <offs>  soft adjust end (no hard transitions) *
    -s <secs>  min. initial partial scan sample length in seconds (3)
    -i <secs>  max. initial partial scan sample interval in seconds (30)
    -n <n>     number of initial scans, use -v to check block ranges (auto)
    -e         always scan entire file; can be faster than default partial scans
    soft format (lbox/stmono) detection options:
    -l / -L    disable/enable letterbox recognition (auto)
    -m / -M    disable/enable stereo encoded mono recognition (auto)
    -w <secs>  letterbox/mono vote window in seconds (5)
    -r <secs>  removal limit for insular soft sections in seconds (10) *
    -B <perc.> threshold for letterbox slice size in percent of inner slices (50)
    -S <thres> threshold for stereo encoded mono (auto, fallback value 60)
    * a hard section/transition implies an mpeg format change (e.g. 4:3 -> 16:9)
    

    Limitations

    Vobscan

    Vobscan is a quick and dirty bash script to create an two-level html-index of mpeg2 file using mplayer and is included in the vobcut-tarball.
    The screenshots contain the time offset as alt-text in the form of the vobcut option "-f<secs>" which can be cut-and-pasted into the commandline. The script needs to be run in the directory containing the mpeg2-files, expectes the directory ".vobscan" to be present and takes the name of the files to be index as aruments. Files with existing indices are skipped, so it's safe to run "vobsscan *.vob" in your VCR directory from time to time.

    Licence

    Vobcut is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See http://www.gnu.org/licenses/gpl-3.0.txt for mor details.