Adaptive Video Streaming Foundation
NeverPause is a video delivery pipeline and player that handles bandwidth drops by switching to lower-quality fallback tracks. It uses AV1 encoded tracks and WebCodecs to swap video quality quickly without pausing to buffer.
pipeline/- Python scripts that analyze video files and encode them into fallback tracks using ffmpeg. It generates aninstruction.jsonconfig.player.html- A frontend playback engine. It reads theinstruction.jsonfile, streams the main video using a standard<video>tag, and pre-caches the fallback tracks usingIndexedDB. If the network drops, it switches to the fallback track using an off-screenCanvasand theVideoDecoderAPI.
Pipeline requirements:
- Python 3.12+
ffmpegwithlibaom-av1supportopencv-python-headless
python pipeline/video_fallback_pipeline.py video.mkvThis generates L1, L2, and L3 level WebM tracks in an AV1 container right alongside the source video.
python pipeline/generate_instruction_file.py video.mkvThis performs a deep-motion pass over your video, and outputs video_instruction.json with tracking data, motion thresholds, and fallback frame configurations.
Ensure the source video, the fallback generated WebM files, and the video_instruction.json are all hosted on your local server.
Launch the standalone player by setting the instruction path in the URL query string:
http://localhost:3000/player.html?instruction=path/to/video_instruction.json