Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-14-2014, 04:54 AM
|
#1
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Rep:
|
Replace audio in video file - Avidemux?
I want to replace the audio in a video file with the audio in an external mp3 file. I am using Avidemux to do this, but what is meant to be relatively straightforward, isn't working.
I call up the video file - an H264/AVC file (mp4). My replacement audio is an mp3, and I'm aware you can't use mp3 in an mp4 file, so I resave the video as AVI (xvid).
I choose "Audio" and "Main track" from the menus, and choose my replacement track.
When I play in Avidemux, there is no audio - it's silent. Neither the original audio or the replacement audio play.
Saving the file still produces a silent movie.
What am I doing wrong? Do I need to ensure certain video/audio compatibilities before I "merge"?
Doea anyone know a different utility that would be better for accomplishing this task?
|
|
|
04-14-2014, 05:00 AM
|
#2
|
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
|
avconv was a fork of ffmpeg so either should work with relatively the same syntax.
$ avconv -i input.ext -vn -sn -acodec copy -y audio.ext
$ avconv -i input.ext -an -sn -vcodec copy -y video.ext
$ avconv -i video.ext -i newaudio.ext -vcodec copy -acodec copy -y video2.ext
Just make sure that the new audio is the correct length and format to avoid re-encoding the whole.
$ avprobe video.ext
To tell what formats are in the existing file. And ffprobe if using that option.
|
|
1 members found this post helpful.
|
04-14-2014, 05:43 PM
|
#3
|
Senior Member
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099
|
Hi there,
Quote:
Originally Posted by Steve W
I call up the video file - an H264/AVC file (mp4). My replacement audio is an mp3, and I'm aware you can't use mp3 in an mp4 file, so I resave the video as AVI (xvid).
|
did you close the current video file to reopen the newly created one? - Unlike many other programs, Avidemux continues to work on the original file even after "Save As" to a completely different format.
[X] Doc CPU
|
|
1 members found this post helpful.
|
04-15-2014, 04:44 AM
|
#4
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Original Poster
Rep:
|
Hmm... that might have been it, because I've tried the procedure again now, and it's worked!
Thanks for the advice.
Steve
|
|
|
All times are GMT -5. The time now is 05:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|