Log in

View Full Version : NTSC subtitles not synchron after reauthoring


kotyczka
13th May 2009, 09:24
Hallo, I would like to add an additional audio stream
to a commercical DVD preserving the original audio and
subtitles.
Seems to be easy:
1. Demux with PGCdemux
2. Author with Muxman
3. Replace movie with DVDremake

However the original is NTSC "drop frame".
If I try demuxing with PGCdemux and remuxing with
Muxman, even without the additional audio stream,
the result is not synchron any more.
Audio/Video is synchron, however Sutitles/Video
are not.

I guess that is due to the fact that MuxMan
recalculates the timecode into "non drop frame".
Is that correct? Or can I change the behaviour
of MuxMan? If not, I do have a problem.
Because the combination PGCdemux/MuxMan is the
only way I know of to use subtitles in the .sup
format directly.

What should I do in that situation?

manono
13th May 2009, 15:45
I'll assume you tested the remuxed DVD in a player to determine the subs were out of synch, before doing the final DVDRemake step?

I'll also assume the subs are off by the same amount all the way through?

I've demuxed and remuxed subs literally thousands of times and never had them go out of synch (but then I don't use DVDRemake either). It's not a drop_frame issue. They're off for some other reason, perhaps an incorrect decrypt of a newer movie. Find out how much they're off, and then use SubtitleCreator to open the SUP file made by PGCDemux and add in a delay. Then remux again with Muxman and test.

kotyczka
13th May 2009, 19:55
I'll assume you tested the remuxed DVD in a player to determine the subs were out of synch, before doing the final DVDRemake step?
Yes, exactly.

I'll also assume the subs are off by the same amount all the way through?
No, not at all. The delay is (almost) zero at the beginning of the movie and about 16 seconds at the end. It is increasing.

I've demuxed and remuxed subs literally thousands of times and never had them go out of synch (but then I don't use DVDRemake either). It's not a drop_frame issue. They're off for some other reason, perhaps an incorrect decrypt of a newer movie. Find out how much they're off, and then use SubtitleCreator to open the SUP file made by PGCDemux and add in a delay. Then remux again with Muxman and test.
It is not a ripping problem. The movie was released region code free for region 1. It has no copy protection at all, not even CSS.
In the rip on hard disk subtitles are perfectly in sync.

I opened both the rip and the MuxMan result in DVDSubEdit by jeanl to take a look at the subpictures timecodes. They are identical.
One typical subpicture (which is easily to identify for me) shows timecode 01:16:14,880 -> 01:16:15,947.

When I watch the rip with PowerDVD7.0 that subpicture shows up at about 01:16:02. The corresponding spoken word is also at 01:16:02.
However I have no idea if one can trust the timecode PowerDVD shows.
If I watch the reauthored movie with PowerDVD the subpicture appears at 01:16:20. The spoken word however was at 01:16:07.

So I strongly think this must be some kind of timecode problem.

manono
13th May 2009, 21:21
Strange, then. However, unless this is a very long movie, 16 seconds is way too much for them to be off synch at the end. Using non drop_frame timecode would give you a length about 7 seconds shorter than actual for a 2 hour movie.

PowerDVD always gives the wrong time for the movie or the place in the movie because it uses non drop_frame timing. It shows the length as a few seconds shorter than the actual length because it's keeping track at 30fps rather than at 29.97fps.

However, it'll take a more knowledgeable person than I to figure out the problem. As a workaround, SubtitleCreator also has the ability to convert SUP framerates, if you can figure out what it's supposed to be. It's similar to a percentage retiming.

mpucoder
15th May 2009, 09:37
Before everyone goes too far down the wrong road - sup files do not have frames or framerate or timecodes, they use relative presentation time, measured in ticks of the 90KHz system clock. The time is relative to the start of video. The audio and video are also synchronized during muxing by system clock ticks, with every NTSC video frame having a duration of 3003 ticks. Drop and non-drop are timecode methods and not relevant to muxing (but are important to initial authoring when specifying cell points or subpicture insertion points). Audio frames also have predefined durations (e.g. AC3 frames are 32ms in duration, or 2880 ticks).

The only possibility I can imagine is an error in the demuxing process at vob boundaries. At these points the SCR (System Clock Reference) is reset. This requires demuxers to adjust the time stamp to account for all the preceding vobs. Video and audio do not get out of synch because they are continuous - the demux process does not have to compute the time values as they progress at a known rate. SubPictures, however, are not continuous and require great care in calculating their proper time.

