PDA

View Full Version : Gordian Knot 0.28.8: Audio / Video Mux Sync problem


arno
27th April 2004, 17:28
(I previously posted a bug report on sourceforge but decided to post it here aswell).
Every once in a while when I encode a movie with GK the
final output avi file has (ABR) audio that isn't synchronized
to the video. I did some research and it turned out
that when I manually load this AVI-file in
VirtualDubMod and disable the AVI's audio and import
the *.mp3 file, which BeSweet/GK previously created
during DVD encoding, it works fine again.

Ok, the odd thing is that it doesn't seem persistent with older versions but with the latest version it DOES seem persistent however. I also find it strange that other people didn't complain about this. My research also found that the job file used to mux audio & video
has this entry:

VirtualDub.stream[0].SetInterleave(1,500,1,0,0);

It seems like an interleave value of 500ms is set,
where does this come from? I know for sure that the
value on the GK Audio Tab said "0 ms". It really seems
to me that something is screwed up here. Note that I've
been experiencing this problem for a while now (I don't
exactly know how long), meaning that older versions
also suffer from this issue.

I hope someone can have a closer look at this. If you
need any additional info, let me know.

redpaul
28th April 2004, 06:43
Hi. I have the same problem but I don't think it's up to the string you're talking about. It seems that the first time I had this problem was after the installing of AutoGK in the same pc. But I do not understand who it can interfere (and it works fine!). Nothing else changed or was installed.
BTW your work around is fine. For me also, remuxing audio solves the problem.
Anyone can explain the reasons of this unpredictable behaviour?

Thanks in advance.

RedPaul

len0x
28th April 2004, 12:05
AutoGK and GK use different versions of VDubMod. May be there is a clash in registry settings?..

redpaul
28th April 2004, 14:43
I thought to also, len0x. So I uninstalled both of them and re-installed GK only. The problem is still present.

If there are some test I can perform I'm glad to tell the results.

Thanks.

len0x
28th April 2004, 15:04
see my reply in the other thread - its a bit irritating that ppl still don't read it properly.

