File fallbacks / alternative file versions

This tackles both the retina and HTML5 video territory:

Do you know elegant ways to allow manual uploads of alternative file versions via panel?

E.g. for a HTML5 video you supply 2 versions, whereas only 1 “file” gets output with title, description, etc.
This also concerns retina image versions. Normally, I would just scale those via CMS, but we need to precisely optimise images; so a manual override should be possible at least.

So what’s the best way to link 2 files via panel? Simply via 2 identical directory structures, maybe with a feedback that a second file with the same name is available?

Another option that comes to my mind is linking 2 files via structures; but we’re likely talking 20 images per pages, so that would be some fiddling.
Could a structure field be auto-populated on upload? Or registered via hook?

You could do a filename convention and in your template, for example listen for @2x images (but keep in mind that only using x-descriptors for responsive images, can lead to bad performance anti-patterns the w-descriptor in srcset combined with the sizes is more preferable) and for video listen for file extensions .mp4, .mov etc.

I actually did that – remind me to post some working code if I don’t get to it today.

… there you go, I found an old marker and posted the gist for collecting multiple files on video for thumbnails, fallbacks, etc..