LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-14-2014, 04:54 AM   #1
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522

Rep: Reputation: 44
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?
 
Old 04-14-2014, 05:00 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
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.
Old 04-14-2014, 05:43 PM   #3
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by Steve W View Post
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.
Old 04-15-2014, 04:44 AM   #4
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522

Original Poster
Rep: Reputation: 44
Hmm... that might have been it, because I've tried the procedure again now, and it's worked!

Thanks for the advice.

Steve
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Adjusting audio gain in Avidemux Steve W Linux - Software 6 02-03-2017 07:10 PM
FFmpeg - Replace Audio With Audio From Another Video golmschenk Linux - Software 1 10-17-2012 03:10 PM
LXer: Avidemux 2.5.6 Video Editor Brings Many Changes LXer Syndicated Linux News 0 01-01-2012 10:10 PM
AVIDemux, problems with cutting video channelz28 Linux - Software 1 07-21-2010 09:58 PM
Video from Camera to Avidemux SlowCoder Linux - General 3 05-26-2007 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration