Skip to content

How the program works

CutePoisonX edited this page May 13, 2015 · 5 revisions

As described, the program was designed to do a batch-conversion of movies. But how exactly does it work? This will give you a brief overview: You can define so called "rules" and "targets". Those rules and targets contain several video- ,audio- and subtitle-parameters. The program searches for videofiles that matches these parameters. If a file is found, it converts this file to the corresponding target-parameters. Every rule can be linked to one or more specific targets. Different rules can point to the same target.

Rules

Rules contain the following parameters:

Videostream

  • Container
  • Codec
  • Bitrate
  • Resolution
  • Frames per second

Audiostream

  • Codec
  • Channels
  • Language
  • Bitrate
  • Sample rate

Subitlestream

  • Codec
  • Language

For each parameter, you can choose the following options (substitute "[value]" with your preference) :

  • not[value]
    if you write "not" before the value, the program will look for streams that do not contain "value". This corresponds to a logical not-operator. E.g.: noth264 is actually processed as "no files with h264 video codec". Please notice that there is no space between "not" and the actual value. Attention: the container parameter does only support the not[value] syntax in versions 1.4.1 and later!

  • -
    if you only write "-", this parameter will be ignored (at best translated with "any"). E.g. if you write "-" for the codec, every possible codec is matched. Note: if you specify "-" for the container, PoisonConvert analyzes every file it finds since the container corresponds to the file extension.

  • [value]
    if you do not write one of the options listed above, the program will look after streams that contain the parameter "value"

Note: The parameter "container" is actually the file extension of the file.

Targets

Targets contain the following parameters:

Videostream

  • Container
  • Codec
  • Bitrate
  • Resolution
  • Frames per second

Audiostream

  • Codec
  • Channels
  • Language
  • Bitrate
  • Sample rate

Subitlestream

  • Codec

For each parameter, you can choose the following options (substitue "[value]" with your preference) :

  • copy this will explicitly tell ffmpeg to copy the parameter. If you write 'copy' for the parameter 'codec', the whole stream will be copied.

  • - this will not explicitly tell ffmpeg to do something with the parameter. In most cases, the parameter will be copied.

  • [value]
    if you do not write one of the options listed above, the program will convert the parameter to "value".

Note: if you want to have the same codec in your target-file as the source-file, but change other video-parameters like fps, you may write '-' for the codec. In general: some nowledge about how ffmpeg handles inputs won't hurt either.

Priorities of rules

You can define more rules than one. Every rule gets a specific priority. The program will process rules with higher priority first. If parameters of a file are matching with a defined rule the other rules with lower priorities will be ignored (even if the parameters would match too), so every file is processed only once. You may want to define more general rules with lower priority than special ones.

How a matching stream is identified

The program will only process a file if ALL parameters of ONE CATEGORY (video, audio or subtitles) are matched. However, if a compatible videostream (all video-parameters are matching) is detected but there is no matching audiostream, the file will be converted anyway. This allows more complex conversion-options (see chapter: advanced conversion).

Summarized:

  • Parameters of one category follow a logical AND-operation.
  • Categories themself follow a logical OR-operation.

Make sure you generate at least one rule for each category because if you do not specify a rule for the subtitles for example, they simply will not be converted. So only leave out subtitle rules if you don't want to have any subtitles at all (the same applies for the audio-stream).