|
|
| rmanal |
| Posted: Jul 13 2007, 01:53 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 153
Member No.: 11636
Joined: 28-August 04

|
Hello,
I have a VOB file that i convert into DIVX AVI file. In the VOB file, I have no gap in the audio stream, but in the AVI file, and even in VDMPEG2, I can see a gap of less than 1s in the audio stream. In other VOB file, I don't have in general this issue. I don't know how to put the VOB file in this topic.
Could anyone help be by reproducing my issue?
Thanks Rmanal |
 |
| rmanal |
| Posted: Aug 13 2007, 09:46 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 153
Member No.: 11636
Joined: 28-August 04

|
FCCHandler, where are you ;-) |
 |
| fccHandler |
| Posted: Aug 13 2007, 06:12 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I don't know why there would be a gap in the output, unless the VOB is broken somehow. But it's impossible to say without examining the VOB.
-------------------- May the FOURCC be with you... |
 |
| rmanal |
| Posted: Aug 14 2007, 09:43 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 153
Member No.: 11636
Joined: 28-August 04

|
tell me what and how I can see something in my VOB file, or how I can send it to you?
Thanks |
 |
| fccHandler |
| Posted: Aug 14 2007, 06:23 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (rmanal @ Aug 14 2007, 05:43 AM) | | tell me what and how I can see something in my VOB file |
Try the conversion with other programs. There is lots of commercial software to convert VOBs to DivX, in fact I think DivX makes something to do that. Other free tools to try are DGIndex and TMPGEnc. If you still have problems with this same VOB using other programs, then the VOB is probably broken and can't be fixed.
| QUOTE | | ... or how I can send it to you? |
If it's a typical 1 GB VOB, you can't. There is a list of file hosting sites here but AFAIK they all have limits on how big the file can be. You can try to cut the file to a smaller size, and there are tools for that too. The trick will be to isolate a small portion (small enough to send) that still demonstrates the original problem.
-------------------- May the FOURCC be with you... |
 |
| rmanal |
| Posted: Aug 18 2007, 10:11 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 153
Member No.: 11636
Joined: 28-August 04

|
I have tried to analyse my VOB file with VOB edit and I have found that it does not begin with a nav-pack. If I use chopperXP it adds a nav pack block, but I can't know with which informations and I still have a shorter delay. I I use MPEG cut then the new VOB files can't be opened with powed DVD.
So I don't know how to cut my big VOB file. I have created a FTP server: could-you use it to download my VOB file called "VTS_01_4.VOB". FTP site name: ftp://rmanal.ftpaccess.cc/ user name: tmp Password: tmp |
 |
| fccHandler |
| Posted: Aug 18 2007, 06:39 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I'm going to try, but Windows is estimating 5 hours to download. 
Doesn't the name "VTS_01_4" indicate that this is the 4th VOB of title set number 01? If so, then it isn't meant to be parsed independently, and it's probably broken at the beginning for that reason.
The Correct™ thing to do is to process the title set as a whole, by joining the separate VOBs into one giant VOB using the "copy /b" command, or better, just load them all into DGIndex. If you've never done that before, make sure you read the DGMPGDec instructions:
http://neuron2.net/dgmpgdec/QuickStart.html
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Aug 18 2007, 06:54 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
After re-reading all of your posts, I'm suddenly confused about your use of the word "gap," and now I wonder if you are simply talking about a delay in the audio stream. In fact, I expect there will be a delay when opening any VOB that is not the 1st VOB of a title set.
If that's all it is, then it's easily fixable. After loading the VOB, open the "File / File Information" dialog and look at the audio track "Skew" field. If it shows a nonzero value, then open the "Audio / Interleaving" dialog and enter that same value into the "Delay audio track by" field.
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Aug 19 2007, 06:55 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
I finally got your video, but it took two attempts.
I understand now why you have persisted about this for over a month. This appears to be homemade video of a wedding reception; there are probably priceless family memories recorded here. Let me just say, thank you for using VirtualDub-MPEG2 for its intended purpose.
(The owner of this forum knows I can become upset about people downloading/ripping Hollywood DVDs, and/or content they have no right to.) 
Anyway, the steps I described in my previous post don't work with your video. VirtualDub-MPEG2 reports an audio skew of -128 milliseconds, but my eyes and ears say it's significantly more than that. I think I got much better sync using values between -400 and -500.
BTW, there seems to be some inconsistency in the way the audio delay is presented during preview, which (I believe) is inherent in the underlying VirtualDub engine. I could only make my skew changes visible by setting the audio to "Direct Stream Copy," and pressing the "Output Playback" button. (The third button at the bottom.)
Just in case phaeron is listening, I'm referring solely to the real-time playback in VirtualDub's window. As far as I know, if you set a nonzero audio skew, it ALWAYS takes effect when saving the file; it's only the preview that is inconsistent.
I also saw a rare bug in the MPEG-2 decoder, when starting from a nonzero key frame, which causes blocks to appear briefly. It's not the first time I've seen it, but in the past it's always been difficult or impossible to reproduce. Tonight I saw it numerous times in your video; maybe I can finally track that bug down and kill it...
My native language is English, and I thought of a "gap" as a brief moment where the audio disappears, then reappears again. If there is such a moment in this video, please post the time where it happens.
Thank you for the video. I'll wait to hear from you.
-------------------- May the FOURCC be with you... |
 |
| rmanal |
| Posted: Aug 19 2007, 11:30 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 153
Member No.: 11636
Joined: 28-August 04

