Log in

View Full Version : Relationship Between DVD VOB NAV Packs and PES Subpicture Streams?


Fullmetal Encoder
2nd September 2012, 22:56
I am working on a project to reproduce VobSub's output for subtitle streams and start times but I am having great difficulty in understanding how VOBU NAV packs and subpicture PES streams are connected in the VOB files. I have found many great resources and informative threads about how to calculate the correct presentation start times for subtitles using the vob_v_s_ptm values found in NAV packs and the display control sequence delays found in the PES subpicture streams but nothing concrete on how to know which NAV packs are associated with which PES streams. From what I understand from mpucoder.com and other sources:

1. Subpictures for any particular VOBU need not be stored within that VOBU but instead can be within another VOBU referenced by the originating VOBU's NAV pack sp_synca values.
2. The vob_v_s_ptm and vob_v_e_ptm values from the originating VOBU NAV pack have to be used with the display control sequence delays found in the PES streams of the referenced sp_synca VOBU(s) to arrive at the correct subtitle presentation time (I think this is right).

So far, so good. But what I've discovered is that there are apparently many DVDs that have subtitles for which no sp_synca offsets can be found in the NAV packs. So when I check the sp_synca values (in VobEdit) all I see are 32 4 byte values filled with zeros in each NAV pack even though I can play the DVD and see the subtitles. I can create the code to combine all of the subpictures PES streams but the streams themselves have no knowledge of the VOBU NAV packs they're associated with and their layout in the VOB structure isn't necessarily linear so how can the player (or my code) know where they are or when they need to be displayed?

I have tried checking other program sources for some clues to unravel this without any success.

Thanks in advance to anyone for any help.

mpucoder
5th September 2012, 00:53
The information in the NAV packs concerning subpicture streams is mostly for resyncing after a random positioning or trick play (2x, reverse, etc). The timing of a subpicture can be determined entirely from the first pack that contains the subpicture. Look at the PTS.

Fullmetal Encoder
8th September 2012, 00:09
Thank you very much for clearing this up for me. It was basically my last major roadblock. I had misinterpreted information from a couple of sources and ended up proceeding with a false assumption.