mitodl / odl-video-service

building blocks for a basic video service for ODL
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Allow video, thumbnails, captions to come from multiple S3 buckets #412

Closed pdpinch closed 6 years ago

mbertrand commented 6 years ago
screen shot 2018-01-23 at 3 54 04 pm
pdpinch commented 6 years ago

I think the mapping of S3 to cloudfront is part of #411 -- please add a comment and/or edit the description.

This issue was for any necessary data model and front-end changes.

mbertrand commented 6 years ago

Each VideoS3 object (used for video files, thumbnails, and captions) has a bucket_name and s3_object_key property. These can be set to the appropriate TechTV bucket and path when creating an object, for example:

VideoThumbnail.objects.get_or_create(
     s3_object_key='techtv/thumbnails/<video_key>/001.jpg',
     bucket_name='odl-video-services-techtv-thumbnails-ci'
     video=video
)

Each cloudfront URL is based on the S3 object key, so assuming the cloudfront distribution maps unique URL paths for techtv files to S3 buckets, everything should just work.

A complication is that each VideoFile is assumed to be either the original uploaded file or an m3u8 playlist of transcoded files, which won't be the case for TechTV videos. That will be addressed as part of #413.

pdpinch commented 6 years ago

Does that mean we can just close this?

mbertrand commented 6 years ago

Yes, I'll close it.