Git Product home page Git Product logo

otio-youtube-example's Introduction

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.

otio-youtube-example's People

Contributors

utsab avatar hisergiorojas avatar makayla-k avatar

Stargazers

 avatar Will Riley avatar Nikita avatar Nick Porcino avatar Alex Jennings avatar

Watchers

Joshua Minor avatar Nick Porcino avatar James Cloos avatar Daniel Flehner Heen avatar Eric Reinecke avatar Mateusz Wojt avatar  avatar Roger Nelson avatar

otio-youtube-example's Issues

Process the video using OTIO

Create a single clip on the timeline with a media_reference to the original youtube video file

How to test:

  • Verify that the clip has the correct media_reference.
  • Verify that the Timeline has the correct number of clips.
  • Verify that available_range is set correctly.

Write documentation for explaining OTIO in 5 levels of complexity

We would like to explain OTIO in five levels of complexity. Currently, the documentation covers the first two levels only.

  • Level 1: The high level purpose of OTIO
  • Level 2: OTIO is a file format, an API, and a collection of adaptors and plugins.
  • Level 3: The technology stack of the OTIO codebase
  • Level 4: Important design patterns / architectural components
  • Level 5: Walkthrough of the codebase

To test your changes, follow the instructions on installing MkDocs.

Improve parsing of timestamps in youtube description to work for other formats

Currently, the regular expressions that we use to parse time stamps assume that they will have the following format:

for example,

1:47 Introduction to hash maps

But there are other timestamp formats such as in this video. Can you improve the parsing logic to work with the format in that video? Also, are there other timestamp formats featured in other videos that we're not aware of?

Process the video description using OTIO

Parse the video description in python and create a Timeline object with Markers to represent the chapters

Add a check before the main video description parsing logic which confirms that the video description actually is text and that it contains time stamps.

How to test:

  • Verify that the Timeline object has the correct of Markers on it.
  • Verify that each marker has the correct text on it.

Download the youtube video and description

Create a python script that takes as an input argument the url for a youtube video. The script should use youtube-dl to download the video file and the video description.

How to test:

  • Verify that an mp4 and txt file is created on disk.

Create a Media Linker Plugin

We would like to illustrate a plugin within the otio-youtube-example. Plugins are an interesting concept within OTIO which may be confusing to understand for newbies. If we can show a concrete example of a plugin within our repo, we could help to clarify what a plugin is, how it is used, and how to create one.

Here is some feedback from Joshua Minor on a possible direction we can explore to create a plugin:

"... make a Media Linker plugin which looks at individual clips in an OTIO, and if they point to a YouTube URL, it could pull metadata & markers into the clip from YouTube."

https://opentimelineio.readthedocs.io/en/latest/tutorials/write-a-media-linker.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.