Category Archives: How it works (technical)

How to Download and Merge Video Segements?

If you are to seek a once-for-all method to download video, then this post may be useful to you. Many video site hides their original video URLs in the HTML source code, and thus if you view the source code you are unlikely to find any useful real video URLs. However, you can reveal the Continue Reading »

MP4, MPEG Video Merger Now Supported with FFMPEG

Concatenating the MP4/MPEG Video isn’t the same as merging pure data files – as MP4/MPEG video files contain header information. We can do this via FFMPEG, see this for instance: Click to toggle codeblock 1 ffmpeg -f concat -safe 0 -i ‘videos.lst’ -c copy ‘output.mp4’ ffmpeg -f concat -safe 0 -i ‘videos.lst’ -c copy ‘output.mp4’ Continue Reading »

Should You Turn Your API into Asynchronous?

When Should You Turn Your API into Asynchronous? There are a couple of cases that you should consider turning your APIs into asynchrnous: Computation-intenstive (Time-consuming) If your API is about some heavy computation which may not return shortly, you certainly want to make it asynchronous. If your API is time consuming – which is larger Continue Reading »

A little dig into asynchronous processing of Video Merger

Currently, the NodeJs Daemon queries the MySQL database for the new requests every 15 seconds. It will deal with one request at a time. In case the request takes longer than 15 seconds, and it might happen that more than 1 requests are being handled at the same time. The jobs are handled asynchronously – Continue Reading »

Remove 301 Redirects of SlowAPI.com

When SlowAPI.com launches a few weeks ago, I had 301 redirects but this is cached indefinitely by Chrome Browser. To fix this, you can F12 (or Ctrl+Shift+I) to open the dev console, and type in the following: fetch(‘https://slowapi.com’, {method: ‘post’}).then(() => {}) That will send a post request to invalidate the 301 cache. AMP Version Continue Reading »

A Glimpse into the Backend Process of Video/File Merger

The backend uses NodeJs to listen to new records in MySQL database every 15 seconds. The Process Manager is using PM2. And here is what it looks like when new requests are fetched from MySQL. 0|merger | Server responded with 404: Not Found 0|merger | cat ‘/var/www/merger/data/868_074j2xOs4’ ‘/var/www/merger/data/868_1SaNUl8hl’ ‘/var/www/merger/data/868_22bXwEuEP’ ‘/var/www/merger/data/868_3myehAtd2’ ‘/var/www/merger/data/868_48EMnMgZ1’ ‘/var/www/merger/data/868_5IMGMXJpo’ ‘/var/www/merger/data/868_6dtz EyIjl’ ‘/var/www/merger/data/868_74vZCAdZs’ Continue Reading »