0

I've been researching for this for a minute but I'm not getting a straight answer to my exact question. I'm trying to understand the process behind video players switching video quality (480p, 720p, 1080p, etc.).

In order to achieve that, I am first asking if this is more of a front-end thing or back-end thing? And to illustrate the first answer, does one:

A) Upload one video file to a server (S3/Google Cloud) at the highest quality, then use a video tag in HTML and add a property to specify which quality is desired?

B) Upload one video file to a server (S3/Google Cloud) at the highest quality, then use JS to control the playback quality?

C) Split highest quality uploaded file into multiple files with different streaming quality using server code, then use front-end JS to choose which quality is needed?

D) Realize that this is way more work than it seems and should leave it to professional video streaming services, such as JWPlayer?

Or am I not seeing another option that's possible without a streaming service, without actually building a streaming service?

If the answer is pretty much D, what service do you recommend?

Note: I know YouTube and Vimeo can handle this but I'm not trying to have that kind of overhead.

Martavis P.
  • 1,708
  • 2
  • 27
  • 45
  • What do you mean by "video quality"? – guest271314 Jan 19 '18 at 00:52
  • 480p, 720p, 1080p, 4K... – Martavis P. Jan 19 '18 at 00:53
  • 1
    I believe that the answer is C, and perhaps D depending on your expertise. If you used client-side JavaScript to preform downscaling, you'd still be using the same amount of bandwidth as the highest resolution. So what would be the point of the lower resolutions? – Sidney Jan 19 '18 at 00:54
  • Ah, ok. I was hoping it could be relatively easy, in terms of figuring out how to do video compression. So just to make sure, (all answers still welcome), the gist of switching video quality is a matter of saving the video multiple times for each quality? – Martavis P. Jan 19 '18 at 01:29

1 Answers1

0

It is answer 'C' as noted in the comments, and maybe partly answer 'D' also.

You need a video streaming server that supports one of the popular adjustable bitrate streaming protocols (ABR) DASH or HLS. ABR allows the client device or player download the video in chunks, e.g 10 second chunks, and select the next chunk from the bit rate most appropriate to the current network conditions.

There are open source streaming servers available such as GStreamer and licensed ones like Wowza, which you can sue if you want to host the videos yourself.

For some example of ABR see this answer: https://stackoverflow.com/a/42365034/334402

Mick
  • 24,231
  • 1
  • 54
  • 120