|
I hace effectively seen that my FTP server has gone down due to the break of my DSL connection. Sorry for that.
It is effectively my wedding that I arrange under Pinnacle Studio 10 under which I have discovered a delay, and not a gap - sorry but English is not my native language - between audio and video.
I have made two another VOB files (essai.vob and essai2.vob) by spiltting the original one by using chopperXP which deletes all the blocks before the first NAV block. You can also download them if you want, in particular the short one. And I you have said, the audio delay shown in the NAV block does not correspond to the delay that I'm seeing in VIRTUALDUB MPEG2. I don't really understand what you've said to BTW: what should I do to retrieve the correct audio-video delay? Why the MPEG2 decoder does not correct them automatically by using the information of the NAV block, instead of presenting that through the file information menu?
To finish with what you've said to phareon, I also see the same behavior. |
 |
| fccHandler |
| Posted: Aug 19 2007, 07:13 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (rmanal @ Aug 19 2007, 07:30 AM) | | I have made two another VOB files (essai.vob and essai2.vob) by spiltting the original one by using chopperXP which deletes all the blocks before the first NAV block. You can also download them if you want, in particular the short one. |
I will, because I don't know what a "NAV block" is. 
The skew reported in "File Information" is derived by subtracting the earliest video PTS from the earliest audio PTS. PTS are the "Presentation Time Stamp" fields found in all MPEG program streams, however, it's possible that DVDs don't use them and rely on "NAV blocks" instead to sync audio and video. I really don't know. I'll have to do some more research.
| QUOTE | | And I you have said, the audio delay shown in the NAV block does not correspond to the delay that I'm seeing in VIRTUALDUB MPEG2. |
What exactly is the "audio delay shown in the NAV block" and how did you get it? Does chopperxp show it?
| QUOTE | | I don't really understand what you've said to BTW: what should I do to retrieve the correct audio-video delay? |
I don't know yet; I didn't retrieve the correct audio delay, rather, I just used my eyes and ears to judge sync, while trying different skew values. -450 looks pretty close.
| QUOTE | | Why the MPEG2 decoder does not correct them automatically by using the information of the NAV block, instead of presenting that through the file information menu? |
Well, I don't have the DVD specification. The parser in VirtualDub-MPEG2 was written based on the MPEG-2 specification (ISO/IEC 13818), and I don't recall any "NAV blocks" described in those specs. I assume it's some metadata added for DVD players, which would have been described in the DVD spec. I'll see what I can find out.
-------------------- May the FOURCC be with you... |
 |
| phaeron |
| Posted: Aug 19 2007, 08:03 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
| QUOTE (fccHandler @ Aug 18 2007, 11:55 PM) | Just in case phaeron is listening, I'm referring solely to the real-time playback in VirtualDub's window. As far as I know, if you set a nonzero audio skew, it ALWAYS takes effect when saving the file; it's only the preview that is inconsistent. | This shouldn't be the case -- it's exactly the same mechanism. Are we talking about the displacement value in Audio > Interleaving? |
 |
| fccHandler |
| Posted: Aug 19 2007, 10:48 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (phaeron @ Aug 19 2007, 04:03 PM) | | Are we talking about the displacement value in Audio > Interleaving? | Yes. And whether a nonzero skew is visible during preview seems to depend on several settings, like whether I push "Input Playback" or "Output Playback," and whether audio is set for "Direct Stream Copy" or "Full Processing." It may also depend on whether the skew is positive or negative; I can't recall offhand.
Obviously you won't be able to reproduce it with these VOBs, so I'll try to make you a repro case later, so you can see what we're seeing.
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Aug 20 2007, 03:02 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Well, I was afraid of something like this. I did reproduce the behavior in the official VirtualDub 1.6.19 and the experimental 1.7.2, but only when the AVI has AC-3 audio. It doesn't happen with PCM or MP3 audio.
One major difference in the three formats is the nBlockAlign field, which in my tests was 4 for PCM, 1 for MP3, and 768 for AC-3 (the size of one AC-3 frame, in this particular source file).
I think we've argued before over whether that is the "correct" value to go in the nBlockAlign field, so I won't rehash that. But it's the value I've always used, and as far as I know VirtualDub is the only program that has a problem with it, and only in this one specific case (previewing with a nonzero skew).
If you're still interested in a repro case I can post mine, but you will have to install AC3ACM to preview it. (That leaves you an out though, since you can always blame me.) 
Anyway, it's not a problem that comes up often, so I'll understand if you're not interested.
-------------------- May the FOURCC be with you... |
 |
| phaeron |
| Posted: Aug 20 2007, 08:59 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
It shouldn't be a problem in this case unless there is a difference in decoder handling between AC3ACM and the installed DirectShow decoder. When nBlockAlign is a fib and doesn't reflect the true size of the compressed blocks, then the most likely cause is runts appearing in the bitstream. The most reliable way to handle this is for the codec to estimate how much time the runt corresponds to and pad according to that amount, but if the decoder instead absorbs the bad packets for zero time then the result is a desync. You can get these in both directions when using the skew field. Pushing the audio stream forward results in the first audio block being duplicated, and pushing it backward drops blocks at the beginning. For a stream with self-contained blocks, like ADPCM, this works fine; for dependent blocks, it's up to the codec to handle the results.
If you have a sample I can look at, I'd be happy to look at it. I doubt this problem is AC3 specific if the problem is on my end, as there is very little format-specific code in VirtualDub. |
 |