Skip to content

Splitting

Will Bresnahan edited this page Aug 14, 2020 · 1 revision

Splitting

Settings

chunk method

The method used to create chunks. Specified with --chunk_method. See Chunk Method for detailed information.

scenes

If you are running multiple encodes on the same source video, it isn't necessary to perform the scene detection every time. You can save the scene locations with --scenes file. If file exists, the scene information will be loaded and the scene detection will be skipped. If file does not exists, the scene detection will run as normal and save the result for use next time.

split method

The method used for detecting scenes. There are two options.

  1. --split_method pyscene This uses PySceneDetect to detect scene changes. This method is fast, but may require tuning --threshold and --min_scene_length to properly work.
  2. --split_method aom_keyframes This uses a first pass of libaom to detect scene changes. The first pass of aomenc is run and the first pass file is analyzed using similar code to that of aomenc's keyframe placement code. This allows for scene cuts to be where the encoder would place keyframes, increasing encoding efficiency. If you are using --kf-min-dist= as an encoder option, use the same value for --min_scene_len. This is recommended if you can bear the extra time and are using libaom as the encoder.

extra split

This option will further break down scenes larger than the value specified by --extra_split n. This option is useful when some chunks are much longer than others leaving unused workers at the end of the encode.

min scene len

This option will force the scene detection algorithms (PySceneDetect or aom_keyframes) to report scenes that are at least this many frames long. Use this option when you have a source with high frequency flashing that might cause false positive scene detection or are using --kf-min-dist= with libaom.

Note: This option is applies to the scene detection, so no scene will have less than n frames. Chunks may be smaller due to extra split having a higher priority than this option. For example, consider the min scene length is 100 and extra split is 200. A scene that is detected as being 250 frames (:arrow_left: this number will be >= 100) long will become 2 chunks (due to extra split) with at least 1 chunk being less than 100 frames long.

threshold

This option allows for the tuning of PySceneDetect's sensitivity to scene changes. A lower value will be more sensitive and more, shorter chunks, while a higher value will have fewer, longer chunks. If this value is too low, you lose encoding efficiency and if this value is too high, you lose parallelization.

reuse first pass

During scene detection with aom_keyframes, a libaom first pass file for the entire source video is generated. This option allows for splitting the first pass file for use on each chunk. This saves time by not requiring a 1st pass for each chunk. This requires using aom as the encoder and aom_keyframes as the split method. This option is experimental and requires the chunk method to be frame accurate. There may also be a loss in encoder efficiency.

Clone this wiki locally