Skip to content

hhkaos/youtube-timestamp-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Chapter Validator

A browser-only web app for finding what is broken in your YouTube chapter timestamps.

Paste a YouTube video description, optionally add a YouTube video URL, and the app will check common chapter-breaking problems such as formatting mistakes, invalid ordering, missing 0:00, short chapter gaps, and timestamps that go beyond the detected video duration.

Current Status

This project is currently a frontend-only app.

It can:

  • Validate pasted chapter timestamps from a video description
  • Show line numbers beside the pasted description
  • Use an optional YouTube URL to try to read the video duration client-side
  • Show the detected duration in the form
  • Warn when a timestamp is longer than the detected video length
  • Keep validation rules and common mistakes in a separate file

It does not currently:

  • Auto-fetch the full YouTube description from the URL
  • Reliably check privacy, channel restrictions, or YouTube Studio state
  • Use a backend or the YouTube Data API

What It Checks

  • The first detected chapter must start at 0:00
  • At least 3 chapter timestamps must be present
  • Timestamps must be in ascending order
  • Each chapter gap must be at least 10 seconds
  • Timestamps must use MM:SS or HH:MM:SS
  • Each chapter should be on its own line
  • There must be a space between the timestamp and the title
  • The chapter list cannot exceed 50 entries
  • Long titles may be truncated
  • Full URLs inside chapter titles are treated as errors
  • @mentions, #hashtags, and bare domains inside chapter titles are treated as fragile and shown as warnings
  • If the video duration is detected from the URL, timestamps beyond the video length are shown as warnings

Project Files

Run Locally

Because the app uses JavaScript modules, serve it through a local web server instead of opening the HTML file directly.

Example:

python3 -m http.server 8000

Then open:

http://127.0.0.1:8000/index.html

How The Optional URL Works

If you provide a YouTube URL and click Validate timestamps, the app tries to read the video duration in the browser using the YouTube iframe player API.

That means:

  • The URL is useful for duration-based warnings
  • The app can display the detected video length after validation
  • The app still cannot pull the full video description automatically in this version

Limitations

  • Client-side duration lookup may fail depending on browser conditions, network restrictions, embedding limitations, or YouTube behavior
  • Some YouTube chapter conditions still require manual checking
  • The rules are based on common YouTube chapter requirements plus observed behavior gathered during this project

About

Browser-only YouTube chapter validator that checks pasted timestamps for formatting, ordering, and duration issues.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors