Audio and video slowly drifting out of sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



Hiya,

When playing HD files encoded with h.264, video progressively goes out of sync
with (lags behind) the audio. I tried it on 2 different computers. Here are the
commands I used:

mplayer -cache 8192 - < capture-00.flv
mplayer -vo vdpau -vc ffh264vdpau -cache 8192 - < capture-00.flv

Without VDPAU acceleration, CPU usage does not go above 50% (it's Core 2 Duo
1.83GHz computer). With VDPAU CPU usage is below 10%. But still in both cases
video slowly lags more and more behind the audio.

If I add -framedrop option, it fixes the problem, but I see jerks once in a
while. Without the option the video plays smoothly.

I am using MPlayer SVN-r29796-4.3.4.

The original files are encoded using ffmpeg with the following command:

ffmpeg \
-f rawvideo -s 1280x720 -pix_fmt uyvy422 -r 59.94 -i /dev/sdivideorx0 \
-f s16le -ar 48000 -ac 2 -i /dev/sdiaudiorx0 \
-vcodec libx264 -vpre custom -vb 4000000 -threads 0 \
-acodec libfaac -ab 256k \
-f flv - > capture-00.flv

I know the original files are good, as I can play them on the mac with no
glitches. I tried using different container (-f mpegts) but that didn't help.

I was thinking maybe this has something to do with the monitor refresh rate
being 60Hz while the video is 59.94Hz.

Does anybody have any suggestions on what I can do to fix this?

Thank you.

-TJ


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux