'Automatically convert any given video to a format that can be posted on Instagram
Imagine I am given any video format, what is the most optimal way to convert the video to a format that can be posted on Instagram?
The video format must conform to this Instagram Video Specifications
I'm looking at FFMPeg but I just felt I should ask first for probably existing solutions in the NodeJS community before re-inventing the wheel.
My tech stack is NodeJS.
Please note that I have attempted to search for solutions with no results.
Any ideas on this would be truly appreciated.
Solution 1:[1]
TLDR; Yes, FFMPEG command-line would be my preferred option. But, run it as a background worker.
This is what I would do:
- For each video required, post the source URL to a queue (Azure Service Bus, RabbitMQ, etc...)
- Create a background worker process (Docker container?) to pop each message off
- Run the file through FFMPEG
- Upload the result to Instagram
If there are no messages, just wait patiently in the background worker.
Generally it's a good idea to separate front-end API's from back-end workers so they can scale independently.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | James Woodall |
