[MPlayer-dev-eng] Re: divx2svcd-0.5.1

Nico Sabbi nsabbi at tiscali.it
Mon Apr 26 11:10:30 CEST 2004


Andriy N. Gritsenko wrote:

>    Hi, Jan Knutar!
>
>Sometime (on Monday, April 26 at 11:12) I've received something...
>  
>
>>Do you know how these duplicate ones are handled when using -of mpeg? 
>>Zero sized frames in mpeg as well or something fun and accidental like 
>>that? 
>>    
>>
>
>    MPEG muxer write these as zero sized frames so it's not a problem. I
>think it's a problem of your mpeg video stream. Your reports about PTS
>earlier than SCR seems too suspicios, that is a problem and it _will_
>produce A/V desync. Unfortunately, mencoder can't tell muxer what is the
>max bitrate in stream so muxer tune it itself by estimation from current
>bitrate. But when you have it very little from beginning and then it
>improves too much then muxer cannot tune it fast and gets out of sync. :(
>May be if you could upload a little sample then I could try to find what
>to do with that.
>
>  
>
>>So, this problem would go away, if mencoder would when getting a 0 sized 
>>frame as input, feed the last proper frame again to libavcodec, or is 
>>it not as simple as this?
>>    
>>
>
>    If you do that you'll just get another intra-coded frame (i.e. the
>keyframe). It may break sequence (IBBPBBP... for mpeg1/2) and give you
>some weird results.
>
>    With best wishes.
>    Andriy.
>
>_______________________________________________
>  
>

out of curiosity:  what draft did  you follow, 11722-1?
I can't reconduce some of your pes headers to 13818-1.
A couple of hints, hoping you will turn them into patches :)
a) when the audio codec is ac3 (format 0x2000) you could use 
stream_id=0xbd, so demux_mpeg can correctly recognize ac3
(although maybe it's not enough:  IIRC there should be the extra 4 
leading bytes 0x....80 in the pes payload)
b) it video is mpeg2 it would be nice to set  correctly the mpeg1_mpeg2 
bit, to make some programs like replex happy

Do you have any idea why TMPG often stops demuxing mpeg files generated 
by mencoder long before the end?




More information about the MPlayer-dev-eng mailing list