[MEncoder-users] avi sync questions

Erik Slagter erik at slagter.name
Mon Apr 7 14:03:09 CEST 2008


RC wrote:
> On Sun, 06 Apr 2008 11:42:59 +0200
> Erik Slagter <erik at slagter.name> wrote:
> 
>> Elementary streams do not have associated timestamps.
> 
> Elementary streams have STC/SCR time-stamps.

STC = system time clock?
SCR = system clock reference

These are no relevant time stamps for a/v sync.

>> The workaround would be to encode audio and video seperately,
>> cut/add as much frames from/to the start of the audio/video  streams
>> so they are aligned and then multiplex these together. This will 
>> always play correctly, whether on a borked or a correct player.
>>
>> AFAIK there is no option in mplayer and mencoder to do this for you,
> 
> In fact that is Mencoder's (perhaps only) method of handling A/V sync.

Are you saying that avi's produced by mencoder always their audio AND 
video start at the first frame list entry AND that these are always a 
video and audio sync that actually belong to the same moment in time? 
That is not my experience, two years ago I used mencoder to create avi's 
with mpeg4-2 for my media player, and they always had a/v sync issues 
while mplayer played them fine. This looks like a/v skew in the file.

Anyway, the avi-thing I am not quite interested in, I'd really like 
mencoder to produce two raw streams at the same time (either transcoded 
or original) while mencoders takes care that the a/v sync as expressed 
in the timestamps of the input file, are reflected in the raw output 
files, by dropping or repeating audio or video frames. Supplying these 
two elementary streams to a suitable muxer would then yield instant 
correct a/v sync without extra (manual!) hassle. A bit like ProjectX 
does (which I don't like for other reasons).


More information about the MEncoder-users mailing list