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

Jarek Czekalski jarekczek at poczta.onet.pl
Fri Jun 17 17:48:51 CEST 2011


W dniu 06/17/2011 09:59 AM, Diego Biurrun pisze:
> 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
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
Homework done.

Changed also:
do not go even with audio. -> do not go evenly with audio.
// skip_limit_effective -> // the effective skip_limit
in manual: audiorate -> audio rate

To do (for me):
- update Polish manual
- make an option for the 2.0s constant in -noskipafter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: audioscale_status_20110617_1.diff
Type: text/x-patch
Size: 5399 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110617/ad25fc5e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_skip_after_1_2.diff
Type: text/x-patch
Size: 2264 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110617/ad25fc5e/attachment-0001.bin>


More information about the MPlayer-dev-eng mailing list