[MEncoder-users] MEncoder-users Digest, Vol 87, Issue 5

al ansorge dad2julnken at yahoo.com
Sun Nov 6 14:49:36 CET 2011


This sounds very much like what I have encountered.  It started about mid summer.

Whenever endcoding to mpeg2, I do one difference, I get this error every ten frames or so.  The audio then lags  by about ten seconds.  Mplayer plays much smoother that Kaffeine (my two viewers), but the audio is late on both, Kaffeine seems to alternate between showing me video and giving me audio.


1 duplicate frame(s)!
[mpeg2video @ 0xd12920]Error, Invalid timestamp=418, last=462
Pos:  15.7s    472f ( 0%) 151fps Trem:  31min 2712mb  A-V:0.023 [2158:192] A/Vms 0/6 D/B/S 46/91/0 

1 duplicate frame(s)!
[mpeg2video @ 0xd12920]Error, Invalid timestamp=427, last=472
Pos:  16.1s    482f ( 0%) 150fps Trem:  31min 2610mb  A-V:0.023 [2182:192] A/Vms 0/6 D/B/S 47/93/0 

1 duplicate frame(s)!
[mpeg2video @ 0xd12920]Error, Invalid timestamp=436, last=482
Pos:  16.4s    492f ( 0%) 149fps Trem:  31min 2665mb  A-V:0.023 [2208:192] A/Vms 0/6 D/B/S 48/95/0 



My normal command from before June was:

mencoder -alang en -v -oac  lavc -lavcopts acodec=ac3_fixed:abitrate=192 -ovc lavc -nosub -of mpeg -mpegopts format=dvd -vf  yadif,scale=720:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts threads=2:vcodec=mpeg2video:vrc_buf_size=1835:ilme:ildct:mbd=2:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9 -ofps 30000/1001   -o "movie.mpg"  inputfile.avi


The only command change I have found to make a difference is to remove harddup from the -vf options.  (I got the same recommendations about ni and noskip and mc 0).  Removing harddup makes the sync comes very close, but not as precise as I remember.

I have come to suspect that the automatic patching from my Suse distro has upgraded one of the big libraries used by mencoder, but do not know enough to back it out.  I accept the patches now, with some trepidation hoping that one day the fix will magically appear.  I have tried to install an earlier version of mplayer, and of ffmpeg but can never be sure if I have succeeded or not.  At any rate the problem persists.





________________________________
From: "mencoder-users-request at mplayerhq.hu" <mencoder-users-request at mplayerhq.hu>
To: mencoder-users at mplayerhq.hu
Sent: Sunday, November 6, 2011 6:00 AM
Subject: MEncoder-users Digest, Vol 87, Issue 5

Send MEncoder-users mailing list submissions to
    mencoder-users at mplayerhq.hu

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
or, via email, send a message with subject or body 'help' to
    mencoder-users-request at mplayerhq.hu

You can reach the person managing the list at
    mencoder-users-owner at mplayerhq.hu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MEncoder-users digest..."


Today's Topics:

   1. Re: a/v desync with mencoder that doesn't happen with mplayer
      -dumpstream (Brion Swanson)
   2. Re: a/v desync with mencoder that doesn't happen with    mplayer
      -dumpstream (Brion Swanson)
   3. Re: a/v desync with mencoder that doesn't happen with    mplayer
      -dumpstream (Brion Swanson)
   4. Re: a/v desync with mencoder that doesn't happen with    mplayer
      -dumpstream (The Wanderer)
   5. Re: a/v desync with mencoder that doesn't happen with    mplayer
      -dumpstream (Brion Swanson)


----------------------------------------------------------------------

Message: 1
Date: Sat, 05 Nov 2011 13:26:31 -0400
From: Brion Swanson <deadbeefb5 at gmail.com>
Cc: MEncoder usage discussions <mencoder-users at mplayerhq.hu>
Subject: Re: [MEncoder-users] a/v desync with mencoder that doesn't
    happen with mplayer -dumpstream
Message-ID: <4EB571C7.2070107 at alum.rit.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 11/04/2011 11:27 PM, Bill Crockett wrote:
>
> On 4/11/2011 10:33 PM, Brion Swanson wrote:
>
>> -ovc copy -oac copy -vf dsize=2.35,scale=720:480 
>
> Do the video filters dsize and scale now work with -ovc copy?
>
> mencoder -ovc help
Certainly doesn't seem to negatively impact the rip.  Removing this 
option makes no difference.

>> I tried -mc 0 -noskip and that dies with a "Too many audio packets in 
>> the buffer: (4096 in 8257536 bytes)."  If I leave off the -noskip it 
>> works better but the audio and video are still off by a second or more. 
>
> I was having the same problem with a video, and this fixed the audio 
> delay.  The muxrate fixed Too many audio packets...  You may have to 
> increase the rate.
>
> -ovc copy -oac copy -noskip -mc 0 -of mpeg -mpegopts 
> format=mpeg2:muxrate=9095:tsaf
I tried this as well and it still fails with "Too many audio packets in 
the buffer".  I see it auto-increases the muxrate but dies about 10% of 
the way through ripping.

I appreciate the suggestions.  Any other ideas?

Brion


------------------------------

Message: 2
Date: Sat, 05 Nov 2011 13:37:23 -0400
From: Brion Swanson <deadbeefb5 at gmail.com>
Cc: MEncoder usage discussions <mencoder-users at mplayerhq.hu>
Subject: Re: [MEncoder-users] a/v desync with mencoder that doesn't
    happen with    mplayer -dumpstream
