[MPlayer-dev-eng] mplayer A/V sync: in sync when fed to stdin, out of sync when reading file directly?
William R Sowerbutts
will at sowerbutts.com
Tue Jan 7 19:12:59 CET 2003
I have recorded some DVB-t video to disk. I record UK DVB-t broadcasts using a
PCI Nova-T card and using some software I've written. It converts the audio
and video stream from the TS into a single PES and records that to disk using
code from the ts2ps app from mpegtools. I can provide a sample MPEG file which
exhibits this problem if anyone wants to see one.
I am using mplayer cvs from 2003-01-06. My audio hardware is an M-Audio
Dio2496 card using ALSA 0.9.0rc5 drivers with OSS compatability via the
mplayer SDL output plugin. My video hardware is a Matrox G550 card using the
mga_vid driver from mplayer cvs. I run mplayer from a 1024x768 framebuffered
console.
If I play the file with mplayer by providing the filename on the command line
then the audio and video appear out of sync by a constant amount:
$ mplayer -cache 4096 -ao sdl -vo mga ./video.mpg # a/v out of sync
I can correct this by adding a parameter of "-delay -0.15" (-0.15 feels about
right but not quite right).
However, if I play the video via stdin, the A/V sync is absolutely spot on:
$ mplayer -cache 4096 -ao sdl -vo mga - < video.mpg # a/v is in sync
Is this a bug? Or am I missing some vital point? Perhaps mplayer ignores the
PTS timestamps unless it is streaming the video via stdin?
Thanks,
Will
_________________________________________________________________________
William R Sowerbutts will at sowerbutts.com
Coder / Guru / Nrrrd http://sowerbutts.com
main(){char*s=">#=0> ^#X@#@^7=",c=0,m;for(;c<15;c++)for
(m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}
More information about the MPlayer-dev-eng
mailing list