Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:30:10+00:00 2026-06-08T22:30:10+00:00

I used a command like: ffmpeg -i video.avi -i audio.mp3 -vcodec codec -acodec codec

  • 0

I used a command like:

ffmpeg -i video.avi -i audio.mp3 -vcodec codec -acodec codec output_video.avi -newaudio

in latest version for adding new audio track to video (not mix).

But I updated the ffmpeg to the newest version (ffmpeg version git-2012-06-16-809d71d) and now in this version the parameter -newaudio doesn’t work.

Tell me please how I can add new audio to my video (not mix) using ffmpeg.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:30:12+00:00Added an answer on June 8, 2026 at 10:30 pm

    Replace audio

    diagram of audio stream replacement

    ffmpeg -i video.mp4 -i audio.wav -map 0:v -map 1:a -c:v copy -shortest output.mp4
    
    • The -map option allows you to manually select streams / tracks. See FFmpeg Wiki: Map for more info.
    • This example uses -c:v copy to stream copy (mux) the video. No re-encoding of the video occurs. Quality is preserved and the process is fast.
      • If your input audio format is compatible with the output format then change -c:v copy to -c copy to stream copy both the video and audio.
      • If you want to re-encode video and audio then remove -c:v copy / -c copy.
    • The -shortest option will make the output the same duration as the shortest input.

    Add audio

    diagram of audio stream addition

    ffmpeg -i video.mkv -i audio.mp3 -map 0 -map 1:a -c:v copy -shortest output.mkv
    
    • The -map option allows you to manually select streams / tracks. See FFmpeg Wiki: Map for more info.
    • This example uses -c:v copy to stream copy (mux) the video. No re-encoding of the video occurs. Quality is preserved and the process is fast.
      • If your input audio format is compatible with the output format then change -c:v copy to -c copy to stream copy both the video and audio.
      • If you want to re-encode video and audio then remove -c:v copy / -c copy.
    • The -shortest option will make the output the same duration as the shortest input.

    Mixing/combining two audio inputs into one

    diagram of audio downmix

    Use video from video.mkv. Mix audio from video.mkv and audio.m4a using the amerge filter:

    ffmpeg -i video.mkv -i audio.m4a -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map 0:v -map "[a]" -c:v copy -ac 2 -shortest output.mkv
    

    See FFmpeg Wiki: Audio Channels for more info.

    Generate silent audio

    You can use the anullsrc filter to make a silent audio stream. The filter allows you to choose the desired channel layout (mono, stereo, 5.1, etc) and the sample rate.

    ffmpeg -i video.mp4 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \
    -c:v copy -shortest output.mp4
    

    Also see

    • Combine two audio streams into one
    • FFmpeg Wiki: Audio Channel Manipulation
    • FFmpeg mux video and audio from another video
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used the same command syntax above as in Mysql and would like set
I use this command ffmpeg -i X.mpg -b 533k –vcodec h263 -ac 1 -ab
I used this command to find mp3 files and write their name on log.txt:
I would like to run ffmpeg from PHP for video encoding purposes. I was
Using vim I'm used to motion command like cit , dit , yit when
I used to be able to start ipython from the command line like so:
I'm new to Git, and I used a command like this to clone a
I have used commands like Top and also tools like Traceview to understand the
I just started trying to build simple GUIs because I've always used command-line script
I've a tool bar which has its own view model. I've used command binding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.