opentimelineio / otio-youtube-example Goto Github PK
View Code? Open in Web Editor NEWExample Python script which turns a YouTube video and description into an OpenTimelineIO OTIO file.
License: Apache License 2.0
Example Python script which turns a YouTube video and description into an OpenTimelineIO OTIO file.
License: Apache License 2.0
See this comment
We would like to explain OTIO in five levels of complexity. Currently, the documentation covers the first two levels only.
To test your changes, follow the instructions on installing MkDocs.
How to test:
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?
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
See reneicke's comment
Adding a linter can uncover unexpected problems and align the style/formatting to a standard.
See this comment
See ssteinbach's comment
See this comment
Create something similar to this (but more user-friendly) that documents our Youtube/OTIO example.
See jminor's comment
See jminor's comment
Right now, the unit tests require youtube-dl to finish downloading a complete video from Youtube. Ideally, we can stub some of this data (mp4 file and the description file) so that the tests can still run even if youtube-dl is not functioning.
Based on jminor's feedback:
"I always worry about timezones accidentally causing calculations like this to vary."
Also see Reinecke's comment about using timedelta.
A youtube video description could have timestamps in a variety of formats:
We should have a test cases to confirm that each of these formats is properly handled.
See ssteinbach's comment
Create a single clip on the timeline with a media_reference to the original youtube video file
How to test:
Confirm that the markers have the correct timestamp and title.
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:
Right now, most of the logic for downloading the video from youtube and importing the data into the OTIO Timeline is in one long block of code. It would be better to refactor this code to use more helper functions.
See this comment
See ssteinbach's comment
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:
Ideally, the command to run the example could look like the following:
python3 youtube_chapters_demo.py pvkTC2xIbeY --skip-video-download
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.