5. Python packageΒΆ

DISCLAIMER: The API is not stable yet and subject to change.

Aside from the CLI, you can use ytpb as a Python package.

The main class is ytpb.playback.Playback. It works with PlaybackSession, fetchers, audio and video streams, etc. Behind the scene, the lower level functions from the verb-named modules are utilized, such as ytpb.download, ytpb.locate, ytpb.merge.

On the level above, there are Actions. They function with a playback to download excerpts, compose MPEG-DASH MPDs, and capture frames.