Help & Guide

Video Chapter Editor — User Guide

Add chapter markers to your videos, edit titles and timestamps, and export ZWMAP-compatible JSON for seamless ZWPlayer integration.

Getting Started

The Chapter Editor is a free online tool that lets you add chapter markers to your videos. Chapters allow viewers to quickly jump to specific sections — similar to YouTube's chapter feature. After editing, export a ZWMAP JSON file for easy integration with websites and CMS platforms.

Quick Start Steps

  1. Load a video

    Drag and drop a local video file (MP4, WebM) onto the window, or paste a remote video URL into the input field and click "Load".

  2. Add chapters

    Click the "New Chapter" button or press N to quickly create a new chapter. The chapter will be automatically positioned at the current playback time.

  3. Set titles and times

    Fill in the title (required) for each chapter and adjust the start time. Click the "Use Current Time" button to set the chapter start point to the current playback position precisely.

  4. Preview and export

    Press P or click the Preview button to see how chapters appear in the player. Once satisfied, click "Export" to download the ZWMAP JSON file.

Tip: This tool runs entirely in your browser. No video data is uploaded to any server — your files stay private.

Keyboard Shortcuts

Speed up your workflow with these keyboard shortcuts:

Key Action Description
Space Play / Pause Toggle video playback
, Step Back Seek backward one frame
. Step Forward Seek forward one frame
Skip Back 5s Seek backward 5 seconds
Skip Forward 5s Seek forward 5 seconds
N New Chapter Create a new chapter at the current playback position
Delete Delete Chapter Delete the currently selected chapter
Ctrl+Z Undo Undo the last operation
Ctrl+Y Redo Redo the last undone operation
Ctrl+S Export JSON Export the ZWMAP JSON file
P Preview Open ZWPlayer preview with chapters
Esc Exit Exit preview mode

Working with Chapters

Learn about the chapter properties and features available in the editor:

Chapter Properties

Property Required Description
title Yes The display name of the chapter, shown when hovering over the player progress bar.
start_time Yes The chapter start timestamp in HH:MM:SS.mmm format. Shorthand formats like MM:SS or SS are also accepted.
end_time No The chapter end timestamp. Optional — if left empty, the next chapter's start time is used automatically.
description No A detailed description for the chapter. Optional, used to provide additional context.
style.background No The chapter marker color on the progress bar. Use the color picker or click "Random Color" to auto-assign.
image No The chapter thumbnail image URL. Click "Capture Current Frame" to extract a frame from the current video position.

Convenience Features

  • The "Use Current Time" button sets the chapter start point to the current video playback position precisely, eliminating manual input.
  • The "Capture Current Frame" button extracts the current video frame as a chapter thumbnail. Note: remote videos may be blocked by cross-origin policy.
  • The waveform visualization displays an audio waveform below the progress bar, helping you locate chapter split points by audio characteristics. Loading remote videos may require additional confirmation.
  • Drag to reorder: drag chapters in the list to adjust their order. Times are recalculated automatically.

Text Import Guide

The Chapter Editor supports bulk importing chapter data from text, with several common timeline formats:

Supported Formats

YouTube Format

Timestamp and title separated by a space, supports H:MM:SS or M:SS format:

0:00 Introduction
1:20 Installation Guide
5:30 Basic Usage
12:00 Advanced Features
25:15 Summary

Bilibili Format

Similar to YouTube format, titles can be in any language:

00:00 开场白
01:20 安装教程
05:30 基础用法
12:00 高级功能
25:15 总结

Plain Timestamp

Contains only timestamps; titles are auto-generated as "Untitled Chapter":

00:00
01:20
05:30
12:00
25:15

How to Use

  1. Click the "Text Import" button in the JSON panel to open the import dialog.
  2. Paste the timeline text into the text box, one chapter per line.
  3. Click "Parse & Import" — the editor will auto-detect the format and import the chapters.

Tip: Imported chapters are appended to the existing list and will not overwrite current data.

ZWMAP Chapter Protocol Specification

The ZWMAP (Z&W Media Annotation Protocol) chapter type defines a standard JSON format for describing video chapters. This protocol enables interoperability between chapter editing tools and video players.

Protocol Header

Every ZWMAP chapter document begins with a protocol identifier:

{
  "zwp_protocol": "ZWMAP/1.0",
  "zwp_type": "chapter",
  "zwp_version": "1.0"
}

Chapter Object Fields

Field Type Required Description
title string Yes The chapter title. Displayed as the chapter name in the player.
start_time string | number Yes The chapter start time. Accepts HH:MM:SS.mmm string format or a number in seconds.
end_time string | number No The chapter end time. Optional. Same format as start_time.
style object No Chapter style object. Optional. Currently supports the background (marker color) property.

Complete Example

