{"id":19399709,"url":"https://github.com/fbsamples/video-template-builder","last_synced_at":"2025-04-24T06:32:11.182Z","repository":{"id":236091030,"uuid":"790361539","full_name":"fbsamples/video-template-builder","owner":"fbsamples","description":"An intuitive tool for creating dynamic video templates. Seamlessly integrate and customize videos, images, and audio files to produce new media at scale. ","archived":false,"fork":false,"pushed_at":"2024-09-18T03:35:51.000Z","size":6281,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-09-18T06:49:08.833Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fbsamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-22T18:33:43.000Z","updated_at":"2024-09-18T03:35:55.000Z","dependencies_parsed_at":"2024-09-18T06:39:36.235Z","dependency_job_id":"2b8fa9f9-ade7-4cbd-84e7-57c0a0ff085d","html_url":"https://github.com/fbsamples/video-template-builder","commit_stats":null,"previous_names":["fbsamples/video-template-builder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsamples%2Fvideo-template-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsamples%2Fvideo-template-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsamples%2Fvideo-template-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsamples%2Fvideo-template-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fbsamples","download_url":"https://codeload.github.com/fbsamples/video-template-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223942581,"owners_count":17229112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T11:10:55.684Z","updated_at":"2024-11-10T11:10:56.246Z","avatar_url":"https://github.com/fbsamples.png","language":"Python","readme":"# Video Template Builder\n\n\nThis framework allows you to create custom video templates using static images and metadata, making it easier and more efficient to produce video content on a larger scale.\n\n## Design\n\nThis framework uses a pull-based approach to gather frames from various sources and combine them as intended. The model is straightforward: it involves the use of `Source` class implementations. As an end user, you are responsible for creating custom versions of these classes - if not already provided - and managing their usage.\n\n![Sample Design](sample-design.png)\n\n## Implementation\n\nThis repository contains files which can be extended for custom implementations.\n\n- `source.py` contains the basic definition for the `Source` class and sample `ImageSlideshowSource` and  `SingleMediaSource` implementations.\n\n- `combinator.py` contains a sample `Source` subclass that combines two other sources to form a single one. It is important to note that `Combinator`s are also `Source`s themselves, and can be further combined by other `Source`s, they are placed in a different file for responsibility segregation reasons.\n\n- `sink.py` pulls frames from a single final source to create an output `.mp4` file. It supports adding audio files as well.\n\n\n## Requirements\n\nTo ensure a clean workspace and avoid potential conflicts between dependencies, it's highly recommended to use a virtual environment. You can also skip directly to step 3.\n\n1. The following command creates a new virtual environment named `myenv`.\n\n```bash\npython3 -m venv .env\n```\n\n2. Once the environment is created, you can activate it using:\n\n```bash\nsource .env/bin/activate\n```\n\n3. Install the necessary dependencies.\n\n```bash\npip install -r requirements.txt\n```\nThis command installs all the packages listed in the `requirements.txt` file into your active environment.\n\n## Sample\n\n`main.py` contains a simple usage example for these classes. This sample use case pulls three images from the web and creates a slideshow with a background image.\n\n- The Instagram and Facebook logos are used to create a looping slideshow\n- The WhatsApp logo is used as a background image.\n\nThe slideshow component has dimensions 550x550 whereas the background (and final video) has dimensions 700x700. The slideshow component is centered using a margin combinator.\n\nThe background could be a video as well without changing the API, but in this example we are using a static image.\n\nThis sample use case could be enriched with custom creatives, and create a script that creates product slideshows and custom frames that enhance brand identity.\n\n## License\nThis project is MIT licensed, as found in the LICENSE file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbsamples%2Fvideo-template-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbsamples%2Fvideo-template-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbsamples%2Fvideo-template-builder/lists"}