Skip to content

Example Python script which turns a YouTube video and description into an OpenTimelineIO OTIO file.

License

Notifications You must be signed in to change notification settings

OpenTimelineIO/otio-youtube-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

otio-youtube-example

Overview

This project serves as a working example to illustrate the key features of OpenTimelineIO (maintained by the Academy Software Foundation). The example will take in a youtube url as input. The example will then download the youtube video and description onto the user's local computer and import the data into an OTIO Timeline. The example will extract the "table of contents" data from the youtube description and import this information as "Markers" on the Timeline. The final timeline is exported as a .otio file.

Licensing

This repository is licensed under the Apache License, Version 2.0.

Documentation

The documentation can be found here: https://opentimelineio.github.io/otio-youtube-example/

The documentation is intended to provide a detailed walkthrough of the basic OpenTimelineIO concepts within the context of a concrete example.

Session Notes (A log of our programming sessions as we build this).

Pre-Requisites

  • Install the OpenTimelineIo python library based on these instructions
  • A valid C/C++ compiler
  • For MacOS if you run into a 'SSL: CERTIFICATE_VERIFY_FAILED' error then follow these instructions

Installation

sudo pip3 install youtube-dl

python version: 3.x

Sample usage:

** To run the actual example: **

git checkout youtube_demo
python3 youtube_chapters_demo.py pvkTC2xIbeY

This should create two files on your local computer: NtevTo96Wjc.description and NtevTo96Wjc.mp4

** To run the test: **

python3 -m unittest test_youtube_chapters_demo.py

Linter

Install black

pip3 install black

Run the linter

black {source_file_or_directory}

MkDocs

The otio-youtube-example project utilizes MkDocs to build the documentation as a user-friendly web application. If you wish to update the documentation, you should follow these instructions to build the documentation web application locally.

Install mkdocs

pip3 install mkdocs

Run MkDoc Server

mkdocs serve

After you test your documentation changes locally, you can push your changes to the official otio-youtube-example documentation with the following instructions:

Build the site

mkdocs build

Deploy to Github Pages

mkdocs gh-deploy 

Contributions

If you have any suggested changes to the otio-youtube-example repository itself, please provide them via pull request or create an issue as appropriate.

All contributions back to the template repository must align with the contribution guidelines of the OpenTimelineIO project.

About

Example Python script which turns a YouTube video and description into an OpenTimelineIO OTIO file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages