[MPlayer-users] videos from youtube loosing sync

陆然 hephooey at gmail.com
Thu Nov 16 03:23:54 CET 2006


Hi,

On Thursday 16 November 2006 07:15, The Wanderer wrote:
> MPlayer detects that file as being 29.970 fps, and therefore plays it at
> that frame rate by default. Adding '-fps 24000/1001' to the command line
> produces apparently correct playback.
>
> ffmpeg likewise detects that file as being 29.97 fps, but ffplay does
> indeed play it back without loss of A/V sync - if anything, even better
> than MPlayer with '-fps 24000/1001'. Not sure what's going on there.

IMHO, the flv format should be synced by frame time instead of a fixed frame 
rate, unfortunately mplayer sync all the lavf demuxed stream by framerate, 
you can modify the video.c in libmpdemux to enable the frame time based sync 
for flv:

@@ -598,9 +597,10 @@
       }
       break;
       case DEMUXER_TYPE_LAVF:
-        if((int)sh_video->fps==1000 || (int)sh_video->fps<=1){
+        if((int)sh_video->fps==1000 || (int)sh_video->fps<=1 || 
sh_video->format == 827739206){
           float next_pts = ds_get_next_pts(d_video);
           float d= next_pts > 0 ? next_pts - d_video->pts : 
d_video->pts-pts1;
+          printf("next_pts: %f %f\n", next_pts, d);
           if(d>=0){
             frame_time = d;
           }

-- 
Best Regards,
LR



More information about the MPlayer-users mailing list