[MEncoder-users] MPEG-2 muxer

Nicolas Hesler nicolas.hesler at sheridanc.on.ca
Mon Aug 27 18:58:58 CEST 2007


Nico Sabbi wrote:
> Nicolas Hesler wrote:
>
>   
>> Nico Sabbi wrote:
>>
>>     
>>> Nicolas Hesler wrote:
>>>
>>>       
>>>>  So when Mencoder muxes a  file, it tries to ensure sync.
>>>> Do demuxers (like MPEG StreamClip) then retain that sync or it is 
>>>> the same result as going to two separate files directly from Mencoder?
>>>>
>>>>         
>>> I don't know what that program is
>>>
>>>       
>> I know.  I was a little unclear.
>>
>> What I know:
>>
>> 1. mencoder will mux and retain sync as much as possible because it is
>> aware of timestamps.
>> 2. going directly to 2 separate files will potentially create sync
>> problems because it is not using timestamps.
>>
>> Basically, what I want to know is:
>>
>> - if I take the muxed file that mencoder produced and then demux it,
>> will I have the same result as when you go directly to 2 separate
>> files?
>>     
>
>
> of course yes
>
>   
>> or will the 2 demuxed files produced from the Mencoder file have
>> potentially  better sync than going directly to 2 separate files?
>>
>>     
>
> potentially worse, not better. It seems that users don't realize that
> mpeg files produced by mencoder may have slight temporal discontinuities,
> e.g. few consecutive timestamps (without considering b-frames) may be:
>
> 0.40, 0.80, 1.20,   2.0, 2.40, 2.80,   3.60, 4.00  and so on
>                       ^^ gap here        ^^^
>
> gaps are introduced when mencoder inserts 0-length frames to keep sync
> (similar to N-frames in avi).
> Demuxing the file you will lose those gaps, so remuxing the elementary 
> stream
> files will result in a mux containing (possibly) different timestamps 
> than in the
> original file (and surely won't contain the gaps supposed to keep the 
> streams in sync)
>
>   
Can you recommend a method by which you could use Mencoder as the 
encoder, retain sync as much as possible and end up with 2 files (m2v 
and ac3)? 

Thanks for this.







More information about the MEncoder-users mailing list