Vid format for embedding

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

T_Minus

Build. Break. Fix. Repeat
Feb 15, 2015
7,625
2,043
113
I need to generate some videos and am curious what's the best format and method to embed them on my site these days? Should we have a couple sizes for different devices or a higher resolution that's adjustable? Load on server is a factor, lowest hit to server is very important for this.

I haven't had a need to keep up with videos other than youtube ;)

thanks in advance :)
 

i386

Well-Known Member
Mar 18, 2016
4,220
1,540
113
34
Germany
Webm (vp8,vp9) & mp4 (h264) are standards for html5 and most cpus should have some acceleration for them (including arm cpus in tablets, phones). I would use webm as it's royalty free (it's possible that you have to pay if you want to use h264 for the videos).

Should we have a couple sizes for different devices or a higher resolution that's adjustable?
I don't think that there is a general answer for that.
If bandwidth is a factor for the clients (1.5gb/month data caps ftw) or server then use different sizes.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
511
113
I only ever do them for download over HTTP myself, but if you're intending to offer as am embedded object, it'll depend on what player you're using if you want fancy things like auto-switching for different bandwidth.

However, if you want to KISS and minimise bandwidth chewing on the web server, just figure out the maximum bitrate you can put up with, encoding accordingly (H.264 or VP9 video, opus audio) and chuck it in a simple <video> element like wot is shown 'ere (or a more advanced version here) since modern browsers can easily provide their own player and controls.

If you're not talking about bandwidth though, serving video files over HTTP isn't really any different from serving large files for download.

In terms of actually creating the files, ffmpeg is the gold standard for this sort of thing.
 

T_Minus

Build. Break. Fix. Repeat
Feb 15, 2015
7,625
2,043
113
Webm (vp8,vp9) & mp4 (h264) are standards for html5 and most cpus should have some acceleration for them (including arm cpus in tablets, phones). I would use webm as it's royalty free (it's possible that you have to pay if you want to use h264 for the videos).

I don't think that there is a general answer for that.
If bandwidth is a factor for the clients (1.5gb/month data caps ftw) or server then use different sizes.
Thanks!

I only ever do them for download over HTTP myself, but if you're intending to offer as am embedded object, it'll depend on what player you're using if you want fancy things like auto-switching for different bandwidth.

However, if you want to KISS and minimise bandwidth chewing on the web server, just figure out the maximum bitrate you can put up with, encoding accordingly (H.264 or VP9 video, opus audio) and chuck it in a simple <video> element like wot is shown 'ere (or a more advanced version here) since modern browsers can easily provide their own player and controls.

If you're not talking about bandwidth though, serving video files over HTTP isn't really any different from serving large files for download.

In terms of actually creating the files, ffmpeg is the gold standard for this sort of thing.
Great point, totally forgot about the players :) Really liking the new <video> simplicity, and likely the method I'll go for this.

Looking into utilizing Rackspace Cloud Files / Akamai for the videos they also appear to integrate with a player too for h264/mp4.