[MPlayer-users] Re: How to dub a video with mencoder?

Giacomo Comes comes at naic.edu
Fri Mar 4 18:06:34 CET 2005


On Fri, Mar 04, 2005 at 09:39:03AM -0400, Giacomo Comes wrote:
> On Fri, Mar 04, 2005 at 12:33:16PM +0100, Nico Sabbi wrote:
> > Giacomo Comes wrote:
> > 
> > >On Wed, Mar 02, 2005 at 04:56:07PM -0500, D Richard Felker III wrote:
> > > 
> > >
> > >>On Wed, Mar 02, 2005 at 10:41:26PM +0100, Dominik 'Rathann' Mierzejewski 
> > >>wrote:
> > >>   
> > >>
> > >>>On Wednesday, 02 March 2005 at 03:37, D Richard Felker III wrote:
> > >>>     
> > >>>
> > >>>>On Wed, Mar 02, 2005 at 01:47:41AM +0100, Dominik 'Rathann' 
> > >>>>Mierzejewski wrote:
> > >>>>       
> > >>>>
> > >>>>>On Tuesday, 01 March 2005 at 12:33, R C wrote:
> > >>>>>         
> > >>>>>
> > >>>>>>On Tue, 01 Mar 2005 12:15:01 +0100
> > >>>>>>Tristan Miller <psychonaut at nothingisreal.com> wrote:
> > >>>>>>
> > >>>>>>           
> > >>>>>>
> > >>>>>>>Can you recommend a program for GNU/Linux that will output OGM
> > >>>>>>>containers
> > >>>>>>>             
> > >>>>>>>
> > >>>>>>I'm pretty sure ogmmerge is the only one.
> > >>>>>>           
> > >>>>>>
> > >>>>>That is: encode with mencoder to AVI without sound, encode audio
> > >>>>>         
> > >>>>>
> > >>>>Encoding without sound can break a/v sync. You'd be much better off to
> > >>>>use -oac pcm or -oac copy then throw away the sound in the avi file
> > >>>>when remuxing.
> > >>>>       
> > >>>>
> > >>>What if you use -noskip and/or -mc 0?
> > >>>     
> > >>>
> > >>No, that just makes the problem worse. -mc 0 is implied anyway by
> > >>-nosound. You really have to encode some sound in order for mencoder
> > >>to work right. If you hate this, just resample to 8000 hz 8bit mono
> > >>pcm and it hardly uses any space or cpu time.
> > >>   
> > >>
> > >
> > >The needs to encode some sound in order for mencoder to work right
> > >does apply only to avi or also to mpeg?
> > > 
> > >
> > 
> > it's the same: the sync code is in mencoder.c
> > 
> > >Because resample to 8000 hz 8bit mono pcm does not work if you are 
> > >creating an mpeg (-of mpeg). 
> > >
> > 
> > both toolame and lavc want 16 bit samples, not 8, and the sampling
> > rates admitted in  mp2 (maybe even mp3)  are 32/44.1/48 khz IIRC
> 
> mp2 can be also 16000/22050/24000
> mp3 16000/22050/24000 + 8000/11025/12000
> 
> > 
> > >I imagine that if I have to encode some 
> > >audio in the mpeg, I should use a low freq mp2, isn't it?
> > >
> > 
> > muxer_mpeg  can store mp2, mp3 and ac3, so as long as the sound you send
> > it is not damaged or incorrect you will hear it
> 
> I think the point was the need to encode only the video and mux later the audio stream.
> Just 'mencoder -noaudio' doesn't work because of the A/V sync. So I need to encode
> some audio that will be anyway discarded later. 
> 8000 hz 8bit mono pcm doesn't require much cpu, but cannot be used with mpeg.
> I will check different sample rate/bit rate/codec for the the combination
> that needs less cpu resource.

And the winner is:
   libavcodec mp2
mencoder <options> -srate 16000 -oac lavc -lavcopts acodec=mp2:abitrate=8 -channels 1
is the fastest combination I have found

Giacomo




More information about the MPlayer-users mailing list