David Kimura PRO said about 3 years ago on Embedding Youtube Videos into Action Text with Stimulus :
  I'm using a variation of this method for the Drifting Ruby videos. However, it's pretty much on par with how I'm doing it. One thing that I do prior to uploading the video is first using Handbrake to transcode the video. https://www.driftingruby.com/episodes/adaptive-bitrate-streaming-with-active-storage