[MPlayer-dev-eng] solution of av desync on capturing with mencoder

Diego Biurrun diego at biurrun.de
Fri Jun 17 09:59:33 CEST 2011


On Wed, Jun 15, 2011 at 08:54:40PM +0200, Jarek Czekalski wrote:
>
>> Please post the patches to this mailing list as unified diffs made with svn di.
>>
> It took me some time to convert my rough private patches to a version  
> that could be published.
>
> The rebuilt part of status line output (report_audio_rate patch) may be  
> controversial, but once I changed this part, I felt a strong urge to  
> completely remove code duplicates which were there.
>
> 2 patches attached.
>
> --- DOCS/man/en/mplayer.1	(revision 33606)
> +++ DOCS/man/en/mplayer.1	(working copy)
> @@ -8105,6 +8105,11 @@
>  Do not skip frames.
>  .
>  .TP
> +.B \-noskipafter
> +Do not skip frames after 2 seconds. Useful when capturing from tv where
> +the first frames of video do not go even with audio.

New sentences must go on new lines in the man page.

  Useful when capturing from TV where the first video frames
  are not in sync with audio.

> --- mencoder.c	(revision 33606)
> +++ mencoder.c	(working copy)
> @@ -1433,11 +1434,15 @@
>  
> -if (v_timer_corr >= mux_frametime && (skip_limit<0 || skip_flag < skip_limit)) {
> +int skip_limit_eff; // skip_limit_effective
> +skip_limit_eff=skip_limit;
> +if (no_skip_after && v_muxer_time>=2.0) skip_limit_eff=0;

Please break this line and add spaces around operators on lines you
change anyway.

> --- DOCS/man/en/mplayer.1	(revision 33606)
> +++ DOCS/man/en/mplayer.1	(working copy)
> @@ -8187,6 +8187,13 @@
>  in two pass encoding mode.
>  .
>  .TP
> +.B \-reportaudiorate
> +Report audio rate during encoding in status line (but not in verbose mode) 
> +and after encoding. The reported audiorate can be applied in
> +-af audioscale=scale=... to achieve A/V sync. Should be used together with
> +-noskip or -noskipafter to suppress adjusting video stream to audio stream.

see above

Escape the '-' with a backslash.

Diego


More information about the MPlayer-dev-eng mailing list