<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: YinTokey</title>
    <description>The latest articles on DEV Community by YinTokey (@yintokey).</description>
    <link>https://dev.to/yintokey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F648500%2F4e870d83-563c-484d-b25d-02d367386870.jpeg</url>
      <title>DEV Community: YinTokey</title>
      <link>https://dev.to/yintokey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yintokey"/>
    <language>en</language>
    <item>
      <title>I built an open-source music video generator</title>
      <dc:creator>YinTokey</dc:creator>
      <pubDate>Thu, 07 Aug 2025 15:23:30 +0000</pubDate>
      <link>https://dev.to/yintokey/i-built-an-open-source-music-video-generator-4039</link>
      <guid>https://dev.to/yintokey/i-built-an-open-source-music-video-generator-4039</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkf2xoflrmcbybtjn0xmb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkf2xoflrmcbybtjn0xmb.png" alt=" " width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Introduction
&lt;/h1&gt;

&lt;p&gt;I enjoy listening to background music on YouTube and have tried creating similar music using tools like Suno AI, LeonardoAI, Runware, DALL·E, and CapCut. I noticed that these music videos usually follow a few basic patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Background image&lt;/li&gt;
&lt;li&gt;Music (instrumental or with vocals)&lt;/li&gt;
&lt;li&gt;Visual effects (optional)&lt;/li&gt;
&lt;li&gt;Animation (optional)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With my experience using FFmpeg for video generation, I decided to build a tool that can create these music videos from a simple prompt, without any video editing work.&lt;/p&gt;

&lt;p&gt;Here’s how the tool works:&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Background Image Generation
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F1.png%26w%3D828%26q%3D90" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F1.png%26w%3D828%26q%3D90" width="1244" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We start by entering a few keywords. The tool uses ChatGPT to enhance your prompt, and you can upload a reference character image if you want. For example, I used an AI influencer image I found on Google.&lt;/p&gt;

&lt;p&gt;This tool enables both instrumental music and music with a singer (so you can create AI influencer music videos).&lt;/p&gt;

&lt;p&gt;Next, the tool calls Runware AI to generate background images. Runware is an image generation service, similar to Midjourney.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Music Generation
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F2.png%26w%3D828%26q%3D90" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F2.png%26w%3D828%26q%3D90" width="828" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is music generation. ChatGPT analyzes the background image and crafts a better music prompt. If the character is female, the generated music will feature a female singer.&lt;/p&gt;

&lt;p&gt;Then, the Suno API is used to generate the music file.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Video Generation
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F3.png%26w%3D828%26q%3D90" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F3.png%26w%3D828%26q%3D90" width="1233" height="699"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once we have both the background image and the music file, the tool creates a video by using the image as each frame, just like a video editing tool would.&lt;/p&gt;

&lt;p&gt;Finally, we use FFmpeg to generate the finished video.&lt;/p&gt;

&lt;p&gt;That’s the entire process.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Cost
&lt;/h1&gt;

&lt;p&gt;There are two types of videos. If you use a reference character, the cost is about 12 cents per video. If you use the Juggernaut model for image generation, the cost drops to around 8 cents.&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Animation (Future Work)
&lt;/h1&gt;

&lt;p&gt;So far, the tool generates videos with static images. But what about animated images? I haven’t implemented this feature yet, but Leonardo.AI’s &lt;code&gt;Motion One&lt;/code&gt; model can generate animated videos by adjusting the movement strength (I set it to 1 in my test).&lt;/p&gt;

&lt;p&gt;Below is an example of an animated video generated using Leonardo.AI:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F5_hq.gif%26w%3D828%26q%3D90" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.yintokey.me%2F_next%2Fimage%3Furl%3D%252Fimages%252Fblog%252Fauto-mv%252F5_hq.gif%26w%3D828%26q%3D90" width="512" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leonardo.AI also supports API calls, so integrating animation into the project is definitely possible in the future.&lt;/p&gt;

&lt;h1&gt;
  
  
  7. Project Link
&lt;/h1&gt;

&lt;p&gt;Here is the project link, hope you like it!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/YinTokey/AutoMV" rel="noopener noreferrer"&gt;https://github.com/YinTokey/AutoMV&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aivideo</category>
      <category>ffmpeg</category>
      <category>fullstack</category>
    </item>
  </channel>
</rss>
