Skip to main content

Upload 1080p 60fps on TikTok

Project description

Tiktok-Quality

Installation

pip install tiktok-quality

Or from source:

git clone https://github.com/BastienGimbert/tiktok-quality.git
cd tiktok-quality
pip install -e .

Requirements

  • Python 3.10+ - zero third-party dependencies
  • FFmpeg - optional, for output verification only
# Check dependencies
tiktok-quality --check-deps

# Install FFmpeg if needed:
# Windows: winget install Gyan.FFmpeg
# macOS:   brew install ffmpeg
# Linux:   sudo apt install ffmpeg

Usage

CLI

# Transform a video (10x frame inflation)
tiktok-quality input.mp4 output.mp4

# Custom multiplier
tiktok-quality input.mp4 output.mp4 -m 15

# Custom metadata tag
tiktok-quality input.mp4 output.mp4 --comment "MyTag123"

# Quiet mode
tiktok-quality input.mp4 output.mp4 -q

Verification

# Verify output with ffprobe
tiktok-quality --verify output.mp4

# Byte-compare with a reference file
tiktok-quality --compare output.mp4 reference.mp4

Python API

from tiktok_quality import transform

stats = transform("input.mp4", "output.mp4", multiplier=10)
print(f"Declared frames: {stats['declared_frames']}")

How It Works

Manipulates the MP4 container metadata to inflate the declared frame count by adding "ghost frames" - filler NALUs pointing to a single 8-byte padding block.

Input:  1920x1080 60fps, 1494 real frames, 50.7 MB
Output: Same video,     14940 declared frames, 50.8 MB (+107 KB overhead)

No pixels are changed. No re-encoding. The video data is byte-for-byte identical but tiktok-quality tricks TikTok into thinking the video has more frames, allowing it to be uploaded at 1080p60.

Transformations Applied

# What Detail
1 Brand mp42 -> isom
2 Box order moov moved before mdat (fast-start)
3 First frame SEI NALUs stripped, IDR slice kept
4 avcC High profile extension bytes added
5 Video STTS Ghost frame timing entries appended
6 Video STSZ 8-byte entries for each ghost frame
7 Video STSC New chunk entry for padding region
8 Video STCO Ghost chunks point to single filler NAL
9 Padding NAL 8 bytes appended: 00 00 00 04 00 00 00 00
10 Audio handler Renamed to "SoundHandler", lang -> und
11 Audio timing Last sample trimmed to align with video
12 Metadata iTunes-style comment tag in ilst
13 Bitrates Recalculated for both tracks

Ghost Frame Mechanism

All ghost frames reference a single 8-byte filler NALU at the end of mdat:

00 00 00 04   <- NALU length (4 bytes payload)
00 00 00 00   <- type 0 (filler) + empty content

13,446 ghost "frames" share this one block via STCO. Only 8 bytes of media data added. Metadata tables grow by ~107 KB.

Project Structure

tiktok-quality/
├── pyproject.toml
├── README.md
├── LICENSE
├── proof.png
├── .github/workflows/publish.yml
├── src/tiktok_quality/
│   ├── __init__.py
│   ├── __main__.py
│   ├── cli.py
│   ├── transform.py
│   └── mp4/
│       ├── parser.py
│       └── builder.py
└── tests/
    └── test_mp4.py

Background

Reverse-engineered from the "TikTok Enhancer" Chrome extension (Editing News v2.1.4) which uses a server at v2.editingnews.com to apply this container manipulation. The extension:

  1. Intercepts video file on TikTok upload page
  2. Sends to their server for container manipulation
  3. Server returns "enhanced" file
  4. Extension replaces the file in TikTok's upload form

This tool replicates the exact server output - byte-for-byte identical.

proof

1080p60 upload quality confirmed via re:TikTok Checker & Downloader bot.

License

MIT see LICENSE file for details.

Project details


Download files

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

Source Distribution

tiktok_quality-1.0.0.tar.gz (69.5 kB view details)

Uploaded Source

Built Distribution

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

tiktok_quality-1.0.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file tiktok_quality-1.0.0.tar.gz.

File metadata

  • Download URL: tiktok_quality-1.0.0.tar.gz
  • Upload date:
  • Size: 69.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tiktok_quality-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a8a2caf1169bdef8107dd72a918c47b6dbd98500a03b96d7e607987a8917037d
MD5 9c1a9487dcc3dc1425a65391455a8382
BLAKE2b-256 33fc10fae5701bcc13cd272faefe0e2ff25c932ab1c9a0dc7fa762fdf0fbfd6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiktok_quality-1.0.0.tar.gz:

Publisher: publish.yml on BastienGimbert/tiktok-quality

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tiktok_quality-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tiktok_quality-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tiktok_quality-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73628216b97c5906e833464cda11fb10b4f4fa063725b93cc7812b7af9d12f5e
MD5 b13a4c46c69ecb853dbb4146e89eb94f
BLAKE2b-256 154f8606004de73acc744b5d14de60825539f62dc7d52c1961be5e3656ec9783

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiktok_quality-1.0.0-py3-none-any.whl:

Publisher: publish.yml on BastienGimbert/tiktok-quality

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page