Skip to main content

HLS Transformer (Enterprise Video Engine)

A high-performance, multi-threaded C++ video transcoding engine built on top of FFmpeg. This engine converts standard video files (.mp4, .mov, etc.) into highly optimized, Adaptive Bitrate (ABR) HTTP Live Streaming (HLS) formats.

It is designed for production backend environments, featuring real-time AES-128 encryption, broadcast-standard audio normalization, and seamless integration with Python via pybind11.


Key Features

  • Multi-Core ABR Encoding: Spawns isolated threads to simultaneously transcode video into multiple resolutions (e.g., 1080p, 720p, 480p, 360p) to maximize CPU utilization.
  • Content-Aware Scaling: Automatically detects if a video is horizontal (16:9) or vertical (9:16 for Shorts/Reels) and adjusts the output dimensions dynamically.
  • AES-128 DRM Encryption: Encrypts video chunks on the fly to prevent unauthorized downloading and piracy.
  • EBU R 128 Audio Normalization: Analyzes and normalizes audio loudness to standard broadcast levels (-14 LUFS) using FFmpeg's loudnorm filter graph.
  • Thread-Safe Logger: Built-in mutex-locked logging system to prevent terminal text corruption during multi-threaded execution.
  • Python Native Binding: Architected to be compiled as a .so module, allowing you to orchestrate the C++ engine natively from Python scripts.

Prerequisites

You must have the FFmpeg development libraries and a C++ compiler installed on your system.

Ubuntu / Debian:

sudo apt update
sudo apt install g++ libavformat-dev libavcodec-dev libswscale-dev libavutil-dev libavfilter-dev libswresample-dev

Architecture

  • The project is cleanly separated into two main components:
  • hls_engine.cpp: The pure C++ core logic containing all FFmpeg memory management, multithreading, and video processing.
  • ​wrapper.cpp: The lightweight pybind11 bridge that exposes the C++ engine to Python.

##how to use

Step 1: Generate Encryption Keys

  • Before running the engine, you must generate an AES-128 key. The engine looks for a file named enc.keyinfo to encrypt the stream. ​Run this in your terminal:
# 1. Generate a 16-byte hex key
openssl rand 16 > enc.key

# 2. Create the keyinfo file for FFmpeg
echo "enc.key" > enc.keyinfo
echo "enc.key" >> enc.keyinfo
  • Note: In a real production environment, the first line of enc.keyinfo should be the public URL where your web player can fetch the key

#api uses

from vedio_transcoders import  hls_encoder

#The engine will automatically pad missing bitrates using production defaults
#and detect if the video is Vertical or Horizontal.

hls_encoder(
    input="user_upload.mp4",
    output="master.m3u8",
    resolution=["1080p", "720p", "480p"],
    bitrate=[5000000, 2500000],          #480p will auto-default to 1,000,000
    key="enc.keyinfo"                    # Path to your DRM keyinfo file
)

print("Video successfully packaged for HLS delivery!")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

video_transcoders-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

video_transcoders-0.1.0-cp314-cp314-android_24_arm64_v8a.whl (76.5 kB view details)

Uploaded Android API level 24+ ARM64 v8aCPython 3.14

video_transcoders-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl (93.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

video_transcoders-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl (93.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

video_transcoders-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl (93.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

video_transcoders-0.1.0-cp39-cp39-manylinux_2_39_x86_64.whl (93.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.39+ x86-64

video_transcoders-0.1.0-cp39-abi3-android_24_arm64_v8a.whl (76.4 kB view details)

Uploaded Android API level 24+ ARM64 v8aCPython 3.9+

File details

Details for the file video_transcoders-0.1.0.tar.gz.

File metadata

  • Download URL: video_transcoders-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for video_transcoders-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8931c7977da2d1c21ed4fff5a0fadd63c8707b3529aa1ec4e753455cd3d8fb63
MD5 1480103749cf03acd7459d9f8f831cbf
BLAKE2b-256 a52e64701dbdd5628ef6173a3b70d194f3481d2db2a9a334bd682f86c66456c6

See more details on using hashes here.

File details

Details for the file video_transcoders-0.1.0-cp314-cp314-android_24_arm64_v8a.whl.

File metadata

File hashes

Hashes for video_transcoders-0.1.0-cp314-cp314-android_24_arm64_v8a.whl
Algorithm Hash digest
SHA256 8af9590a3936414570a5fa977fe382d1736ee53a37b66f62610c914496199e39
MD5 786f22b02332b9655a09eab3477bb9fc
BLAKE2b-256 973819792f44e7bcfe16d09692fd4828ea26de26e9dbf1a5ffa0ac4b784b3e74

See more details on using hashes here.

File details

Details for the file video_transcoders-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for video_transcoders-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2e08ce741c872853e60daf1c97a242e60b5a1de66c99ac3e47829fb0398a5c97
MD5 943ea177f760f95b048599eddbac5ca8
BLAKE2b-256 731e05a307b4ba5805c981cbdc654f7e79946af5c611515771ad230b0d171da1

See more details on using hashes here.

File details

Details for the file video_transcoders-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for video_transcoders-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 aa4b64b50bdb82a84c2d5734d9adbc5d25886075ed8cc4316d68b02164434694
MD5 e24bba86e95def2bcedb58a45a1aee6c
BLAKE2b-256 af245ad995ace73aaad8d30d36bfcd2d4e2e2fbcf81c1a0a3200462c83e1d798

See more details on using hashes here.

File details

Details for the file video_transcoders-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for video_transcoders-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 63c18591bf95cd29bce13935fb6762680223f9091659d67c77257f4c04809d37
MD5 f3d8bf18e9ac470105d9d43d10412c82
BLAKE2b-256 39c4c1efb692b17aa2b41c436fc0dd13b8f877c0eaab682a79bf773e7b175379

See more details on using hashes here.

File details

Details for the file video_transcoders-0.1.0-cp39-cp39-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for video_transcoders-0.1.0-cp39-cp39-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 937725d0eb1a5315362bf9c650c8fdfe35629c100a677b7cebba81963cd8f5e8
MD5 15c8ed4dec0e01b0d71147ddebf946e3
BLAKE2b-256 d1c1cdf48aa6f67cb3026151ef7a8a91f9acf36f2f84291103667fdfd14a65b9

See more details on using hashes here.

File details

Details for the file video_transcoders-0.1.0-cp39-abi3-android_24_arm64_v8a.whl.

File metadata

File hashes

Hashes for video_transcoders-0.1.0-cp39-abi3-android_24_arm64_v8a.whl
Algorithm Hash digest
SHA256 25a8631c1776d88a556efcbd9f9c7dcd8571af187e5b039e9abfc48c3c4013a5
MD5 c6f01663bbd085380bc3a1fece9ab407
BLAKE2b-256 7316fd085aca07108411b363b385bad153c465402fbf7becd27f6cc6b6834a89

See more details on using hashes here.

Release history Release notifications | RSS feed

10.2.27

1 file

10.2.25

1 file

10.2.24

1 file

10.2.23

1 file

10.2.22

1 file

10.2.21

1 file

10.2.20

2 files

10.2.19

2 files

10.2.18

2 files

10.2.17

2 files

10.2.16

2 files

10.2.15

2 files

10.2.14

4 files

10.2.13

2 files

10.2.12

2 files

10.2.11

2 files

9.2.11

2 files

9.1.11

2 files

0.1.2

2 files

This release

0.1.0 This release

7 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page