{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:44Z","object_id":{"id":1463,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_upload_props","title":"observe_media_upload_props\/3","uri":"https:\/\/zotonic.com\/id\/1463"},"seq":1},{"created":"2026-09-09T13:47:44Z","object_id":{"id":1733,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_viewer","title":"observe_media_viewer\/2","uri":"https:\/\/zotonic.com\/id\/1733"},"seq":2},{"created":"2026-09-09T13:47:44Z","object_id":{"id":1915,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_upload_preprocess","title":"observe_media_upload_preprocess\/2","uri":"https:\/\/zotonic.com\/id\/1915"},"seq":3},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2164,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_stillimage","title":"observe_media_stillimage\/2","uri":"https:\/\/zotonic.com\/id\/2164"},"seq":4}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"relation":{"objects":[{"created":"2020-05-30T05:48:07Z","object_id":{"id":1901,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_video_embed","title":"mod_video_embed","uri":"https:\/\/zotonic.com\/id\/1901"},"seq":1000000},{"created":"2020-05-30T05:48:07Z","object_id":{"id":1374,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_media","title":"media","uri":"https:\/\/zotonic.com\/id\/1374"},"seq":1000000},{"created":"2020-08-19T14:24:36Z","object_id":{"id":1737,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_oembed","title":"mod_oembed","uri":"https:\/\/zotonic.com\/id\/1737"},"seq":1000000},{"created":"2020-08-19T14:24:36Z","object_id":{"id":2188,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_audio","title":"mod_audio","uri":"https:\/\/zotonic.com\/id\/2188"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:47:44Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2561,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_content_editor","title":"Content editor","uri":"https:\/\/zotonic.com\/id\/2561"},"seq":2},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2576,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_media_management","title":"Media management","uri":"https:\/\/zotonic.com\/id\/2576"},"seq":3},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2579,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_video_management","title":"Video management","uri":"https:\/\/zotonic.com\/id\/2579"},"seq":4},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2580,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_file_uploads","title":"File uploads","uri":"https:\/\/zotonic.com\/id\/2580"},"seq":5},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":6},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2646,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_transform","title":"Transform","uri":"https:\/\/zotonic.com\/id\/2646"},"seq":7}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1902,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1902"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_video","page_url":{"en":"https:\/\/zotonic.com\/docs\/1902\/mod_video","x-default":"https:\/\/zotonic.com\/docs\/1902\/mod_video"},"preview_url":null,"resource":{"version":3334,"pivot_location_lat":null,"title":"mod_video","is_authoritative":true,"body":"<p>Adds support for viewing and handling video medium items.<\/p>\n<p>This module converts uploaded videos to h264 and adds a poster (preview) image of the movie.<\/p>\n<div class=\"admonition note\"><p class=\"first admonition-title\">Note<\/p><p class=\"last\">mod_video uses the command-line utilities <code>ffmpeg<\/code> and <code>ffprobe<\/code>. For mod_video to function correctly they must be\npresent in the search path of Zotonic.<\/p><\/div>\n<h2>Uploading &amp; conversion<\/h2>\n<p>The video module hooks into the media model to intercept any video upload. If a video is uploaded the following steps\nare done:<\/p>\n<ul><li>The video is moved to the site’s <code>files\/video_queue\/<\/code> directory.<\/li><li>A video conversion task is added to the pivot task queue, this task will restart a video conversion in case of any problems.<\/li><li>A video conversion process is started, supervised by the video module.<\/li><li>The uploaded medium is replaced by a static <code>lib\/images\/processing.png<\/code> image.<\/li><\/ul>\n<p>Only a single video conversion process is allowed to run at any time. This to prevent overloading the server.<\/p>\n<p>After the video is converted the resource’s medium record is replaced with the converted video. The frame at 10\nseconds (at 1 second for movies shorter than 30 seconds) is added as the preview image of the video.<\/p>\n<p>If a video can’t be converted then the video is replaced with the error image, found in <code>lib\/images\/broken.png<\/code>.<\/p>\n<h2>Viewing<\/h2>\n<p>The video module extends the <code>{% media %}<\/code> tag for viewing <code>video\/mp4<\/code> videos.<\/p>\n<p>It uses the template <code>_video_viewer.tpl<\/code> for viewing. For the best viewing results, add <code>css\/video.css<\/code> to your included\ncss files.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_media_stillimage<\/code>: Return the filename of a still image to be used for image tags using <code>supervisor:start_link<\/code>.<\/li><li><code>observe_media_upload_preprocess<\/code>: If a video file is uploaded, queue it for conversion to video\/mp4 using <code>z_video_info:info<\/code>.<\/li><li><code>observe_media_upload_props<\/code>: After a video file is processed, generate a preview image using <code>z_media_archive:abspath<\/code>.<\/li><li><code>observe_media_viewer<\/code>: Return the media viewer for the mp4 video using <code>z_template:render<\/code>.<\/li><\/ul>","slug":"mod_video","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"d672943a860aca22cce34414a134c01e668c39bc439660b87b5a732f447d0b56","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_video\/src\/mod_video.erl","publication_start":"2023-01-30T19:24:01Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_video\/src\/mod_video.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_video","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:42Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_video","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"b0f0601afc7bce212e638deb35a03ba89b57922f\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-05T18:39:08Z","title_slug":"mod_video"},"uri":"https:\/\/zotonic.com\/id\/1902","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1902"}},"status":"ok"}