Source: https://vokal.co/blog/ffmpeg-add-audio-to-video
Description: Enhance videos by adding audio with FFmpeg. My short guide shows you how to use the command-line tool, customize output, and more. Improve your videos now.
Published: 2023-01-24T00:00:00.000Z
Modified: 2026-10-27T12:00:00.000Z

[ffmpeg](https://vokal.co/blog/tags/ffmpeg) [dev](https://vokal.co/blog/tags/dev)

# Use FFmpeg to Add Audio to your Videos

By [Frizky](https://twitter.com/frizurd)

· January 24, 2023 ·

2 min read

![ffmpeg add audio to video](https://vokal.co/images/blog/waves-31dc29192286-1200.webp)

FFmpeg is a powerful command-line tool for working with video and audio files. It can be used to perform a wide variety of tasks, including adding audio to a video.

In this rather short tutorial, I'll show you how to use FFmpeg to add audio to a video file.

## 1\. Setting up FFmpeg

First things first, you need to have FFmpeg installed on your computer. Don't worry, it's free and you can download it from the official website ([https://ffmpeg.org/download.html](https://ffmpeg.org/download.html)).

Once you have FFmpeg ready, open up your command prompt or terminal and navigate to the folder where your video and audio files are located.

## 2\. The command

The basic command for adding audio to a video with FFmpeg looks like this:

```text
ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -map 0:v:0 -map 1:a:0 output.mp4
```

Let's break it down into simpler terms:

-   **`-i video.mp4`** tells FFmpeg which video file to use. Replace "video.mp4" with the name of your video file.
-   **`-i audio.mp3`** tells FFmpeg which audio file to use. Replace "audio.mp3" with the name of your audio file.
-   **`-c:v copy`** tells FFmpeg to copy the video stream from the input file to the output file.
-   **`-c:a aac`** tells FFmpeg to use the AAC codec for the audio.
-   **`-map 0:v:0 -map 1:a:0`** tells FFmpeg which video and audio streams to use from the input files.
-   **`output.mp4`** tells FFmpeg what to name the output file.

After you run the command, FFmpeg starts working its magic and before you know it, you have a brand new video with audio.

The time it takes can vary depending on the size of your files and the power of your computer. So, grab a cup of coffee or make a sandwich while you wait.

## 3\. Customizing the Output

It's worth noting that the command I provided is just an example, you can use any codec, container or parameters based on your desired output.

You can also check the [FFmpeg documentation](https://ffmpeg.org/ffmpeg.html) for more information on the different options and codecs available.

And hey, don't be afraid to experiment and try new things!

## 4\. Conclusion

In conclusion, FFmpeg is a super cool tool that can do all sorts of magic with videos and audio files and adding audio to a video is just one of the many things it can do.

With a little bit of command-line knowledge, you can create amazing videos with custom audio tracks that will make your videos stand out.

Don't be afraid to get creative and have fun with it!

![Picture of Frizky](https://vokal.co/profile.jpg)

Frizky [@frizurd](https://twitter.com/frizurd)

Creator of Vokal. Designer and developer for 15+ years, on a mission to make great design accessible to everyone.

[PreviousHow to Cite a Podcast: MLA, APA, and Chicago Styles](https://vokal.co/blog/cite-podcast)[NextVideo Marketing for Small Businesses: Tips and Tricks](https://vokal.co/blog/video-marketing-small-businesses)

## Ready to make  
your first video?

[Get started — it's free](https://app.vokal.co/register)

![Vokal video templates](https://vokal.co/images/examples-min-2f8db0875081-1200.webp)
