Giter Site home page Giter Site logo

patsalv / example-remotion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stoat-dev/example-remotion

0.0 0.0 0.0 374 KB

Preview Remotion videos in pull requests with Stoat

Home Page: https://docs.stoat.dev/docs/tutorials/preview-remotion

TypeScript 97.54% Handlebars 2.46%

example-remotion's Introduction

Remotion with Stoat Video Preview

This is a fork of the remotion-dev/template-helloworld repo to demo how to use Stoat to preview your Remotion video. Also see this tutorial for details.

  1. Install the Stoat App for the repo.

  2. Create a GitHub workflow for preview. An example can be found in .github/workflows/preview-video.yml.

    name: Preview video
    on:
     push:
       branches:
         - main
     pull_request:
       branches:
         - main
    jobs:
     render:
       name: Render video
       runs-on: ubuntu-latest
       steps:
         - uses: actions/checkout@v3
         - uses: actions/setup-node@v3
           with:
             node-version: '16'
             cache: npm
         - run: sudo apt update
         - run: sudo apt install ffmpeg
         - run: npm i
         - name: Generate video
           run: npm run build
         - name: Generate gif
           run: ffmpeg -i out/video.mp4 -vf "fps=10,scale=640:-1" -pix_fmt rgb24 out/video.gif
         - name: Run Stoat Action
           uses: stoat-dev/stoat-action@v0
           if: always()
  3. Add the Stoat config in .stoat/config.yaml.

    ---
    version: 1
    enabled: true
    comment_template_file: .stoat/comment.hbs
    plugins:
      static_hosting:
        video_preview:
          # This file is generated by remotion in the
          # "Generate video" step of the GitHub workflow.
          path: out/video.mp4
        gif_preview:
          # This file is generated from the remotion video in the
          # "Generate gif" step of the GitHub workflow.
          path: out/video.gif
  4. Add the Stoat template in .stoat/comment.hbs.

    ## Preview
    
    [![preview]({{ plugins.static_hosting.gif_preview.link }})]({{ plugins.static_hosting.video_preview.link }})
    
    (Click the GIF go to the full video.)

    The template file path must match the comment_template_file field in the Stoat config.

  5. That's it. Now each time you make changes to the repo and opens a pull request, a comment will show up to provide a preview of the generated video like this:

    preview

    (Click the GIF go to the full video.)

    Check out this pull request for details.

example-remotion's People

Contributors

jonnyburger avatar tuliren avatar ahmadrosid avatar kolibril13 avatar letsmelon avatar lucemans avatar avilebroker avatar pascaloliv avatar iamshankhadeep 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.