One of my favourite features of Ghost is how it automatically generates sizes and webp versions of uploaded images, which allows serving brilliantly optimized posts and pages.
But Ghost currently has no such capability for video files. I would love it to have this.
It could follow a similar pattern to the image URL optimization, except perhaps replace “format” with “quality”.
eg:
- Original: https://my-cool-ghost-site.com/content/media/2024/06/cool_video.mp4
- 720p version: https://my-cool-ghost-site.com/content/media/size/w1280/2024/06/cool_video.mp4
- 1080p version with slightly reduced bitrate: https://my-cool-ghost-site.com/content/media/size/w1920/quality/medium/2024/06/cool_video.mp4
- 480p version with greatly reduced bitrate: https://my-cool-ghost-site.com/content/media/size/w640/quality/low/2024/06/cool_video.mp4
This could all be achieved with the free and open source tool ffmpeg.
You could even use the +faststart flag to make large videos able to start playback immediately, instead of the whole video needing to be downloaded.