arno
9th May 2004, 15:27
I just encoded another one of my DVD's (Titanic) today with the re-downloaded (re-released) GK 0.28.8. But the audio/video sync problem is still there. This is the additional information I can provide (I hope it helps):
- XviD 1.0RC4 for video
- 128kbit VBR-MP3 for audio
- Credits are cut off (I don't know whether this matters)

After manually loading the faulty avi-file in virtualdubmod and adding (muxing) the mp3-track myself to the avi, the problem is solved. I really hope this issue can be solved soon.

I also did some research on the Sylia script generated by GK for muxing a/v and the one generated when I setup the job. This is what I found

Script generated by my manual muxing:

VirtualDub.Open("H:\\MultiMedia\\titanic\\titanic_Movie.avi","",0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("H:\\MultiMedia\\titanic\\titanic AC3 T01 3_2ch 384Kbps DELAY 0ms.mp3",0x00000202,1);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,0);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(0,270051);
VirtualDub.SaveAVI("H:\\MultiMedia\\titanic\\test2.avi");
VirtualDub.Close();


The script generated by GK:

VirtualDub.Open("H:\\MultiMedia\\titanic\\titanic_Movie.avi",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("H:\\MultiMedia\\titanic\\titanic AC3 T01 3_2ch 384Kbps DELAY 0ms.mp3",0x00000202,0);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,0);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression();


It seems that problem is caused (after some additional testing & hacking) by this difference in this line:

VirtualDub.stream[0].SetSource("H:\\MultiMedia\\titanic\\titanic AC3 T01 3_2ch 384Kbps DELAY 0ms.mp3",0x00000202,0);

vs.

VirtualDub.stream[0].SetSource("H:\\MultiMedia\\titanic\\titanic AC3 T01 3_2ch 384Kbps DELAY 0ms.mp3",0x00000202,1);

Note the 0-argument in the first line at the end, and the 1-argument in the 2nd one at the end. I don't know what option this triggers within VDM but I guess it has to do with VBR or CBR MP3 select.

I hope it helps in solving this (stupid) issue.

Let me know when you need additional information or testing... Tnx

len0x
9th May 2004, 18:00
this cannot be happening. as I described in another thread GK checks header of mp3 file and if VBR record is missing (like in your case) then its considered CBR. nothing wrong with GK here. wrong version of besweet didn't produce right header. Correct version of BeSweet has timestamp "15/04/04 16:26". please make sure that you are using that version.

arno
10th May 2004, 08:22
Originally posted by len0x
this cannot be happening. as I described in another thread GK checks header of mp3 file and if VBR record is missing (like in your case) then its considered CBR. nothing wrong with GK here. wrong version of besweet didn't produce right header. Correct version of BeSweet has timestamp "15/04/04 16:26". please make sure that you are using that version.

I am using this version. I also tried using the new b27 version which also does NOT fix the problem. Also note that the CBR/VBR detection routine in VirtualDubMod doesn't have any problem identifieing the file properly as VBR-file (or as CBR-file, when CBR is used). I still believe the detection routine in GK is broken (for a while now, as older version also suffer from this issue). Maybe you could have a closer look at VirtualDubMod's CBR/VBR detection routine? Tnx!

len0x
10th May 2004, 12:05
Originally posted by arno
I am using this version. I also tried using the new b27 version which also does NOT fix the problem.

You're the only one having this issue. I need more than that...
May be its just that one source that you're testing it on have this issue.

P.S. try AutoGK on that source just to check all the tools...

arno
10th May 2004, 15:19
Originally posted by len0x
You're the only one having this issue. I need more than that...
May be its just that one source that you're testing it on have this issue.

P.S. try AutoGK on that source just to check all the tools...

I will test AutoGK, I will let you know the results ASAP.

But please note that I don't understand why VirtualDubMod would correctly identify the file as VBR, while GK doesn't (?). I already did some other investigation and what seems to solve the problem is always using this sylia script entry for both VBR AND CBR MP3 sound (instead of using different (0/1) value's for the last argument):

VirtualDub.stream[0].SetSource("cbr_or_vbr_file.mp3",0x00000202,1);


It seems that VirtualDubMod will automatically detect that in the case of a CBR-MP3 file, it should treat the file as CBR. Could you consider changing this behaviour in GK then? (I've tested it thoroughly and seems to be a 100% fix for my problem).

len0x
10th May 2004, 18:17
About VBR detection - the library i'm using checks for the word XING in the header, that's it. VDubMod is probably doing actual parsing...

"1" in that parameter just mean to have Nandub (which is able to deal with CBR as well) compatibility mode on. Good to know its always works.

arno
10th May 2004, 19:58
Originally posted by len0x
About VBR detection - the library i'm using checks for the word XING in the header, that's it. VDubMod is probably doing actual parsing...

"1" in that parameter just mean to have Nandub (which is able to deal with CBR as well) compatibility mode on. Good to know its always works.

Yes, but please note that VBR-MP3 files are NOT required to have a XING MP3 header (check the commandline options of LAME), thus this method is NOT reliable. The XING header is only an additional block of information which tells what the average bitrate of the file is (and some other info). As far as I can tell (and please verify it yourself), BeSweet does NOT add a XING header to the MP3 file it creates, and this is probably also what's causing the problem. I verified it with several of my VBR-MP3's (music), which all have the word "Xing" at file position 0x24, and the ones created by BeSweet, do NOT.

diesel2000nl
10th May 2004, 21:47
It's real problem with the New version of GordianKnot 0.28.8, not only the audio, that is not sychroon with video, but also the videostream be damaged when the final mux with audio, you get again the "freeze frame" sometimes, i have just check the movie(before mux),
its fine, the problem comes after mux.......

I hope the GordianKnot team can and will solve this potential problems, before that i must contineau to use 0.28.7, its working fine.......................................................

arno
10th May 2004, 21:48
I redownloaded Gordian Knot 0.28.8 & downloaded AutoGK (latest beta). AutoGK runs fine here (as expected), so the problem is really inside GordianKnot itself (as I stated in my previous post).

DSPguru
10th May 2004, 22:14
Originally posted by arno
As far as I can tell (and please verify it yourself), BeSweet does NOT add a XING header to the MP3 file it createsi verified. it does.

len0x
10th May 2004, 22:16
Originally posted by arno
As far as I can tell (and please verify it yourself), BeSweet does NOT add a XING header to the MP3 file it creates, and this is probably also what's causing the problem. I verified it with several of my VBR-MP3's (music), which all have the word "Xing" at file position 0x24, and the ones created by BeSweet, do NOT.

if that was correct - everybody had that problem. I verified myself that all files from besweet I have - DO HAVE Xing header (and in fact always had). Seem that you're doing very strange encodings with BeSweet. Please post you besweet command line.

p.s. I seem very reluctant to change anything in current GK as it does not have major flaws and I don't have enough time to look after it.

len0x
10th May 2004, 22:20
Originally posted by DSPguru
i verified. it does.

you beat me to it :)

diesel2000nl
13th May 2004, 21:32
Arno,

I don't think you are just the only one persoon that has problem with the new release of Gordian Knot(0.28.8), all my friend have same problems, we have decided to using previous version of GordianKnot, i am using now version 0.28.7 again, and, you know the resultaat, always good. I can now contineu encoding high quality divx again with 0.28.7, and i can wait for next stable release of Gordian Knot.....
You see, always backup the software that good works.........


Greetings,

Diesel2000nl

MrNike
22nd May 2004, 12:45
Hi there ... i got the same problem here ... audio is out of sync the full length. With the .7 version everythings is fine. XVid 1.0 final, 128 kBit abr mp3.

Greetings,

MrNike