Another Chunk Encoder


browse  log 



You can also use your local clone with git send-email.

#Another Chunk Encoder


This project is licensed under the BSD 3-Clause License - see the LICENSE file for details


Another one

Either using go or nodejs

Separate tools:

  1. A client
  2. A main daemon
  3. A chunking daemon
  4. An encoding daemon
  5. A muxing daemon

SQL Driven

Manifest system for advanced usage

Definitly for linux, maybe for windows, we'll see.


  1. Hard dependencies
    • mysqld (mariadb)
    • ffmpeg
    • A functional brain
  2. Optional
    • mkvmerge
    • openssl (or any other ssl tools idk)

#The tools

#The client

Simple no bs commands, talks to the main daemon through an api to make creating alternative clients easier (gui, web...)

For example

# Add a simple video
client add video.mp4

# Add a video from a manifest
client add video.toml

# List videos
client list

# Pauses the daemons except the main one
client stop

# Unpauses the daemons
client start

# Remove a video from the list
client remove 1
client remove video.mp4

# Create a preset,
client presets add "anime" --encoder aom --parameters " --enable-chroma-deltaq=1 --enable-keyframe-filtering=0 --lag-in-frames=28 -b 10 " --pix_fmt "yuv420p10le"
# set a default encoder,
client set default_encoder aom
# set the preset as default for this encoder,
client set default_presset anime --encoder aom
# encode a video with them.
client add video.mp4

# Add a simple video to a remote daemon
client --remote add video.mp4

client set remote
client unset remote

#The main daemon

This is what the client is talking to

This daemon can create and remove config files for presets, encoders...

This daemon initially sets up the database

#The chunking daemon

This daemon's sole purpose is to chunk videos

#The encoding daemon

This daemon's sole purpose is to encode videos and search for target vmaf

#The muxing daemon

This daemon's sole purpose is to mux and output videos

#Files and protocols


Using TOML


Simple one input job


output = "/path/to/my_vid.mkv"
input = "/path/to/video.mp4"
streams = [0, 1, 2]
encoders = ["aom", "libopus", "libopus"]
tags = [ {}, {lang="jpn"}, {lang = "eng", source = "Some source"} ]
video_preset = "anime"
audio_preset = "anime"

Complex two input job


output = "my_vid.mkv"

<!-- Streams -->
[0] <!-- Output stream 0, The video -->
input = "/path/to/video.mp4"
stream = 0
encoder = "aom"
<!-- Parameters -->
parameters_global = "--end-usage=q --cq-level={cq} --tile-columns=1 --tile-rows=0 -b 10 --enable-chroma-deltaq=1 --enable-keyframe-filtering=0 --lag-in-frames=28 --enable-cdef=0"
<!-- Parameters only used by target vmaf -->
parameters_target_vmaf = "--cpu-used=6"
<!-- Parameters only used on the final encode -->
paraters_final = "--cpu-used=3"
<!-- VMAF metrics targeting -->
target_vmaf = 92
target_vmaf_minq = 15
target_vmaf_maxq = 45
target_vmaf_steps = 5
<!-- ffmpeg complex filters with -vf -->
preprocessing_complex_filters = "scale=1920x1080:flags=spline"

[1] <!-- Audio 1 -->
input = "/path/to/video.mp4"
stream = 1
encoder = libopus
parameters_global = "--vbr"

[2] <!-- Audio 2 -->
input = "/path/to/audio2.flac"
stream = 0
encoder = libopus
parameters_global = "--vbr"

<!-- Muxing! -->
[tags] <!-- Global tags -->
Episode = 1
Title = "A Nice Title"
Date = 1979-05-27T07:32:00-08:00

    [tags.1] <!-- tags for stream 1 (audio) -->
    lang = "jpn"

    [tags.2] <!-- tags for stream 2 (audio) -->
    lang = "eng"
    source = "Some source"
    <!-- Add 92ms of delay to sync the audio -->
    delay_ms = 92

#Communication with the main daemon


The encoders and preset will be specified in config files.

#Early database draft

Painful Database Schema