[MPlayer-dev-eng] [PATCH] Improving audio handling when using edl with mencoder

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Apr 21 23:47:54 CEST 2007


Christian Aistleitner wrote:
> Hello,
> 
> when encoding PES files, the necessary audio to fetch before an edl cut 
> is  computed using
> 
>   mux_v->timer + next_edl_record->start_sec - demuxer->video->pts
> 
> within the function stop_time of mencoder.c. demuxer->video->pts turns 
> out  to be 0, if the previous PES packets do not contain timestamps. In 
> such  cases, the computed value is far too big and finally far too much 
> audio  get muxed.
> 
> The attached patch replaces demuxer->video->pts by the pts stored in 
> the  video stream header. However, as the pts stored in the demuxer is 
> not yet  completely clear to me, I am not sure, whether the patch is 
> appropriate.
> However, for my test files, this patch cut down superfluous audio from 
> 0.8  to 0.06 seconds.
> 
> Kind regards,
> Christian
> 

-demuxer lavf will store correct timestamps for every audio and video 
frame; it should work correctly without needing patches



More information about the MPlayer-dev-eng mailing list