Ugrás a fő tartalomhoz

v1.1.6

· 4 perc olvasás
John Renfrew
Programmer and data architect

Version 1.1.6 internal test release

  • Testing video upload and precessing

Following from conversation about StudentTasks, a technology test was completed to uncover issues and benefits in the requirement to allow video uploads, with later playback (markers and external). In the same way as documents, this needs to allow the re-submission of a file until the task is 'locked'.

Because the upload can be a long running process, then upload status needs to be visible while it is happening, and then encoding to straming formats takes place service-side, and so there is a requirement for the UI to show the stages of progress up to the point of completion. From that point, with the record in locked state the UI would show both a thumbnnail of the video, and button elements to view the video using the service player.

At this stage, all testing was done with a small (32sec) video, but later testing needs to work out timings for upload, encoding, and the storage implications of a years worth of full-size video.

After previous investigation conclusions, this test was done with Bunny -https://bunny.net. Their Stream platform is fully API driven and so highly suitable for the purpose. A playbook is written and fully tested.

  • Upload → first creates BunnyStream video object, returns videoId (similar to Inspera)
  • On return the StudentTask record is patched with this into videoID field and status of uploading
  • Upload → then the file is uploaded to that document record, using TUS resumable upload protocol (automaticlly handles interrupted transfers)
  • On status complete, the StudentTaks record is updated to show that processing is processing
  • MetaTags are added to the Stream record, which can be used for search and other API operations
  • Task record videoStatus updated through lifecycle, videoEmbedUrl populated when encoding complete
  • Bunny sends webhooks on progress and these are routed through Claris Connect, so that some actions can eaily update Task record, and also forwarded to the node service

Direct upload to Bunny ensure video bytes never touch our server, we only handle metadata and progress or status information. The player format is simple > https://player.mediadelivery.net/embed/{libraryId}/{videoId}

Investigation was made into using signed links for video retrieval but honestly wasted a lot of time on something which still unable to get to work. The files ar enot publicly exposed and the ony way you can get to view is from inside something where you are logged in, so for the moment parked unless there is deemed a need. The player's default behaviours (autoplay, captions, preload) can be set globally in the BunnyStream library dashboard.

Encoding

Encoding is free on the strndard tier but uses a shared queue. Premium encoding is available for a charge : uses Just-In-Time (JIT) technology — video playable within seconds of upload. Cost at $0.05/minute: estimate of max 1,200 minutes × $0.05 = $60/year maximum. Given that the marker is looking at the task records after they are completed it is unlikley that this would be required.

Testing with a 32-second 64MB MOV file completed end-to-end in under 6 minutes, testing with more realistic file will give better benchmarks. This does affect the ability of the student to view the uploaded and encoded file, discussion needed.

Futher development

A student on a mobile device (e.g. recording placement footage on a phone) could receive an SMS or email containing a link to a minimal, standalone upload page from inside the Digifolio. The link contains enough context to identify the StudentTask record without requiring full portal authentication, to be able to view the video. This would be linked to a one-time or short-lived token.