- How to use transparent videos on the web in 2021 - Rotato
- How to make HEVC, H265 and VP9 videos with an alpha channel for the web | Kit Cross
- Alpha Masking with FFMPEG | Curio Museum1
ffmpeg -framerate 25 -i image_%1d.png -c:v libvpx-vp9 -pix_fmt yuva420p output.webm
단점
- 두벌로 인코딩 작업을 해야한다. MacOS가 아닐경우 번거로운 부분이 존재한다.
- 브라우저 지원이 애매하게 걸친 부분이 존재한다.
- (개인적인 느낌) 사이즈가 커졌을 경우 프레임 드랍이 있다.
…그래서 어차피 안되는거 새로운 도전을 해보고 싶어서 크로마키 효과를 떠올렸다. sharp로 이미지 배경을 green 컬러로 채우고 그 이미지들을 합쳐서 동영상으로 변환. 그리고 canvas에 그리고 색상을 추출해서 green값을 alpha값으로 변환하면 완벽하지 않을까 싶었는데 겹치는 영역을 전혀 생각못했다. 이부분은 뭔가 특정 알고리즘이 있는 것 같은데 그냥 단순히 근사치2로 적용했을때 결과물이 완벽하지는 않다.
- 캔버스(canvas)를 이용한 비디오 조작하기 - Web API | MDN3
- Green Screen in the Browser With HTML Canvas4
- Canvas: Do cool stuff with video in the browser | Mux blog5
Footnotes
- Raspberry Pi ‘WeatherClock’ shows you the hour’s forecast - Raspberry Pi1
- Show Dev: RaspberryPi Weather ⛈ fuelled by Netlify functions and Preact - DEV Community2
- https://weather-mu.vercel.app/
Footnotes
-
Raspberry Pi Zero W + 1.3인치 OLED, OpenWeatherMap API 를 Python 스크립트로 ↩
Debouncing and Throttling Explained Through Examples | CSS-Tricks1
- throttle: 함수가 호출되는 속도를 제한 (일정시간 동안)
- debounce: 추가 호출 없이 일정 시간이 경과할 때까지 함수 실행을 지연하거나 제한 (마지막 이벤트만)
Footnotes
-
검색 입력, 스크롤 이벤트, 크기 조정 이벤트 등 디바운싱과 스로틀링이 유용할 수 있는 사례들 ↩
- Builder.io - Drag and drop experience builder - Builder.io1
- Blocks UI2
- Craft.js3
- Pagedraw — Effortlessly turn mockups into functional UI code4
- OpenChakra5
- GitHub - chriskitson/react-drag-drop-layout-builder: Drag and drop (DnD) UI layout builder using React and ImmutableJS6
- Unlayer Embed Plugin | Email and Page Editor for SaaS
- Puck
Footnotes
interface MathFn {
(a: number, b: number): number
}
const sum: MathFn = (a, b) => a + b
Footnotes
- Temporal documentation1
- Is It Time for the JavaScript Temporal API?2
- JS Dates Are About to Be Fixed | TimeTime
- Using Intl.RelativeTimeFormat for Localized Relative Timings
- Everything You Need to Know About Date in JavaScript | CSS-Tricks3
- 자바스크립트에서 타임존 다루기 (1) : NHN Cloud Meetup4
- 자바스크립트에서 타임존 다루기 (2) : NHN Cloud Meetup
Footnotes
Quick tip: reusable Array search predicates - JASON Format
arr.filter(callback(element[, index[, array]])[, thisArg])
배열 메서드에서 2번째 인자 thisArg에 참조값을 전달해서 재사용 가능한 함수를 만드는 트릭. 단 성능 이슈가 있으므로 주의해야 한다.
Designing a JavaScript Plugin System | CSS-Tricks1
Footnotes
-
플러그인은 라이브러리와 프레임워크의 공통 기능이며 개발자가 안전하고 확장 가능한 방식으로 기능을 추가할 수 있도록 한다. 그래서 추가 유지 관리 부담이 없다. ↩