[MPlayer-dev-eng] Need help to extend mencoder
    Nico 
    nsabbi at libero.it
       
    Mon Oct 20 16:12:40 CEST 2003
    
    
  
Hi,
I'm trying to extend mencoder so make it use (some of -) lavc audio 
codecs (I want mainly mp2 and ac3, but others may be useful).
Something is already working correctly ( I can encode and  playback avis 
up to a certain point), but I have some problems:
1) I don't know what's the meaning of (and how to calculate) these 
initialization fields in mux_a->wf:
   
mux_a->wf->nBlockAlign 		//for mp3 it's = (mux_a->h.dwRate<32000)?576:1152; for PCM it's  mux_a->h.dwSampleSize;
mux_a->wf->cbSize		// =12 for mp3, 0 for PCM
mux_a->h.dwScale		// 1 for PCM,  (mux_a->h.dwRate<32000)?576:1152  for mp3 ; 
I guess dwScale is a compression factor depending on target bitrate, right?
2) I don't know how much audio data I have to decode and encode at any 
iteration of the main encoding loop;
in the code there is a comment: 
	// CBR - copy 0.5 sec of audio
but I wonder if it's valid only for ACODEC_COPY and ACODEC_PCM or really 
_always_
3) consequently only a small part of the original audio stream is 
present in the encoded file.
Can anyone shed some light, please?
Thanks very much,
       Nico
    
    
More information about the MPlayer-dev-eng
mailing list