Build Your Own Video Compression Service with Rust WASM
Yesterday I explained how to use FFMPEG to compress video efficiently. How to deploy a video compression service? Here we can try to leverage the existing technologies like Rust, Wasm.
Yesterday I explained how to use FFMPEG to compress video efficiently. How to deploy a video compression service? Here we can try to leverage the existing technologies like Rust, Wasm.
Recently there’s a hot tweet talking about video compression (https://x.com/mortenjust/status/1817991110544744764). The author shows that how he could compress most of the MP4 videos down to 10% of the original size.
WebSocket has been supported widely in the past few years. More and more applications are embracing this and using it to replace AJAX / Commit / LongPooling. Set up a NodeJS server with WebSocket is easier, but how to do it correctly especially when your application is behind web proxies? Here I’m going to use a simple http server and websocket native implementaion ws
, a http proxy based on http-proxy
.
Based on kubeadm installation instructions, we can’t directly install it on MacOS. But with the help of Vagrant and VirtualBox, we can quickly create a local kubenetes cluster.
It might be a dish foreign for you; in fact, it was foreign to me too. Ma-Po tofu originates from a region in China but far away from my hometown. The first time that I had it was in my first year of college. It and me, both had left home, just met in a small restaurant next to our campus. Gladly, I was not alone, neither was the dish. There were new friends of mine sitting around a table, and Ma-Po Tofu took the center, having always had the charm to attract people from all over the country. It may be welcomed by people from all over the world one day.
If we have a tiny web service which return the host name as below. We can use golang image and build the executable package, then move it into a basic linux container like alpine.
If you have to check godoc offline, you could install gdoc go get golang.org/x/tools/cmd/godoc
and then run godoc -http :8001
in termilal.
Monotonic Stack is the best time complexity solution for many “range queries in an array” problems. Because every element in the array could only enter the monotonic stack once, the time complexity is O(N). (N represents the length of the array).
Indoor positioning technology is more and more widely used in daily life, such as indoor navigation, smart home, shopping mall advertisement, etc. This article will detail the principles of this technique and its advantages in practical applications.
Let’s denote dp[i][j] as the amount of distinct subsequences in s[:i] which can construct t[:j]. So we can get the state transition function dp[i][j] = s[i - 1] == t[i - 1] ? (dp[i - 1][j - 1] + dp[i - 1][j] : dp[i-1][j]. Also for the initial value, dp[i][0]
needs to be 0 (it means there’s one way we can construct empty string from s[:i]).