One check to perform, if possible, is to ascertain that all time values in the .sup file are exactly divisible by the video duration (3003 for NTSC, 3600 for PAL). I don't know if any program exists that can do this, and, unfortunately, MuxMan does not report anomolous values.

If I interpret your post correctly the subpictures are appearing progressively later than they should. This would most likely be caused by not subtracting the video decode delay for each new vob. This would result in approximately 8.4 frames of delay for each new vob.

kotyczka
19th May 2009, 14:24
Before everyone goes too far down the wrong road - sup files do not have frames or framerate or timecodes, they use relative presentation time, measured in ticks of the 90KHz system clock. The time is relative to the start of video. The audio and video are also synchronized during muxing by system clock ticks, with every NTSC video frame having a duration of 3003 ticks. Drop and non-drop are timecode methods and not relevant to muxing (but are important to initial authoring when specifying cell points or subpicture insertion points). Audio frames also have predefined durations (e.g. AC3 frames are 32ms in duration, or 2880 ticks).

The only possibility I can imagine is an error in the demuxing process at vob boundaries. At these points the SCR (System Clock Reference) is reset. This requires demuxers to adjust the time stamp to account for all the preceding vobs. Video and audio do not get out of synch because they are continuous - the demux process does not have to compute the time values as they progress at a known rate. SubPictures, however, are not continuous and require great care in calculating their proper time.

One check to perform, if possible, is to ascertain that all time values in the .sup file are exactly divisible by the video duration (3003 for NTSC, 3600 for PAL). I don't know if any program exists that can do this, and, unfortunately, MuxMan does not report anomolous values.

If I interpret your post correctly the subpictures are appearing progressively later than they should. This would most likely be caused by not subtracting the video decode delay for each new vob. This would result in approximately 8.4 frames of delay for each new vob.

Thanks for your attention, mpucoder! It took me some time to track the problem down
further.

First I discovered that the timecode shown is PowerDVD seems to be not very correct.
I opened the movie with DVDSubEdit to see at which times when the subpictures start.
Comparing those times to the time in different software players I found that
the time shown in PowerDVD is rather approximately, whereas WinDVD and Nero Showtime
seem to show correct times.

Next I found that the synch delay is not increasing continously, but rather there
is a delay of zero until minute 56:30, and from there on a delay of about 13 seconds
constantly. And one more thing, the delay starts at the layer break. I opened the
movies .ifo with IfoEdit and found the layer break right at that time.

So now I have an idea, that the layer break has something to do with the delay.
But how to correct it? Best would be a general solution like ... (no idea).
If there is none as a workaround I could manually correct the delay in DVDSubEdit.
But what an effort! And I have no idea how to detemine the exact length of the delay.

Could anyone give me some advice, please?

BTW, the movie is "Animal Treasure Island".

blutach
19th May 2009, 23:17
At the LB, does the VobID change? If so, you could reset the times to 0 in DVDSE (there is a way to adjust all selected subs timecodes in one operation - it's in the help file). So, you could select the cells that are out and move the time codes. However, it may not be possible to correct for such a big time gap, but this is worth a try. Do it on a copy of the project as there is no Undo once saved.

Regards

manono
20th May 2009, 02:18
Next I found that the synch delay is not increasing continously, but rather there
is a delay of zero until minute 56:30, and from there on a delay of about 13 seconds
constantly.
So, much of what you wrote in your first 2 posts was just plain wrong. It seems to me it would be a simple matter to test the DVD at various places and determine it had nothing to do with time codes, that the out-of-synch wasn't gradually increasing, but jumped all of a sudden from being in-synch to being 13 seconds off.

Yes, it's almost certainly due to a VOB ID change. You can confirm or disprove before going any farther by opening the IFO in PGCDemux and ticking "By Vob id" and checking if a second VOB ID begins somewhere around the 56:30 mark, as you mentioned.

If so, blutach's suggestion is the one to follow. And by the way, thanks, blutach. I was looking for a way to change the timings of some of the subtitles a while ago and couldn't figure out how to do it. Your suggestion gave me fresh energy, and I figured it out.

Do a File->Open Full Domain in DVDSubEdit, and then in the upper right use the drop down box by "All VCID" to select the 2nd VOB ID (2*). Then, in the mid-right side hit "Re-time selected subpics" and fill in the correct amount. As blutach says, 13 seconds is quite a bit, so hope for the best. I tested this out and with a -13 seconds it worked fine. With a +13 seconds it kept getting a bunch of collisions or something and didn't move a bunch of subs. Your delay is most likely negative, though. Then File->Save all modifications.

Did I explain the procedure correctly, blutach? Thanks again for pointing the way.

blutach
20th May 2009, 06:15
Yup!

Regards

GrofLuigi
22nd November 2009, 18:09
Hello all,

I encounter the same issue whenever I work with NTSC DVDs. I didn't open a new thread because I think this thread fits perfectly. And I appologize for the long post.

A little background about my workflow and to clear possible copyright issues: I translate and subtitle DVDs (mostly documentaries) for presentation in front of small group of people. The materials are received directly from the authors with intention to make the said presentations. I am not at liberty to say more, but no money changes hands during this process (maybe later ;)), so I don't think this falls into commercial usage of the programs I use (most of them are freeware). I try to make donations whenever I can.

