No Bullshit Guide to Youtube shorts automation in NodeJS, OpenAI, Ollama, ElevanLabs & ffmpeg
We all have seen tutorials on YouTube that promise YouTube faceless shorts automation using some tools that use drag-drop or “No/low code” and all seems too easy, but as a developer you know “No/Low code” is not really “no/low code” it’s just hiding complexity for babies.
So just like any other developer, I thought I could “code” this as well, and instead of “Good UI/UX” I could create a “Great UI/UX”, a CLI (Command Line Interface).
So without any bullshit here is what you are for.
We will be creating a YouTube shorts automation that will accept 3 parameters
topic
: Topic for video (default: “science facts”)num
: Number of shorts to generate (default: “3”)output
: Output directory (default: “output”)
node index.js --help
Workflow
Fetch topics from generative AI for video content
Generate high-quality audio using Text to Speech services
Create captions automatically with the transcribe service
Download a stock video from the free video API
Produce the final video
With this powerful automation script, you can generate high-quality YouTube Shorts quickly and efficiently, saving you hours of work!
What You’ll Learn:
Setting up the automation script in JavaScript
Using the OpenAI API and Local Ollama API for content generation
Integrating Eleven Labs API or OpenAI Audio API for Audio Creation
Capturing captions with AWS Transcribe using AWS SDK v3
Pexels API and download video
Rendering with FFmpeg
Github
https://github.com/nobullshit-coder/No-Bullshit-Youtube-Codes
Full step-by-step Youtube Tutorial
https://www.youtube.com/watch?v=YvGKsPkWzRs
I am working on creating more content on YouTube, and you see I still don’t have enough subscribers and views to monetize my channel. I would appreciate it if you subscribe and watch the video. Please show some love.
No monetizing also means You will see the whole video "Ad Free" 🤣.
Free or Open Source alternative to paid service
I have also provided code to use Local Lamma instead of chatGPT
Pexels video API is free
FFMPEG is free and open-source
Out of 5 services used in the code, 3 of them are either free or you can find an open-source alternative.
If you find any good open-source or free alternative to text-to-speech and audio transcription, please let me know in the comments.
Links
FFMPEG - https://www.ffmpeg.org/download.html
Ollama - https://ollama.com/
Pexels - https://www.pexels.com/
ASS Captions - http://www.tcax.org/docs/ass-specs.htm
Next Steps:
Add a background music
Randomize the TTS voices
How to break long videos into clips and then create shorts out of that
Break the clips into smaller chunks
we will resize them to fit the vertical format
transcribe and caption
We will use AI to center the speaker in case of podcast or interview videos
We will also use YouTube data API to upload the video directly to YouTube
We will use a YouTube heatmap to figure out what was trending moment in the given video and auto-create clips out of it — this will be the true long-to-short automation. you just pass the video URL and it will generate 10–20 shorts of trending topics.
What do you think?
Let me know what else we can do and your thoughts on the process improvements and peer review.
If you like this tutorial
Subscribe to me on YouTube: https://www.youtube.com/watch?v=YvGKsPkWzRs
and follow me on Twitter (X) (Yeah I still call it Twitter): https://x.com/nobullshitcoder
Thank you & take care.
Subscribe to my newsletter
Read articles from No Bullshit Coder directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by