{
  "zwp_protocol": "ZWMAP/1.0",
  "zwp_type": "chapter",
  "zwp_version": "1.0",
  "chapters": [
    {
      "title": "Introduction",
      "start_time": "00:00:00.000",
      "style": { "background": "#e74c3c" }
    },
    {
      "title": "Installation",
      "start_time": "00:01:20.000",
      "style": { "background": "#3498db" }
    },
    {
      "title": "Basic Usage",
      "start_time": "00:05:30.000",
      "style": { "background": "#2ecc71" }
    }
  ]
}

This example defines a video with 3 chapters, each specifying a title, start time, and marker color.

ZWPlayer Integration

ZWPlayer is a full-featured JavaScript video player with built-in chapter support. Here's how to integrate your edited chapters with ZWPlayer.

Player Configuration

Add the chapters property to your ZWPlayer initialization config:

var player = new ZWPlayer({
  playerElm: 'mse',
  url: 'https://cdn.example.com/video.mp4',
  chapters: [
    {
      title: "Introduction",
      start_time: "00:00:00.000",
      style: { background: "#e74c3c" }
    },
    {
      title: "Installation",
      start_time: "00:01:20.000",
      style: { background: "#3498db" }
    },
    {
      title: "Basic Usage",
      start_time: "00:05:30.000",
      style: { background: "#2ecc71" }
    }
  ]
});

Segment Looping

ZWPlayer supports segment looping (AB loop) with two methods:

Progress Bar AB Loop

Enable the segmentButton option to display a segment selection button on the control bar. Click the button to activate, then drag the start and end handles on the progress bar to define the loop range. The video will continuously loop within the selected segment.

var player = new ZWPlayer({
  playerElm: 'mse',
  url: 'https://cdn.example.com/video.mp4',
  segmentButton: true
});

Chapter Loop Playback

In the chapter search panel, each chapter has a loop button. Click it to loop playback within that chapter's time range. When the playback reaches the end of the chapter, it automatically jumps back to the beginning. Seeking or clicking another loop button cancels the current loop.

Using a JSON URL

Instead of passing an array, you can pass the ZWMAP JSON file URL as a string. ZWPlayer will fetch and parse it automatically:

var player = new ZWPlayer({
  playerElm: 'mse',
  url: 'https://cdn.example.com/video.mp4',
  chapters: 'https://cdn.example.com/chapters/movie_chapter.json'
});

Deployment: Upload the exported ZWMAP JSON file to your web server, then pass the file URL to ZWPlayer's config.

Drag & Drop Loading

You can also load chapters by dragging files directly onto the ZWPlayer instance:

  • Chapter JSON only: Drop a *_chapter.json file onto the player to load chapters for the currently playing video.
  • Video + Chapter together: Drag a video file along with its chapter JSON — the player will auto-match them by filename (e.g., movie.mp4 matches movie_chapter.json).
  • Playlist drag: Drop multiple videos with their chapter files to create a playlist with chapter markers for each item.

Note: Dropped JSON files support both ZWMAP protocol format and legacy bare array format — the player auto-detects the format.

Chapter Search

When chapters are loaded, click the chapter button on the control bar to open the chapter search panel. Type a keyword to instantly filter chapters by title or description. Matching text is highlighted in the results. Click any result to jump to that chapter. The panel supports drag-and-drop repositioning and can be closed with the close button or by pressing Esc.

Frequently Asked Questions

What are video chapters?
Video chapters are segment markers displayed on the player progress bar, similar to a book's table of contents. Viewers can click on chapter markers to jump directly to the corresponding section. Major platforms like YouTube and Bilibili support this feature. With ZWPlayer, you can add chapters to your own videos.
What text import formats are supported?
Three common formats are supported: 1) YouTube format (e.g., "0:00 Introduction"), 2) Bilibili format (e.g., "00:00 Opening"), 3) Plain timestamp (timestamps only). The editor auto-detects the format — no manual selection needed.
How do I capture a chapter thumbnail?
Select a chapter, play the video to the desired frame, then click the "Capture Current Frame" button. The tool uses the Canvas API to capture the current frame and fills in the thumbnail field automatically. Note: remote videos may be blocked by cross-origin policy — use a local file instead.
What are the waveform requirements?
Waveform visualization is generated locally in the browser using the Web Audio API and Canvas. For local video files, no additional requirements. For remote videos, the server must support CORS (Cross-Origin Resource Sharing), and the tool may need to download the full video to generate the waveform.
Does the editor support undo/redo?
Yes. Use Ctrl+Z to undo and Ctrl+Y to redo. The editor tracks all operations including creating, deleting, and editing chapters. Operation history is cleared when the page is closed, but chapter data is auto-saved as a draft.
What export formats are supported?
Currently, the editor exports ZWMAP JSON format (.json file) — a standardized chapter description format that works directly with ZWPlayer. The JSON file contains all chapter titles, timestamps, and style information.