jmencode
Class Settings

java.lang.Object
  extended by jmencode.Settings

public class Settings
extends java.lang.Object

This class stores all the static variables for default and current parameters related to encoding and muxing.


Field Summary
static java.lang.String[] abitratelist
           
static java.lang.String[] acodecslist
           
static java.lang.String allapps
           
static java.lang.String[] aspratiolist
           
static int audbitrate
           
static java.lang.String audcodec
           
static java.lang.String audiofileoutput
           
static int audquality
           
static int audtrack
           
static int bitrate
           
static java.lang.String cfgpath
           
static java.lang.String codec
           
static java.lang.String[] codecslist
           
static java.lang.String container
           
static java.lang.String[] containerlist
           
static int crf
           
static boolean crop
           
static java.lang.String currentinfo
           
static java.lang.String[] DARlist
           
static boolean domuxing
           
static boolean dovolumegain
           
static java.lang.String dvddev
           
static int dvdtitle
           
static java.lang.String[] externalappslist
           
(package private) static java.lang.reflect.Field[] fields
           
(package private) static java.lang.Object[] fieldsobj
           
static java.lang.String fileinputname
           
static java.lang.String fileoutputname
           
static java.lang.String[] fitsizeslist
           
static java.lang.String fourcc
           
static java.lang.String[] fourcclist
           
static java.lang.String LAMEpath
           
static java.lang.String[] languagelist
           
static java.lang.String lavccodec
           
static int length
           
static java.lang.String Mencoderpath
           
static java.lang.String Mkvmergepath
           
static java.lang.String MP4Boxpath
           
static java.lang.String Mplayerpath
           
static java.lang.String muxCommand
           
static java.lang.String[] muxerlist
           
static java.lang.String[] noframeslist
           
static java.lang.String osname
           
static int passes
           
static int prevframes
           
static float prevstarttime
           
static int qp
           
static boolean resize
           
static int scaleh
           
static java.lang.String[] scalerlist
           
static int scalew
           
static boolean selecttime
           
static java.lang.String starttime
           
static int stepsize
           
static java.lang.String stoptime
           
static int subq
           
static int sws
           
static float targetsize
           
static boolean titlechanged
           
static java.lang.Integer[] titlelist
           
static int trellis
           
static boolean unsharp
           
static int unsharpval
           
static boolean usediscinput
           
static boolean usemod16
           
static java.lang.String version
           
static int volgain
           
 
Constructor Summary
Settings()
          Creates a new instance of ExternalAppList
 
Method Summary
static void CalculateBitrate(int length)
          Calculates video bitrate for preset target file size
 java.lang.String getfields()
          Represent this object as a String.
static void loadSettingsfromFile(java.lang.String path)
          Opens the settings file, if it exists and sets the parameters as required.
static void main(java.lang.String[] args)
           
static int nearestMod16(int val)
          Find nearest mod 16 value to input
static int nexthigherMod16(int val)
          Find nearest higher mod 16 value to input
static int nextlowerMod16(int val)
          Find nearest lower mod 16 value to input
static void parseVideoInfo(java.lang.String line)
          Parse 'mplayer -identify' output.
static void resetPaths()
          Set commands without file paths, as these are not usually needed in linux systems.
static void saveSettingstoFile(java.lang.String filename)
          Saves the settings file, by writing out all the fields and their values to a text file.
static void setScaleValues(int oldval)
          Set scale values according to aspect ratio and if needed, based on mod 16 calculation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static java.lang.String version

cfgpath

public static java.lang.String cfgpath

osname

public static java.lang.String osname

codecslist

public static java.lang.String[] codecslist

fourcclist

public static java.lang.String[] fourcclist

acodecslist

public static java.lang.String[] acodecslist

abitratelist

public static java.lang.String[] abitratelist

containerlist

public static java.lang.String[] containerlist

muxerlist

public static java.lang.String[] muxerlist

languagelist

public static java.lang.String[] languagelist

scalerlist

public static java.lang.String[] scalerlist

noframeslist

public static java.lang.String[] noframeslist

aspratiolist

public static java.lang.String[] aspratiolist

DARlist

public static java.lang.String[] DARlist

fitsizeslist

public static java.lang.String[] fitsizeslist

titlelist

public static java.lang.Integer[] titlelist

fileinputname

public static java.lang.String fileinputname

fileoutputname

public static java.lang.String fileoutputname

audiofileoutput

public static java.lang.String audiofileoutput

dvddev

public static java.lang.String dvddev

container

public static java.lang.String container

audcodec

public static java.lang.String audcodec

codec

public static java.lang.String codec

lavccodec

public static java.lang.String lavccodec

fourcc

public static java.lang.String fourcc

starttime

public static java.lang.String starttime

stoptime

public static java.lang.String stoptime

usediscinput

public static boolean usediscinput

resize

public static boolean resize

crop

public static boolean crop

selecttime

public static boolean selecttime

usemod16

public static boolean usemod16

domuxing

public static boolean domuxing

titlechanged

public static boolean titlechanged

dovolumegain

public static boolean dovolumegain

unsharp

public static boolean unsharp

dvdtitle

public static int dvdtitle

audtrack

public static int audtrack

prevframes

public static int prevframes

stepsize

public static int stepsize

length

public static int length

prevstarttime

public static float prevstarttime

targetsize

public static float targetsize

scalew

public static int scalew

scaleh

public static int scaleh

sws

public static int sws

bitrate

public static int bitrate

audbitrate

public static int audbitrate

audquality

public static int audquality

volgain

public static int volgain

passes

public static int passes

qp

public static int qp

crf

public static int crf

subq

public static int subq

trellis

public static int trellis

unsharpval

public static int unsharpval

LAMEpath

public static java.lang.String LAMEpath

Mencoderpath

public static java.lang.String Mencoderpath

Mplayerpath

public static java.lang.String Mplayerpath

Mkvmergepath

public static java.lang.String Mkvmergepath

MP4Boxpath

public static java.lang.String MP4Boxpath

allapps

public static java.lang.String allapps

externalappslist

public static java.lang.String[] externalappslist

muxCommand

public static java.lang.String muxCommand

currentinfo

public static java.lang.String currentinfo

fields

static final java.lang.reflect.Field[] fields

fieldsobj

static final java.lang.Object[] fieldsobj
Constructor Detail

Settings

public Settings()
Creates a new instance of ExternalAppList

Method Detail

resetPaths

public static void resetPaths()
Set commands without file paths, as these are not usually needed in linux systems. Same for Mac OS?


saveSettingstoFile

public static void saveSettingstoFile(java.lang.String filename)
Saves the settings file, by writing out all the fields and their values to a text file.


loadSettingsfromFile

public static void loadSettingsfromFile(java.lang.String path)
Opens the settings file, if it exists and sets the parameters as required. On first run of the program there may be no settings file and defaults are used.


getfields

public java.lang.String getfields()
Represent this object as a String. Here, a generic implementation uses reflection to print names and values of all fields declared in this class. Note that superclass fields are left out of this implementation.


CalculateBitrate

public static void CalculateBitrate(int length)
Calculates video bitrate for preset target file size


nextlowerMod16

public static int nextlowerMod16(int val)
Find nearest lower mod 16 value to input


nexthigherMod16

public static int nexthigherMod16(int val)
Find nearest higher mod 16 value to input


nearestMod16

public static int nearestMod16(int val)
Find nearest mod 16 value to input


setScaleValues

public static void setScaleValues(int oldval)
Set scale values according to aspect ratio and if needed, based on mod 16 calculation


parseVideoInfo

public static void parseVideoInfo(java.lang.String line)
Parse 'mplayer -identify' output. This will result in the creation of dvd title objects within the VideoTitle class if needed. There may be a better way to get the video info, but the only way at the moment is to parse the mplayer output.


main

public static void main(java.lang.String[] args)