[MPlayer-users] DVD a/v sync strikes back

Robert R. Wal rrw at hell.pl
Sun Aug 4 04:17:02 CEST 2002


Hi.

As I promised, I've done some research on the DVD a/v sync in my
library. Here are the results.

I'm uploading right now three files to mplayerhq: LastBoyscout.vob,
Fugitive.vob and Unbreakable.vob. Each one is 5M piece of
VTS_01_1.VOB from DVD with the movie.

First two files play with constant a/v desync. When I tried to set delay
by ear I decided that -delay -0.3 was OK. vStrip on the other hand told
something like this:

8<--- LastBoyscout.vob
vStrip - version 0.8f, by [maven] (maven at maven.de).

Scanning for stream id's, press control-c to quit...
Saving 0xBF = Private 2 [@LBA 0]
  Found VOB-ID: 01/CELL-ID: 01 [@LBA 0]
Saving 0xE0 = Video 0 [PTS 0:00:00.129 @LBA 1]
  Width = 720
  Height = 480
  Aspect-ratio = [3] 16:9 display
  Frame-rate = [4] 29.97 (30000/1001) fps
Saving 0xBD = Private 1, sub 0x25 [PTS 0:00:00.046 @LBA 6]
Saving 0xBD = Private 1, sub 0x24 [PTS 0:00:00.046 @LBA 7]
Saving 0xBD = Private 1, sub 0x23 [PTS 0:00:00.046 @LBA 8]
Saving 0xBD = Private 1, sub 0x22 [PTS 0:00:00.046 @LBA 9]
Saving 0xBD = Private 1, sub 0x21 [PTS 0:00:00.046 @LBA 10]
Saving 0xBD = Private 1, sub 0x20 [PTS 0:00:00.046 @LBA 11]
Saving 0xBD = Private 1, sub 0x80 [PTS 0:00:00.046 @LBA 12]
Saving 0xBD = Private 1, sub 0x81 [PTS 0:00:00.046 @LBA 13]
Saving 0xBE = Padding [@LBA 28]

Summary:
MPEG Packs = 2560
System headers = 25
Private 1 packets = 446, total bytes = 893790
  Sub 0x20 packets = 1, total bytes = 833 (delay -0:00:00.083)
  Sub 0x21 packets = 1, total bytes = 833 (delay -0:00:00.083)
  Sub 0x22 packets = 1, total bytes = 833 (delay -0:00:00.083)
  Sub 0x23 packets = 1, total bytes = 833 (delay -0:00:00.083)
  Sub 0x24 packets = 1, total bytes = 833 (delay -0:00:00.083)
  Sub 0x25 packets = 1, total bytes = 833 (delay -0:00:00.083)
  Sub 0x80 packets = 293, total bytes = 591856 (delay -0:00:00.083)
  Sub 0x81 packets = 147, total bytes = 296936 (delay -0:00:00.083)
Padding packets = 24, total bytes = 24526
Private 2 packets = 50, total bytes = 49950
Video 0 packets = 2089, total bytes = 4205302
8<---

I was quite amused, but I tested mplayer -delay -0.083 and... The movie
sounded quite right, both dialogs and shoots/explosions. I guess we are
more tolerant to audio/video delay in one direction than in the other.

Mplayer with -mc 0 (as Arpi suggested) sounds more or less like
-delay -0.083

Next is the piece with similar situation. A little desync wich
was cured by -delay -0.083.

8<--- Fugitive.vob
vStrip - version 0.8f, by [maven] (maven at maven.de).

Scanning for stream id's, press control-c to quit...
Saving 0xBF = Private 2 [@LBA 0]
  Found VOB-ID: 01/CELL-ID: 01 [@LBA 0]
Saving 0xE0 = Video 0 [PTS 0:00:00.129 @LBA 1]
  Width = 720
  Height = 480
  Aspect-ratio = [3] 16:9 display
  Frame-rate = [4] 29.97 (30000/1001) fps
Saving 0xBD = Private 1, sub 0x81 [PTS 0:00:00.029 @LBA 5]
Saving 0xBD = Private 1, sub 0x80 [PTS 0:00:00.046 @LBA 7]
Saving 0xBE = Padding [@LBA 22]

Summary:
MPEG Packs = 2560
System headers = 17
Private 1 packets = 250, total bytes = 504992
  Sub 0x80 packets = 166, total bytes = 335316 (delay -0:00:00.083)
  Sub 0x81 packets = 84, total bytes = 169676 (delay -0:00:00.100)
Padding packets = 16, total bytes = 20168
Private 2 packets = 34, total bytes = 33966
Video 0 packets = 2293, total bytes = 4622888
8<---

Next stream is really weird.

8<--- Unbreakable
vStrip - version 0.8f, by [maven] (maven at maven.de).

Scanning for stream id's, press control-c to quit...
Saving 0xBF = Private 2 [@LBA 0]
  Found VOB-ID: 01/CELL-ID: 01 [@LBA 0]
Saving 0xE0 = Video 0 [PTS 0:00:00.367 @LBA 1]
  Width = 720
  Height = 576
  Aspect-ratio = [3] 16:9 display
  Frame-rate = [3] 25 fps
Saving 0xBE = Padding [@LBA 16]
Saving 0xBD = Private 1, sub 0x80 [PTS 0:00:01.247 @LBA 51]

Summary:
MPEG Packs = 2560
System headers = 35
Private 1 packets = 363, total bytes = 733257
  Sub 0x80 packets = 363, total bytes = 733257 (delay 0:00:00.880)
Padding packets = 34, total bytes = 29286
Private 2 packets = 70, total bytes = 69930
Video 0 packets = 2162, total bytes = 4348207
8<---

When played with mplayer without any a/v delay correction (i.e. simple
"mplayer -dvd 1") it sounds OK.

vstrip shows 0.880 delay for audio.

But when I play this DVD with -mc 0 or -delay 0.880 it is very badly
desynced.

What bugs me is this third file. Normally vstrip is right when it takes
timestamp (that's what PTS is, right?) from first video and audio
packets in VOB and calculates a/v shift from it.

But in case of Unbreakable.vob mplayer's way is better. Maybe there's
something about these padding packets before first audio packet?

Robert

PS. Yes, when I went hunting through my library for DVDs with bad a/v
sync in mplayer, I've found that lots of them are very badly mastered.
But on the other hand, Creative player that comes with DXR3 has no
problem with correct a/v sync on any of those discs.

PPS. mplayer-0.90pre5

-- 
Bastard Operator From 149.156.96.35




More information about the MPlayer-users mailing list