OpenCode: Turn a YouTube Video into LinkedIn Posts

Quick answer
On 28 May 2026 I used OpenCode with DeepSeek V4 Flash to turn a video into five LinkedIn post variants. OpenCode trimmed clips to two minutes with FFmpeg, then wrote a Node.js script that pulled a transcript with yt-dlp captions or Whisper and asked ChatGPT 5.4 for thought leadership, storytelling, listicle, hot take and question posts. I would have preferred Python. Posting stayed manual. This is the OpenCode script, not the Hermes Agent LinkedIn cron and not the n8n LinkedIn workflows.
The sibling Hermes walkthrough is Hermes Agent LinkedIn posts. n8n versions live in YouTube to LinkedIn automations. The OpenCode sign-up link in the video description is an affiliate link. Description-footer affiliate links are not pasted here.
1. Trim a YouTube video in OpenCode
I told OpenCode to batch-trim videos to two minutes with FFmpeg so they fit LinkedIn. Then I asked for a script that gets transcripts from YouTube or a local file and writes posts, and I answered its clarifying questions. I created an OpenAI API key and kept it in the environment file. Do not paste that key into a shared chat.
2. Debug the Node.js script
OpenCode chose Node.js instead of the Python I asked for. I kept it. We fixed a missing OpenAI import and heavy package installs, then tested the script on a video. A later script change deleted earlier output files, which I noted on camera.
3. Generate five variants
The script wrote thought leadership, storytelling, listicle, hot take and question posts into one file. I then rewrote the prompt for LinkedIn engagement: hook first, short lines, tighter hashtags. Nothing in the video posted to LinkedIn. I reported 6 percent of that day's and 19 percent of the month's OpenCode Go usage. The spoken spend figure was unclear, so this page does not invent a dollar cost.
Done when
- Trimmed a source video with FFmpeg through OpenCode
- Generated five LinkedIn variants into one file
- Left posting as a manual step
What I didn't cover
- Automatic posting to LinkedIn.
- Which variant performs best. No engagement results were shown.
- A verified dollar cost for the run.
Watch the walkthrough

- 0:00 Introduction to OpenCode Go
- 1:02 Batch Trim Videos with FFmpeg
- 1:38 Build a YouTube Video Transcript Scraper
- 2:08 Generate OpenAI API Secret Keys
- 2:32 DeepSeek V4 Flash Code Review
- 3:26 Debug Script Errors & Dependencies
- 4:49 Test Node.js Video Transcript Parser
- 6:04 Generate 5 Copywriting Content Variants
- 8:42 Optimize Formatting for LinkedIn Engagement
- 11:13 OpenCode Go Token Credit Tracking
From the video
Lines from the video's transcript that this guide does not cover, lightly trimmed. Each time opens the video at that point. Read the full transcript.
- 4:15
I just want to run this locally on my computer. Otherwise, it's going to install a whole bunch of packages which I don't really want or need.
- 6:44
Could be even better. I actually want to create a Python script, but it decided to use Node.js instead.
- 10:23
It has the video, which is only 2 minutes long. In order to do that, I also used OpenCode to just trim all the videos in my YouTube videos directory.
FAQ
Why Node.js instead of Python?
OpenCode chose Node.js on its own. I would have preferred Python but kept it.
Which post styles does it make?
Thought leadership, storytelling, listicle, hot take and question, all saved in one file.
Does it post to LinkedIn?
No. Posting stayed manual in this walkthrough.
How is this different from the Hermes LinkedIn guide?
That guide uses Hermes Agent and a daily cron job. This page is the OpenCode script from 28 May 2026.
Sources
- Video: The Fastest Way To Generate LinkedIn Content Using AI (28 May 2026)
- OpenCode through my affiliate link: OpenCode
- OpenCode: opencode.ai
You may also like
Build the next one with AI Income Lab
Step-by-step courses, reusable templates, and a community that answers when you get stuck.
Members get the Claude Code & Skills and Codex Tutorials & Courses lessons.
- Courses for builds like this one
- Copy-ready templates
- Ask questions while you build
- Weekly coaching on VIP