Now, I receive all kinds of DVDs, sometimes authored improperly, with many applications and on both standards (but mostly PAL, so my configuration is set up for that). This also means I have no control over encoding parameters, and I try to preserve the picture quality as much as possible, so I just demux, add .sup and remux the main title only. Also, I don't know much about advanced DVD concepts, so I'm totally lost in, for example, PGC Edit.

The programs I use:

- DVD Decrypter - just the main title in one VOB (for ease of manipulation); the DVDs are never protected.

- DGIndex and/or PGCDemux to demux streams and to prepare Avisynth script for preview:
v = MPEG2Source ("D:\VIDEO\DVD\1\VIDEO_TS\1.d2v")
a = NicAC3Source ("D:\VIDEO\DVD\1\VIDEO_TS\1.ac3")
AudioDub (v,a)

- Create timed .srt in Subtitle Workshop (in the Open Movie dialog, I just paste the name of the above script; it works every time :D).

- Create .sup with Subtitle Creator.

- Mux .m2v, .ac3 and .sup with Muxman 0.15R (Newer version confuses me, and besides, I don't need anything more).

- Check/adjust colors/position with DVD Sub Edit.

For PAL this works flawlessly, but for NTSC (video, not IVTC) there is always progressive delay which amounts roughly to 3 seconds per hour (http://en.wikipedia.org/wiki/SMPTE_time_code#Drop_frame_timecode), so I think it's exactly this drop/non-drop frame issue (I think .m2v and .sup are interpreted with different timecodes). Because the .avs script is always synchronized, I can't see where I can adjust anything in the said programs. Also, in Subtitle Workshop, if I convert 30 fps to 29.xxx fps or vice versa, that's not it - of course, it isn't synchronized with .avs script any more so I cannot force myself to proceed to create DVD which is obviously out of sync. :(

I have seen just now that it's possible to retime the .sup in Subtitle Creator, and will try that, but what value should I set to? As I said, up to this point, it's perfectly in sync, so I'm pretty confused. :confused:

So, the question would be: how to create, with this workflow, NTSC subtitles that won't be out of sync progressively? Even if the intermediate script preview becomes out of sync, OK, but where to set the parameter? Or even delay in SW or SC, but what amount?

GL

*Edit: With regards to the proposed solutions in this thread, I might have understood incorrectly, but I don't think it's possible for this to happen on every DVD I've tried. Or is it? Again, this seems like a flaw in some of the programs... (you can never get the expected results, but need to resort to additional modifications?) These are DVDs I recreated from (nearly) scratch...
- Even if I create .avi from the .avs, it's all the same.
- The delay is seen in all software and hardware players I've tried.

manono
22nd November 2009, 18:25
I have seen just now that it's possible to retime the .sup in Subtitle Creator, and will try that, but what value should I set to?
In Synchronize->Convert Frame Rate, you want from 30 to 29.97. It even has drop-down boxes so you don't have to type in anything.

GrofLuigi
22nd November 2009, 18:36
In Synchronize->Convert Frame Rate, you want from 30 to 29.97. It even has drop-down boxes so you don't have to type in anything.
Thank you, will try. I was still editing my post when you replied. :)

*Edit: that's not it, maybe the reverse. The subtitles are even more late. I will try again in the following days.

BTW, Subtitle Creator 23RC1 exposed a bug when I opened the .sup it had created and I applied covert frame rate: the background of the pics was cropped and some subtitles were shown in extremely large font. Maybe it's just the preview, but I recreated them from .srt.

GL