Celeb Glow
general | February 28, 2026

A command to merge video and audio file using "ffmpeg" and remove the source files

I want to merge audio and video using ffmpeg. I use following command but it keeps the input (source) files while I want to delete them after they were merged. I want to see if there is a command for that or not!

ffmpeg -i "a.avi" -i "a.wav" -y -acodec copy -vcodec copy "b.avi"

2

1 Answer

The same command adding && rm a.avi a.wav at the end.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy