GithubHelp home page GithubHelp logo

alexweininger / template-still Goto Github PK

View Code? Open in Web Editor NEW

This project forked from remotion-dev/template-still

0.0 1.0 0.0 654 KB

Create still images with Remotion

Shell 1.68% TypeScript 89.66% Dockerfile 7.97% CSS 0.70%

template-still's Introduction

Remotion Still Image template

A template for designing still images with dynamic data with built-in server for deploying to the cloud.

Commands

Design mode: Create an image in React

npm run dev

Render it

npm run render

Keep Remotion up to date

npm run upgrade

Server

You can run a server that serves dynamic images based on it's URL. Run

npm run server

And then visit http://localhost:8000/PreviewCard.png?title=Hello+World in your browser to render an image.

  • Specify the ID of the composition you want to render after the /. You can edit the compositions in src/Video.tsx.
  • Add either a .png or a .jpeg extension depending on which image format you want.
  • You can add input props to your React component by adding query strings: ?title=Hello+World&description=foobar will pass {"title": "Hello World", "description": "foo bar"} to the component.

Caching

In src/server/config.ts, you can configure three types of caching:

  • "filesystem", the default, will cache generated images locally. This is a good way of caching if you host the server on a non-ephemereal platform and have enough storage.

  • "none" will disable all caching and calculate all images on the fly.

  • "s3-bucket" will cache images in a S3 bucket. If you choose this option, you need to provide AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables containing AWS credentials which have permission of reading and writing to S3 as well as configure a bucket name and region in src/server/config.ts.

How to set up an S3 bucket
  • Go to https://s3.console.aws.amazon.com/s3/home and create a new bucket. You can leave the "Deny all public access" checkbox checked.
  • Fill out region and bucket name in src/server/config.ts.
  • Go to https://console.aws.amazon.com/iamv2/home?#/users to create a new user. While creating, enable "Programmatic Access". When adding permissions, choose "Attach existing policies directly" and then search for "AmazonS3FullAccess" and assign it.
  • In the last step you will get a value for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY which you need to set as an environment variable. Locally, you can rename the .env.example file to .env. When you deploy the server, you can set the environment variables in the dashboard of your provider.

Deploy to Heroku

To deploy the server to Heroku, you need to add the Google Chrome Buildpack. Go to the settings of your Heroku app and in the Buildpacks section, add https://github.com/heroku/heroku-buildpack-google-chrome as a buildpack.

Deploy to DigitalOcean

The easiest way to deploy to DigitalOcean is to use the dockerized image and run it on the DigitalOcean App Platform. Go to https://cloud.digitalocean.com/apps/new and connect your Github repository and deploy the

Serverless

Our serverless solution is a work in progress and will be released later in 2021.

Docs

Get started with Remotion by reading the fundamentals page.

Help

We provide help on our Discord server.

Issues

Found an issue with Remotion? File an issue here.

License

Notice that for some entities a company license is needed. Read the terms here.

template-still's People

Contributors

jonnyburger avatar iamshankhadeep avatar alexweininger avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.