How do people handle Kirby sites with lot's of video?


#1

I’m doing a site for a client who wants to display a lot of video, some are like 40mb. What is the best way to handle this with Kirby? I have already suggested to the client to run the videos through Handbrake to reduce the size. Judging from my research a CDN would help as well, does anyone have any suggestions for a CDN that integrates well with the Kirby or any other ideas of how to handle lots of videos? Any help would be greatly appreciated.


#2

If it was me I would use a Vimeo Plus or Pro account since they have a global network already and Kirby has built in support for Vimeo. They allow you to domain lock the videos so they will only playback on your domain.

For more general purpose, KeyCDN works great with Kirby, but I personally haven’t tried it.

Handbrakes decent enough for reducing the video size, but I prefer Shotcut which has presets built in for various video services and gives you a decent set of editing tools.


#3

Thanks for the great suggestion, using Vimeo as the CDN will suit my needs perfectly. I’ve been playing around with it but have run into a slight problem, in order to access any versions of the video above 1080p I have to use the API and am struggling to find ways to use the SDK without composer, have you had any experience with this?


#4

Not really im afraid - can you point me at some documentation?

I do know you can set the video size by adding this to your config:

c::set('kirbytext.video.vimeo.options', [
  'quality' => '1080p'
]);

Maybe you can get past 1080p that way. :slight_smile: Be aware though, that Vimeo will fall back to a lower resolution if the video doesn’t actually exist on Vimeo at that size. If it looks like it has no effect, check on Vimeo to make sure you actually do have videos at the desired size.

Valid quality values are 360p, 540p, 720p, 1080p, 2k, 4k

More options you can set through the config settings are listed here.