Skip to content

Adding or updating video content

Brad Buchanan edited this page Aug 5, 2020 · 3 revisions

All of the video content on Code.org should be hosted in two places.

  1. On our YouTube channel
  2. In the videos.code.org S3 bucket

The default experience on our site embeds the YouTube video using a "privacy-enhanced" mode from www.youtube-nocookie.com. Schools that block YouTube altogether will see our fallback player, which loads the videos from videos.code.org. See our IT requirements page for more details. In both cases, videos.code.org is used to provide video downloads.

Videos can be managed by users with levelbuilder permission at https://levelbuilder-studio.code.org/videos. To upload a new video, you will need:

  • A link to the video file (perhaps in Dropbox)
  • The YouTube code
  • The "Show Notes" screenshots and strings

Manual management of videos

You can also update video content manually with the following steps:

  1. Sign in to the AWS Console and open S3.
  2. Click on the bucket videos.code.org
  3. Choose the applicable course folder (e.g. computer-science-principles) or group (e.g. 'social' for promo videos), or create a new one.
  4. Make sure your video names is friendly: Descriptive, all lowercase, and kebab-case. Video file names may include parts like "v3" and "25MB" which you should remove. If it's a curriculum video, it's best if it's the same as the key_name in videos.csv.
  5. Click the Upload button and upload the video file to S3. Videos have typically been 5-20MB mp4 files. These are known to work with the fallback video player. If it's larger, try asking for a compressed size. Use the following settings when uploading:
    1. The video should be publicly accessible (this is not the default, even in a public bucket)
    2. Add metadata Content-Type: application/octet-stream. This causes the videos to download when the URL is visited, instead of opening in the browser. Note, for some social videos you might use Content-Disposition: attachment instead.
  6. Your video is now available on videos.code.org at a URL matching its folder and name. For example, if you uploaded example.mp4 to the plp folder, your video URL is https://videos.code.org/plp/example.mp4
  7. If you've just updated a video and you are still seeing the old version when you open the link, you are probably getting a version cached in Cloudfront. We have a Cloudfront distribution just for videos.code.org. You can wait 24 hours, or speed up the process by creating a Cloudfront invalidation for the specific video path(s) you need to update.
Clone this wiki locally