xref: /third_party/skia/tools/fiddle/animate.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/skia/tools/fiddle/
1cb93a386Sopenharmony_ci#!/bin/sh
2cb93a386Sopenharmony_ci# Copyright 2017 Google Inc.
3cb93a386Sopenharmony_ci#
4cb93a386Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be
5cb93a386Sopenharmony_ci# found in the LICENSE file.
6cb93a386Sopenharmony_ci
7cb93a386Sopenharmony_ci# Create a 3 second long animation from the Raster output of fiddle at 15 fps.
8cb93a386Sopenharmony_ciFPS=15
9cb93a386Sopenharmony_ciDURATION=3
10cb93a386Sopenharmony_ciFRAMES=$((DURATION * FPS))
11cb93a386Sopenharmony_cimkdir -p /tmp/animation
12cb93a386Sopenharmony_cifor i in $(seq -f "%05g" 0 $FRAMES)
13cb93a386Sopenharmony_cido
14cb93a386Sopenharmony_ci    ./out/Release/fiddle --duration $DURATION --frame `bc -l <<< "$i/$FRAMES"` | ./tools/fiddle/parse-fiddle-output
15cb93a386Sopenharmony_ci    cp /tmp/fiddle_Raster.png /tmp/animation/image-"$i".png
16cb93a386Sopenharmony_cidone
17cb93a386Sopenharmony_cicd /tmp/animation; ffmpeg -r $FPS -pattern_type glob -i '*.png' -c:v libvpx-vp9 -lossless 1 output.webm
18

Indexes created Thu Nov 07 10:32:03 CST 2024