Message-ID: <4EB57453.8060507 at alum.rit.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 11/04/2011 09:33 AM, The Wanderer wrote:
> Do you get similar desync when playing the movies directly from DVD using
> MPlayer, or does this only manifest when transcoding that way?
No, not from playing, only when transcoding.
> Is the size of the desync consistent within any given rip, or does it 
> vary over
> time as you let the movie play?
It appears consistent but since it's so far off it's hard to tell for 
sure if it's getting farther apart or not.
> Do you get the same desync with e.g. ffplay?
I'm not sure how to use ffplay to play the DVD directly, but if I play 
the stream.dump file there is no desync (though there is no desync in 
mplayer with that file either).
>> mencoder dvd:// -alang en -ovc copy -oac copy -vf 
>> dsize=2.35,scale=720:480 -of mpeg -o /nas/movies/Title.mpg -nocache
>>
>> In this case I get a lot of errors like:
>> Maybe you are playing a non-interleaved stream/file or the codec 
>> failed?4:448]
>> For AVI files, try to force non-interleaved mode with the -ni option.
> The mencoder command I use is essentially:
>
> Is this on playback, or when encoding?
Encoding only.

Thanks,
Brion


------------------------------

Message: 3
Date: Sat, 05 Nov 2011 13:55:02 -0400
From: Brion Swanson <deadbeefb5 at gmail.com>
Cc: MEncoder usage discussions <mencoder-users at mplayerhq.hu>
Subject: Re: [MEncoder-users] a/v desync with mencoder that doesn't
    happen with    mplayer -dumpstream
Message-ID: <4EB57876.4000300 at alum.rit.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 11/04/2011 09:33 AM, The Wanderer wrote:
> Is the size of the desync consistent within any given rip, or does it 
> vary over
> time as you let the movie play?
After looking further it appears to increase over time.  Here's the rub: 
the audio is ahead of the video, not behind.
>
> Do you get the same desync with e.g. ffplay?
With the ripped file from mencoder, yes.  Though I suspect it's the 
encoding process that is introducing the delay, not the player.

Brion


------------------------------

Message: 4
Date: Sat, 05 Nov 2011 20:14:41 -0400
From: The Wanderer <wanderer at fastmail.fm>
To: brion at alum.rit.edu,     MEncoder usage discussions
    <mencoder-users at mplayerhq.hu>
Subject: Re: [MEncoder-users] a/v desync with mencoder that doesn't
    happen with    mplayer -dumpstream
Message-ID: <4EB5D171.7060105 at fastmail.fm>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 11/05/2011 01:37 PM, Brion Swanson wrote:

> On 11/04/2011 09:33 AM, The Wanderer wrote:

>> Is the size of the desync consistent within any given rip, or does it vary
>> over time as you let the movie play?
> 
> It appears consistent but since it's so far off it's hard to tell for sure if
> it's getting farther apart or not.

Yeah, that would be a bit tricky.

Does the MPlayer status line report the difference (in the 'A-V:' value), or
does that claim to be in sync? If it does show the difference there, then you
could use that to judge whether the desync is varying or not.

>> Do you get the same desync with e.g. ffplay?
> 
> I'm not sure how to use ffplay to play the DVD directly, but if I play the
> stream.dump file there is no desync (though there is no desync in mplayer
> with that file either).

I meant, do you get the desync when you play the transcoded file using ffplay?

You've answered this in another response. That rules out one possibility, or at
least makes it less likely; I've seen at least one case where MPlayer got the
frame rate wrong on a particular VFR file (which had apparently been created
using MEncoder), but ffplay could handle it just fine.

(I really should get around to putting together a formal report about that.)

Unfortunately, off the top of my head I don't have anything else to suggest,
aside from perhaps posting a full console log of at least a playback session and
possibly even the actual encoding process. There's no guarantee anyone would be
able to help based on that, but it could hardly hurt... though the encoding log
would probably be excessively large.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.


------------------------------

Message: 5
Date: Sat, 05 Nov 2011 20:28:07 -0400
From: Brion Swanson <deadbeefb5 at gmail.com>
To: MEncoder usage discussions <mencoder-users at mplayerhq.hu>
Subject: Re: [MEncoder-users] a/v desync with mencoder that doesn't
    happen with    mplayer -dumpstream
Message-ID: <4EB5D497.8090400 at alum.rit.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 11/05/2011 08:14 PM, The Wanderer wrote:
> On 11/05/2011 01:37 PM, Brion Swanson wrote:
>
>> It appears consistent but since it's so far off it's hard to tell for 
>> sure if
>> it's getting farther apart or not.
>
> Yeah, that would be a bit tricky.
>
> Does the MPlayer status line report the difference (in the 'A-V:' 
> value), or
> does that claim to be in sync? If it does show the difference there, 
> then you
> could use that to judge whether the desync is varying or not.
MPlayer reports that it's staying in sync (only varying slightly but 
never growing) - slight variance is within a few tenths of a unit.
> Unfortunately, off the top of my head I don't have anything else to 
> suggest,
> aside from perhaps posting a full console log of at least a playback 
> session and
> possibly even the actual encoding process. There's no guarantee anyone 
> would be
> able to help based on that, but it could hardly hurt... though the 
> encoding log
> would probably be excessively large.
Perhaps I'll do that and post it somewhere (my home server perhaps) and 
give you a link to it.

Thanks!
Brion



------------------------------

_______________________________________________
MEncoder-users mailing list
MEncoder-users at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

End of MEncoder-users Digest, Vol 87, Issue 5
*********************************************


More information about the MEncoder-users mailing list