Sometimes we need to get video sizes in before eg. for lazy loading or stuff like packery.
They'd probably want something like:
https://github.com/JamesHeinrich/getID3
If they wanted to extract the meta information. It's non-trivial to try to do.
It's definitely not trivial and is pretty niche. I could see it happening as a plugin, though.
This plugin already does it:
maybe exiftools is worth a try, if its installed on the host system.
This definitely feels like a job for a plugin.
@jan-thoma there鈥檚 no additional package installation required to get Asset Metadata plugin running (it uses getID3). You can store the video width, height or other metadata like framerate.
{{ metadata.video.resolution_x ?? null }}
That plugin doesn't seem to have made it to the plugin store yet. What are folks doing in Craft 3 for this?
For anyone that ends up here, @khalwat's Transcoder plugin can help with this.
https://plugins.craftcms.com/transcoder
Here's the relevant bit from the docs:
https://nystudio107.com/docs/transcoder/Using.html#generating-a-transcoded-video