Giter Club home page Giter Club logo

easy-ott-subtitles's Introduction

easy-ott-subtitles

OTT (DASH/HLS) automatic subtitles translator/transcriber. Suitable to VoD and Live OTT streams.

It is basically a manifest manipulator for HLS and DASH. It adds subtitle(s) track(s) to the origin manifest according to the URL parameters (see instructions below). It allows very easy intergation: no changes to the origin stream are needed, work is done on-the-fly. Original Video/Audio/Text tracks are directed to the origin server. Only added text tracks are served from easy-ott-subtitles server.

Currently using Google Cloud Translation and Speech-to-Text APIs.


Installation

  • Create virtual enviroment
$ virtualenv -p python3 venv
$ source venv/bin/activate
  • Install python dependencies
$ pip install -r requirements.txt
  • Install FFmpeg (used for transcribe only)
$ sudo apt-get install ffmpeg

Configuration

  • Configure Google Cloud service account key
  1. Generate service account key json file.
  2. Copy the file to folder 'google_key'
  3. Configure project id and service account key file path in ini file under GOOGLE_API:
[GOOGLE_API]
PROJECT_ID = <project_id>
SERVICE_ACCOUNT_FILE = google_key/<service_account_key_file_path>
  • Default port number is 8500. This can be changed in ini file under HTTP_SERVER:
[HTTP_SERVER]
EOS_HTTP_PORT_NUMBER = 8500

Usage

  • Start the server
$ python easy-ott-subtitles -c eos.ini

URL Generation

  • To consturct a playout URL, use this formula:
http://<server_ip_address>:<server_port_number>/eos/v1/<dash/hls>/<vod/live>/<translate/transcribe>/<source_language>/<origin_stream_url_base64>/eos_manifest.<m3u8/mpd>?languages=<destination_languages>&default=<default_language>

Example

Transcribe

Translate


HTTPS Server and Caching

This package is using python HTTP server. To make it suitable for production and enable HTTPS + caching for subtitle fragments, you can use Nginx with reverese proxy as the outbound HTTPS server, and enable content caching.

easy-ott-subtitles's People

Contributors

nirb999 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.