{"action":"opened","issue":{"url":"https://api.github.com/repos/cs50/video50/issues/91","repository_url":"https://api.github.com/repos/cs50/video50","labels_url":"https://api.github.com/repos/cs50/video50/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/cs50/video50/issues/91/comments","events_url":"https://api.github.com/repos/cs50/video50/issues/91/events","html_url":"https://github.com/cs50/video50/issues/91","id":207893151,"number":91,"title":"Evaluate episode JSON","user":{"login":"lukejacksonn","id":1457604,"avatar_url":"https://avatars.githubusercontent.com/u/1457604?v=3","gravatar_id":"","url":"https://api.github.com/users/lukejacksonn","html_url":"https://github.com/lukejacksonn","followers_url":"https://api.github.com/users/lukejacksonn/followers","following_url":"https://api.github.com/users/lukejacksonn/following{/other_user}","gists_url":"https://api.github.com/users/lukejacksonn/gists{/gist_id}","starred_url":"https://api.github.com/users/lukejacksonn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukejacksonn/subscriptions","organizations_url":"https://api.github.com/users/lukejacksonn/orgs","repos_url":"https://api.github.com/users/lukejacksonn/repos","events_url":"https://api.github.com/users/lukejacksonn/events{/privacy}","received_events_url":"https://api.github.com/users/lukejacksonn/received_events","type":"User","site_admin":false},"labels":[{"id":42089887,"url":"https://api.github.com/repos/cs50/video50/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-15T18:48:37Z","updated_at":"2017-02-15T18:48:37Z","closed_at":null,"body":"The JSON files that are stored on the CDN have proven very useful when developing the video50 player. Things evolved a lot over the course of the year but as time has passed the dataset has stabilized somewhat which raises the opportunity to evaluate what worked, what didn't and any potential improvements.\r\n\r\nObservations (in no particular order):\r\n\r\n- There is a `title` attribute, in the form `CS50 2016 Week 0` but episodes have no real indexable attribute, it would be useful to have attributes that describes explicitly the `week` and `year` that the episode was filmed at. This way we could easily derive a title, find the next and previous episodes or query `all episodes where week is larger than 5` which would be useful for something like e50b.\r\n\r\n```\r\n{\r\n  week: 0,\r\n  year: 2016\r\n}\r\n```\r\n\r\n- The `chapters` attribute is an array that only ever contains 1 item (seeing as we do not translate them, or at least we haven't this year) perhaps we could just simplify this to..\r\n\r\n```\r\n{\r\n  chapters: 'https://cdn.cs50.net/2016/fall/lectures/0/lang/en/index.vtt'\r\n}\r\n```\r\n- A step further here would be to just generate chapters as an array of objects that have a `start` time and a `title`, then everything is in one place and easy to lookup. You could still generate the vtt file anyway, but most applications are going to need to convert this to JSON anyway to make use of it.\r\n```\r\nchapters: [\r\n  { start: 0, title: 'This is CS50' },\r\n  { start: 25, title: 'Course Overview' },\r\n  ....\r\n]\r\n```\r\n- As highlighted in https://github.com/cs50/video50/issues/89 and by @dcoffey3296 in his email. The sources attribute is unnecessarily convoluted. Representing various quality sources could be boiled down to something as simple as:\r\n```\r\nsources: {\r\n  '240p': {\r\n    main: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-240p.mp4',\r\n    cameras: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-240p.mp4',\r\n    screen: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-240p.mp4',\r\n    stream: 'rtmp://stream.cs50.net/cfx/st/mp4:2016/fall/lectures/0/week0-240p.mp4'\r\n    audio: 'https://cdn.cs50.net/2016/fall/lectures/0/week0.mp3'\r\n  },\r\n  ...\r\n}\r\n```\r\n- The above changes to `sources` attribute, would effectively render the `downloads` attribute redundant seeing as the values would just be the `main` attribute of the `sources[quality]` key.\r\n- The `captions` attribute is an array of objects with a `srclang` and `src` attribute. Only 3 episodes of 2016 actually have translated captions (I'm not sure if this was something we just decided against half way through or they just stopped being translated). But the dataset could be normalized to either:\r\n```\r\ncaptions: {\r\n  en: \"https://cdn.cs50.net/2016/fall/lectures/0/lang/en/week0.srt\",\r\n  es: \"https://cdn.cs50.net/2016/fall/lectures/0/lang/es/week0.srt\",\r\n  ...\r\n}\r\n```\r\nor if we decide to only support one track (much easier to maintain but not as accessible?) then:\r\n```\r\ncaptions: \"https://cdn.cs50.net/2016/fall/lectures/0/lang/en/week0.srt\",\r\n```\r\n- The `thumbnails` attribute is an array with objects with the attributes `src`, `type`, `height`, `width`. All of those attributes can be derived from the source file.  So arguably we could condense this down to:\r\n```\r\nthumbnails: {\r\n  140p: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-140p.png',\r\n  1080p: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-1080p.png',\r\n  ...\r\n}\r\n```\r\n- There have been a few times where having a `description` and more contextual `title` attribute would have proven useful. For instance a listings page such as (experiment)[http://codepen.io/lukejacksonn/pen/ZLMgZE]. This attribute could also be used to pre-populate fields when uploading videos to YouTube.\r\n- Adding fields such as `notes`, `problem`, `source` linking to the appropriate resource would also be very useful for other applications, such as the CS50.net weeks page for instance, could use this same data set as a source of truth.\r\n- With the imminence of explained videos being integrated.. perhaps we add an `explained` key with a value of a similar schema to the `chapters` key:\r\n```\r\nexplained: [\r\n  { start: 120, video: 'o4SGkB_8fFs' },\r\n  { start: 5000, video: '1RmJjrxCaCs' },\r\n  ....\r\n]\r\n```\r\n- A `category` or `type` attribute could be useful to differentiate shorts, from walkthrough from lectures etc. Thinking bigger than the 12 lecture episodes now..\r\n- An attribute with `tags` associated with the episode would make the data very query-able. For instance an episode could be tagged `e50` or `mba` and be filtered out with ease.\r\n- Not sure if the `authors` has any real life application as we can nearly assume it a constant.\r\n\r\nThere are probably some over simplifications here but what I'm going for is a real nice and succinct representation of a collection of `episodes` that lives in one centralized location and that is useful, not just for use with the player, but other application and services CS50 wide. My dream is for the ability for a student or teacher to be able to query/filter this data to extract what they need from the resource pool. A real life query we could run with a really good quality collection of data could be.. _Get me all the chapter from episodes that are from 2016 and are tagged MBA_ just as an example. Given the relative size of the dataset ~150 videos a year, I think this is feasible to implement.\r\n\r\nHere is what a full episode object could look like:\r\n\r\n```\r\n{\r\n    episode: 0,\r\n    year: 2016,\r\n    title: \"Scratch\",\r\n    description: \"David introduces just how empowering the field of Computer Science is and how it intersects with the humanities, arts, and other sciences.\",\r\n    tags: [\"scratch\", \"C\", \"binary\", ...],\r\n    youtube: {\r\n      main: \"o4SGkB_8fFs\",\r\n      cameras: \"k40HGu_x0bg\",\r\n      screens: \"1RmJjrxCaCs\",\r\n      vr: \"M-XlYymh714\"\r\n    },\r\n    thumbnails: 'https://cdn.cs50.net/2015/fall/lectures/0/w/week0w.vtt',\r\n    captions: 'https://cdn.cs50.net/2015/fall/lectures/0/w/lang/af/week0w.srt',\r\n    transcript: \"https://cdn.cs50.net/2015/fall/lectures/0/w/lang/en/week0w.txt\",\r\n    notes: \"https://cdn.cs50.net/2015/fall/lectures/0/w/notes0w/notes0w.pdf\",\r\n    chapters: [\r\n      { start: 0, title: 'This is CS50' },\r\n      { start: 25, title: 'Course Overview' },\r\n      ....\r\n    ],\r\n    explained: [\r\n      { start: 120, video: 'o4SGkB_8fFs' },\r\n      { start: 5000, video: '1RmJjrxCaCs' },\r\n      ....\r\n    ],\r\n    thumbnail: {\r\n       140p: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-140p.png',\r\n       1080p: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-1080p.png',\r\n       ...\r\n    },\r\n    sources: {\r\n      '240p': {\r\n        main: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-240p.mp4',\r\n        cameras: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-240p.mp4',\r\n        screen: 'https://cdn.cs50.net/2016/fall/lectures/0/week0-240p.mp4',\r\n        stream: 'rtmp://stream.cs50.net/cfx/st/mp4:2016/fall/lectures/0/week0-240p.mp4'\r\n        audio: 'https://cdn.cs50.net/2016/fall/lectures/0/week0.mp3'\r\n      },\r\n      ...\r\n    }\r\n} \r\n```\r\n"}}
{"actor":{"display_login":"lukejacksonn"}}