World Conquest Chronicles

World Conquest Chronicles

Auto-lesson, v1.3

Utility for a generation of video lessons from separate phrases as frames.

Support a watermark in a frame, the slow mode of Google Text-To-Speech API and a language specification for all even and odd phrases simultaneously.

Change Log

  • phrases:
    • support a language specification for all even and odd phrases simultaneously;
    • make an individual language specification optional;
  • frames:
    • support a watermark in a frame (optional):
      • watermark settings:
        • text;
        • font (it always uses the text font);
        • size;
        • color;
  • audio:
    • support the slow mode of Google Text-To-Speech API:
      • support a separately specification of a speed mode for even and odd phrases;
  • fix bugs:
    • last frame hasn't any duration.

Features

  • phrases:
    • read of phrases from stdin;
    • support single-line and multiline phrases (each phrase is separated from another by a double newline);
    • support a language specification (ISO 639-1 language code):
      • for each phrase (see below for details; can be disabled);
      • for all even and odd phrases simultaneously;
  • frames:
    • generate frames from phrases (in PNG format);
    • support only a plain background;
    • align a phrase on a center of a frame;
    • split a phrase to lines for to fit it into a frame (support a specification of a frame padding);
    • support a watermark in a frame (optional);
    • frame settings:
      • background:
        • width;
        • height;
        • padding;
        • color;
      • text:
        • font (it supports only TrueType fonts);
        • size;
        • color;
      • watermark:
        • text;
        • font (it always uses the text font);
        • size;
        • color;
  • audio:
    • generate speeches from phrases via Google Text-To-Speech API (in MP3 format);
    • generate a sound track from speeches (in MP3 format);
    • support a specification of an additionally gap between speeches;
    • support the slow mode of Google Text-To-Speech API:
      • support a separately specification of a speed mode for even and odd phrases;
  • video:
    • generate a video from frames and a sound track (in AVI format with Xvid (MPEG-4) codec);
    • set a duration of each frame equal to a corresponding speech;
    • support a specification of an additionally gap between frames;
    • output a generated video to a specified file (optionally);
    • upload a generated video to YouTube (optionally):
      • separate mode for an authorization in YouTube API;
      • YouTube video settings:
        • title;
        • description;
        • tags;
        • YouTube category;
      • retry upload a video on errors:
        • retrying settings:
          • maximal number of tries;
          • delay between tries.

Phrases Format

Grammar in an EBNF:

phrase list = phrase, {PHRASE SEPARATOR, phrase};
phrase = [language specification], paragraph;
language specification = LANGUAGE CODE, ":";
paragraph = ANY TEXT - PHRASE SEPARATOR;

PHRASE SEPARATOR = ? /(\r\n|\n\r|\n|\r){2}/ ?;
LANGUAGE CODE = ? /en|ru|.../i ?; (* see ISO 639-1 *)
ANY TEXT = ? /.+/s ?;

Example:

Beauty lies in lover's eyes.

RU: Красота — в глазах любящего.

Screenshots

Begin of a generation