Skip to content

Instantly share code, notes, and snippets.

View ColinPeyrat's full-sized avatar

Colin Peyrat ColinPeyrat

View GitHub Profile
@ColinPeyrat
ColinPeyrat / scrpit.sh
Created April 16, 2025 15:30
Transparent video (webm + hevc)
# from a input.mov file with transparency
avconvert -s "input.mov" --replace -p PresetHEVC1920x1080WithAlpha --multipass -o "output.mov" &
INPUT="input.mov" OUTPUT="output.webm" CRF=45 EFFORT="good" bash -c 'ffmpeg -y -i "$INPUT" -pix_fmt yuva420p -an -c:v libvpx-vp9 -crf "$CRF" -b:v 0 -deadline "$EFFORT" -threads 4 -lag-in-frames 25 -row-mt 1 -pass 1 -f null /dev/null && ffmpeg -y -i "$INPUT" -pix_fmt yuva420p -an -c:v libvpx-vp9 -crf "$CRF" -b:v 0 -deadline "$EFFORT" -threads 4 -lag-in-frames 25 -row-mt 1 -pass 2 "$OUTPUT"'
@ColinPeyrat
ColinPeyrat / script.sh
Last active March 31, 2025 13:32
Create webp animated
# -d = duration per frame 40ms per frame (25fps)
# -loop 1 = disable looping (use 0 for infinite looping)
img2webp -d 40 -min_size -lossy -q 85 -loop 1 frame-* -o animated.webp
# for lossless (with CMS with image compression for example)
img2webp -d 40 -min_size -lossless -loop 1 -q 100 frame-* -o animated.webp
@ColinPeyrat
ColinPeyrat / javascript.json
Created May 11, 2023 09:49
VSCode - GSAP Snippets
{
"gsap.from()": {
"prefix": "gsf",
"body": [
"gsap.from(${1:el}, {${2:vars}, duration: ${3:0.8}, ease: '${4:power3.out}'});"
],
"description": "gsap.from()"
},
"gsap.to()": {
"prefix": "gst",
@ColinPeyrat
ColinPeyrat / package.json
Created August 10, 2020 14:53
Install GSAP Bonus with yarn
"scripts": {
"postinstall": "yarn add ./gsap-bonus.tgz --ignore-scripts"
},
@ColinPeyrat
ColinPeyrat / script.sh
Created July 22, 2018 11:02
Delete node_modules folder recursively
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +