For years, I’ve had this idea simmering in the back of my mind: a simple way to watch a movie with two different audio tracks playing simultaneously on separate devices.
My primary goal was watching a movie with another person where each could listen in a different language, the original and a dubbed version. Other uses could include watching with someone who needs audio description. The technical hurdles always seemed a bit daunting, pushing the project further down my to-do list. Superficial searches revealed limited options; solutions like VLC’s synchronous playback didn’t seem to support distinct audio outputs, and tools like mpv
or socat
weren’t even on my radar.
Today, I decided to tackle it differently. Inspired by the concept of “vibe coding”
, I set aside my usual tendency for meticulous, triple-checked code. The goal was simple: turn this long-standing idea into a functional reality within a single day, blog post included. This meant embracing rapid prototyping with an AI assistant, focusing on getting something working quickly rather than striving for perfection from the outset. I iteratively prompted the AI, refining the approach and code as we went. The AI helped navigate the unfamiliar territory of mpv
’s IPC and socat
, turning potential roadblocks into quick steps forward.
The result is CineDual.
What is CineDual?
CineDual is a straightforward Bash script designed to tackle this specific niche problem. It launches two instances of the mpv
media player:
- One instance plays the video along with the primary audio track.
- A second, headless instance plays only the secondary audio track.
You can select which audio tracks to use and route each audio stream to different output devices (like two different headphones) using PulseAudio or PipeWire. It even includes controls for fine-tuning audio delay of the second track if needed.
The current version is 0.1; while it works for its intended purpose, it’s still early days, so expect some rough edges or potential bugs.
If you’re interested in trying it out or exploring the code, you can find CineDual on GitHub :
It might be a simple tool, but solving this long-standing personal need in such a short time feels like a small victory, largely thanks to the collaborative power of AI.
Note: This post was created with AI assistance and carefully refined through iterations to accurately express my ideas.
Note to the note: the idea for this type of disclaimer comes from harper.blog .