-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
223 lines (221 loc) · 8.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transparent Videos for All</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<link rel="stylesheet" href="main.css" />
</head>
<body>
<main class="container">
<h1>Cross Platform Transparent Videos Solution</h1>
<div class="row">
<div class="col s6">Published on 22nd June 2022</div>
<div class="col s6 ta-r">
<a
href="https://twitter.com/shubhamp_web?ref_src=twsrc%5Etfw"
class="twitter-follow-button"
data-show-count="false"
>Follow @shubhamp_web</a
>
</div>
</div>
<div>
<h4>Worked with</h4>
<p>Read Summary Below this list to read overall observations.</p>
<ul class="collection">
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="pc.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/windows.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/chrome.svg" />
Google Chrome Version 100 • Windows 10
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="pc.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/windows.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/firefox.svg" />
Firefox Version 100 • Windows 10
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="pc.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/windows.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/edge.svg" />
Microsoft Edge Version 100 • Windows 10
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="pc.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/windows.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/opera.svg" />
Opera 86 • Windows 10
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="pc.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/macos.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/safari.svg" />
Safari 13 • macOS Catalina 10.15
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="pc.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/macos.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/chrome.svg" />
Google Chrome 100 • macOS Catalina 10.15
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="phone.svg" />
<img width="25" height="25" src="android.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/chrome.svg" />
Google Chrome 91 • Android 12.0 • Google Pixel 4A
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="phone.svg" />
<img width="25" height="25" src="android.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/firefox.svg" />
Firefox 98.2.0 • Android 12.0 • Google Pixel 4A
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="phone.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/ios.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/chromium.svg" />
Chromium 97 • iOS 15.2 • iPhone X
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="phone.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/ios.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/safari.svg" />
Safari • iOS 15.2 • iPhone X
</li>
<li class="collection-item blue-grey darken-4">
<img width="25" height="25" src="phone.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/ios.svg" />
<img width="25" height="25" src="https://app.lambdatest.com/assets/images/safari.svg" />
Safari • iOS 15.2 • iPad Pro
</li>
</ul>
<details>
<summary>Summary:</summary>
<p>
Works with Windows 10 above Chrome 60
<br />
Works with macOS Catalina (or higher) with Safari 13+ or with Chrome above 80
<br />
Works with iOS 13.0 (or higher) on all three major browsers (Chrome, Firefox, Safari)
<br />
Works with Android 9.0 (or higher) on Chrome 99+
<br />
Please note that these are my observations while testing on lamdatest.com and aren't based on
any official technical specification.
</p>
</details>
<br />
<br />
<section class="solution">
<h4>
All you need is videos in two formats,
<a
title="Click to Download Sample .webm file"
target="_blank"
href="sample.webm"
rel="noreferrer"
>.webm</a
>
for Windows and Android. And
<a title="Click to Download Sample .mov file" target="_blank" href="sample.mov" rel="noreferrer"
>.mov</a
>
for iOS and macOS.
</h4>
<h5>Yes, It's not only the browser thing but it has to do with OS as well.</h5>
<div class="code-ss">
<img class="full-width" id="video-tag-code" src="raycast-untitled.png" />
</div>
</section>
</div>
<br />
<section>
<h4>Okay, but how do we get these videos?</h4>
<h5>
1. You might already have webm but, here's how you do it with
<a target="_blank" href="https://ffmpeg.org/" rel="noreferrer">ffmpeg</a> when you have png frames.
</h5>
<img class="full-width" src="generate-webm.png" alt="" />
</section>
<section>
<h4>2. Now the tricky part is to get .mov file for apple devices.</h4>
<h5 class="half-visible">
<a target="_blank" rel="noreferrer" href="https://developer.apple.com/videos/play/wwdc2019/506/">
In this annoucement
</a>
apple introduced addition of alpha channel support in HEVC videos.
</h5>
<h5 class="half-visible">
You don't need to fully understand it but just remember that "We'll need hevc encoded mov files to
support apple devices."
</h5>
<h5>
But unfortunately ffmpeg can't convert webm into HEVC with alpha, the only way as of now is via
MacOS context menu's option.
</h5>
<br />
<img class="full-width" src="mac-os-context-menu.png" alt="" />
<br />
<h5>
But if you're like me, who use Windows, can run MacOS Virtually with tools like
<a
target="_blank"
rel="noreferrer"
href="https://www.google.com/search?q=install+macos+on+virtualbox"
>Virtual Box</a
>
and use this option.
</h5>
<h5 class="half-visible">
Make sure you install macOS Catalina (or higher) to use this as it is not available in older
versions.
</h5>
</section>
<section>
<h4>🛑 But still you can't directly convert webm into hevc videos :(</h4>
<h5 class="half-visible">
The way it worked for me was, I had to import PNG frames as PNG sequence into after effects and then
export it with these settings 👇
</h5>
<br />
<img class="full-width" src="export-options.png" />
<br />
<h5 class="half-visible">
Then use the exported mov file in mac to convert it into hevc encoded video file.
</h5>
<h5>
At this point Now you should have valid video files to be used in
<a href="#video-tag-code">this code</a>. 🎉
</h5>
</section>
<section>
<h4>Did it helped?</h4>
<h5>
You can
<a target="_blank" rel="noreferrer" href="https://www.buymeacoffee.com/shubhamp"
>buy me a coffee here</a
>.
</h5>
</section>
<section>
<h4>Facing any issues?</h4>
<h5>
Feel free to DM me on twitter <a href="https://twitter.com/shubhamp_web">@shubhamp_web</a>. I would
love to help.
</h5>
</section>
</main>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</body>
</html>