Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th September 2009, 10:49 AM
mpolo Offline
Registered User
 
Join Date: Jun 2005
Posts: 184
linuxfedorafirefox
Replacing the original sound from an mpeg file

I have an mpeg with wonderful quality, but the wrong language. I have an avi with the correct language. I already extracted the audio into an ac3 format. My problem is how to get this ac3 audio into the existing video.

I tried using ffmpeg with -b 90k (mplayer reports that the bitrate is 90000) to convert to m2v so that I could use mplex with the m2v and ac3 files. This "works", sort of -- it's even in sync; however, there is a remarkable loss of quality on the video.

Is there something I'm missing? How can I multiplex just the video from an existing mpeg with another audio file?
Reply With Quote
  #2  
Old 12th September 2009, 11:08 AM
mpolo Offline
Registered User
 
Join Date: Jun 2005
Posts: 184
linuxfedorafirefox
Umm.. Sorry. Idiotic question. The bitrate should have been 9000k. Stupid stupid stupid.

So, in case this come up for someone else:

Code:
ffmeg -b 9000k -i my_mpeg.mpeg my_mpeg.m2v
ffmpeg -i my_avi.avi -ab 12800 -ar 44100 my_avi.ac3
mplex -f 8 -o final.mpeg my_mpeg.m2v my_avi.ac3
Reply With Quote
  #3  
Old 12th September 2009, 11:08 AM
mpolo Offline
Registered User
 
Join Date: Jun 2005
Posts: 184
linuxfedorafirefox
Umm.. Sorry. Idiotic question. The bitrate should have been 9000k. Stupid stupid stupid.

So, in case this come up for someone else:

Code:
ffmeg -b 9000k -i my_mpeg.mpeg my_mpeg.m2v
ffmpeg -i my_avi.avi -ab 12800 -ar 44100 my_avi.ac3
mplex -f 8 -o final.mpeg my_mpeg.m2v my_avi.ac3
Reply With Quote
  #4  
Old 13th September 2009, 04:16 AM
Milena's Avatar
Milena Offline
Registered User
 
Join Date: Mar 2009
Location: Europe
Posts: 304
linuxfedorafirefox
Hi

I had exactly the same problem a while back. Avidemux worked great, it can save the audio from one video file and then you add it to another. no quality loss as it simply copy the video and add the new audio track to the output file, getting it 100% sync is not a problem either. avidemux is really one of my favorite tools.
Reply With Quote
  #5  
Old 13th September 2009, 10:29 AM
psyklops's Avatar
psyklops Offline
Registered User
 
Join Date: Apr 2005
Posts: 344
linuxfedorafirefox
Does it have to be MPG? You might have some more flexibility converting and muxing into a different format.

In any case, you can try the following:

Code:
ffmpeg -i <video_source.mpg> -i <audio_source.ac3> -target pal-dvd -sameq -map 0:0 -map 1:1 <video_output.mpg>
The "pal-dvd" preset configures your audio into AC3 already at a DVD compliant bitrate, and "sameq" tried to maintain the same quality for your video.
__________________
Intel Core i7-2700K
16Gig RAM
Asus GTX 560 Ti
Fedora 16 x86_64
Reply With Quote
Reply

Tags
file, mpeg, original, replacing, sound

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing Strings in a file Planescape Programming & Packaging 5 29th January 2007 08:29 PM
How do I use dvdauthor to create a VOB from a mpeg file? Plankton Using Fedora 6 1st September 2006 08:20 AM
Please post your ifcfg-wireless file. I need the original one. JesusDM Servers & Networking 11 2nd April 2005 04:29 PM


Current GMT-time: 07:26 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat