title: Video Operations --- body: Just like [images](../imageops/), videos are separate files that are embedded into HTML files. Since they are media files, it's often desirable to read metadata or manipulate them in some way. !! Video metadata access is powered by [FFmpeg](https://ffmpeg.org/). In order to use it FFmpeg must be installed on your system and detected by Lektor. If Lektor is unable to find FFmpeg you will see the error message `Unable to locate ffmpeg or ffprobe executable. Is it installed?` in your console output if you try to use functionality that requires it. ## Accessing videos ```html+jinja {% for video in this.attachments.videos %}
{% endfor %} ``` Just like images you can also access them using `site.get('/myfolder').attachments.videos` or `site.get('/myfolder').attachments.get('examplevideo.mp4')`. Note that not all formats are detected as videos (see [attachments](../../content/attachments/)). If your format is not in the list you may still be able to get it detected as a video by adding it to your [Lektor project file](../../project/file/#[attachment_types]). ## Accessing metadata Video objects are sub-classes of Attachments but with a few extra properties. | Attribute | Description | - | - | `width` | Video height in pixels | `height` | Video height in pixels | `duration` | Video length as a [`datetime.timedelta`](https://docs.python.org/3/library/datetime.html) instance Example: ```html+jinja {% set video = this.attachments.videos.first() %}