Log in

View Full Version : Trying to load a lot of MPEG2 in FFMS2


Morku
26th September 2012, 16:24
Hi, I have a problem. We have a camcorder which records MPEG2 (Canon Legria FS306). Now I want the movie of our vacation convert with MeGUI. To load my clips I use FFmpegSource2. My project has 103 clips which is to much for FFMS2, because the RAM usage gets higher than 2GB -> it crashes with errors like: "FFVideoSource: Can't open file" or "FFAudioSource: Can't open file"
I can load with VirtualDub 64bit, but MeGUI is 32bit.
This is my script:

global MeGUI_darx = 16
global MeGUI_dary = 9

SetMemoryMax(768)

SetMTMode(5, 2)

clip01 = FFmpegSource2("20100808_192954.MPG", atrack=-1, threads=1).AssumeTFF()
clip02 = FFmpegSource2("20100808_193030.MPG", atrack=-1, threads=1).AssumeTFF()
clip03 = FFmpegSource2("20100808_200352.MPG", atrack=-1, threads=1).AssumeTFF()
clip04 = FFmpegSource2("20100809_141850.MPG", atrack=-1, threads=1).AssumeTFF()
clip05 = FFmpegSource2("20100809_141926.MPG", atrack=-1, threads=1).AssumeTFF()
clip06 = FFmpegSource2("20100809_142012.MPG", atrack=-1, threads=1).AssumeTFF()
clip07 = FFmpegSource2("20100809_142226.MPG", atrack=-1, threads=1).AssumeTFF()
clip08 = FFmpegSource2("20100810_114454.MPG", atrack=-1, threads=1).AssumeTFF()
clip09 = FFmpegSource2("20100810_150240.MPG", atrack=-1, threads=1).AssumeTFF()
clip10 = FFmpegSource2("20100810_150516.MPG", atrack=-1, threads=1).AssumeTFF()
clip11 = FFmpegSource2("20100811_092816.MPG", atrack=-1, threads=1).AssumeTFF()
clip12 = FFmpegSource2("20100811_120208.MPG", atrack=-1, threads=1).AssumeTFF()
clip13 = FFmpegSource2("20100811_120348.MPG", atrack=-1, threads=1).AssumeTFF()
clip14 = FFmpegSource2("20100811_120754.MPG", atrack=-1, threads=1).AssumeTFF()
clip15 = FFmpegSource2("20100811_122450.MPG", atrack=-1, threads=1).AssumeTFF()
clip16 = FFmpegSource2("20100811_122502.MPG", atrack=-1, threads=1).AssumeTFF()
clip17 = FFmpegSource2("20100811_125038.MPG", atrack=-1, threads=1).AssumeTFF()
clip18 = FFmpegSource2("20100811_125234.MPG", atrack=-1, threads=1).AssumeTFF()
clip19 = FFmpegSource2("20100812_145554.MPG", atrack=-1, threads=1).AssumeTFF()
clip20 = FFmpegSource2("20100812_145812.MPG", atrack=-1, threads=1).AssumeTFF()
clip21 = FFmpegSource2("20100812_152532.MPG", atrack=-1, threads=1).AssumeTFF()
clip22 = FFmpegSource2("20100812_152556.MPG", atrack=-1, threads=1).AssumeTFF()
clip23 = FFmpegSource2("20100812_152636.MPG", atrack=-1, threads=1).AssumeTFF()
clip24 = FFmpegSource2("20100812_152824.MPG", atrack=-1, threads=1).AssumeTFF()
clip25 = FFmpegSource2("20100812_152918.MPG", atrack=-1, threads=1).AssumeTFF()
clip26 = FFmpegSource2("20100812_152944.MPG", atrack=-1, threads=1).AssumeTFF()
clip27 = FFmpegSource2("20100812_153112.MPG", atrack=-1, threads=1).AssumeTFF()
clip28 = FFmpegSource2("20100813_143532.MPG", atrack=-1, threads=1).AssumeTFF()
clip29 = FFmpegSource2("20100813_144742.MPG", atrack=-1, threads=1).AssumeTFF()
clip30 = FFmpegSource2("20100813_164130.MPG", atrack=-1, threads=1).AssumeTFF()
clip31 = FFmpegSource2("20100813_164610.MPG", atrack=-1, threads=1).AssumeTFF()
clip32 = FFmpegSource2("20100813_164650.MPG", atrack=-1, threads=1).AssumeTFF()
clip33 = FFmpegSource2("20100813_164754.MPG", atrack=-1, threads=1).AssumeTFF()
clip34 = FFmpegSource2("20100813_165150.MPG", atrack=-1, threads=1).AssumeTFF()
clip35 = FFmpegSource2("20100814_094516.MPG", atrack=-1, threads=1).AssumeTFF()
clip36 = FFmpegSource2("20100815_121938.MPG", atrack=-1, threads=1).AssumeTFF()
clip37 = FFmpegSource2("20100815_164708.MPG", atrack=-1, threads=1).AssumeTFF()
clip38 = FFmpegSource2("20100816_123356.MPG", atrack=-1, threads=1).AssumeTFF()
clip39 = FFmpegSource2("20100816_123432.MPG", atrack=-1, threads=1).AssumeTFF()
clip40 = FFmpegSource2("20100816_123700.MPG", atrack=-1, threads=1).AssumeTFF()
clip41 = FFmpegSource2("20100816_123810.MPG", atrack=-1, threads=1).AssumeTFF()
clip42 = FFmpegSource2("20100816_123928.MPG", atrack=-1, threads=1).AssumeTFF()
clip43 = FFmpegSource2("20100816_124026.MPG", atrack=-1, threads=1).AssumeTFF()
clip44 = FFmpegSource2("20100816_124622.MPG", atrack=-1, threads=1).AssumeTFF()
clip45 = FFmpegSource2("20100816_124632.MPG", atrack=-1, threads=1).AssumeTFF()
clip46 = FFmpegSource2("20100816_124658.MPG", atrack=-1, threads=1).AssumeTFF()
clip47 = FFmpegSource2("20100816_130156.MPG", atrack=-1, threads=1).AssumeTFF()
clip48 = FFmpegSource2("20100816_131026.MPG", atrack=-1, threads=1).AssumeTFF()
clip49 = FFmpegSource2("20100816_131504.MPG", atrack=-1, threads=1).AssumeTFF()
clip50 = FFmpegSource2("20100816_131710.MPG", atrack=-1, threads=1).AssumeTFF()
clip51 = FFmpegSource2("20100816_131944.MPG", atrack=-1, threads=1).AssumeTFF()
clip52 = FFmpegSource2("20100816_132156.MPG", atrack=-1, threads=1).AssumeTFF()
clip53 = FFmpegSource2("20100816_132532.MPG", atrack=-1, threads=1).AssumeTFF()
clip54 = FFmpegSource2("20100816_132704.MPG", atrack=-1, threads=1).AssumeTFF()
clip55 = FFmpegSource2("20100816_133016.MPG", atrack=-1, threads=1).AssumeTFF()
clip56 = FFmpegSource2("20100816_133132.MPG", atrack=-1, threads=1).AssumeTFF()
clip57 = FFmpegSource2("20100816_133522.MPG", atrack=-1, threads=1).AssumeTFF()
clip58 = FFmpegSource2("20100816_160840.MPG", atrack=-1, threads=1).AssumeTFF()
clip59 = FFmpegSource2("20100816_163246.MPG", atrack=-1, threads=1).AssumeTFF()
clip60 = FFmpegSource2("20100817_125616.MPG", atrack=-1, threads=1).AssumeTFF()
clip61 = FFmpegSource2("20100818_130054.MPG", atrack=-1, threads=1).AssumeTFF()
clip62 = FFmpegSource2("20100818_140948.MPG", atrack=-1, threads=1).AssumeTFF()
clip63 = FFmpegSource2("20100818_143254.MPG", atrack=-1, threads=1).AssumeTFF()
clip64 = FFmpegSource2("20100818_143740.MPG", atrack=-1, threads=1).AssumeTFF()
clip65 = FFmpegSource2("20100818_144650.MPG", atrack=-1, threads=1).AssumeTFF()
clip66 = FFmpegSource2("20100818_144744.MPG", atrack=-1, threads=1).AssumeTFF()
clip67 = FFmpegSource2("20100818_145128.MPG", atrack=-1, threads=1).AssumeTFF()
clip68 = FFmpegSource2("20100818_145144.MPG", atrack=-1, threads=1).AssumeTFF()
clip69 = FFmpegSource2("20100818_145608.MPG", atrack=-1, threads=1).AssumeTFF()
clip70 = FFmpegSource2("20100818_145736.MPG", atrack=-1, threads=1).AssumeTFF()
clip71 = FFmpegSource2("20100818_145920.MPG", atrack=-1, threads=1).AssumeTFF()
clip72 = FFmpegSource2("20100818_150050.MPG", atrack=-1, threads=1).AssumeTFF()
clip73 = FFmpegSource2("20100818_150142.MPG", atrack=-1, threads=1).AssumeTFF()
clip74 = FFmpegSource2("20100818_150302.MPG", atrack=-1, threads=1).AssumeTFF()
clip75 = FFmpegSource2("20100818_150358.MPG", atrack=-1, threads=1).AssumeTFF()
clip76 = FFmpegSource2("20100819_093232.MPG", atrack=-1, threads=1).AssumeTFF()
clip77 = FFmpegSource2("20100819_123536.MPG", atrack=-1, threads=1).AssumeTFF()
clip78 = FFmpegSource2("20100819_123742.MPG", atrack=-1, threads=1).AssumeTFF()
clip79 = FFmpegSource2("20100819_134318.MPG", atrack=-1, threads=1).AssumeTFF()
clip80 = FFmpegSource2("20100819_135400.MPG", atrack=-1, threads=1).AssumeTFF()
clip81 = FFmpegSource2("20100819_143600.MPG", atrack=-1, threads=1).AssumeTFF()
clip82 = FFmpegSource2("20100819_144006.MPG", atrack=-1, threads=1).AssumeTFF()
clip83 = FFmpegSource2("20100819_144044.MPG", atrack=-1, threads=1).AssumeTFF()
clip84 = FFmpegSource2("20100819_150020.MPG", atrack=-1, threads=1).AssumeTFF()
clip85 = FFmpegSource2("20100819_150116.MPG", atrack=-1, threads=1).AssumeTFF()
clip86 = FFmpegSource2("20100819_150232.MPG", atrack=-1, threads=1).AssumeTFF()
clip87 = FFmpegSource2("20100819_150428.MPG", atrack=-1, threads=1).AssumeTFF()
clip88 = FFmpegSource2("20100819_152432.MPG", atrack=-1, threads=1).AssumeTFF()
clip89 = FFmpegSource2("20100819_152646.MPG", atrack=-1, threads=1).AssumeTFF()
clip90 = FFmpegSource2("20100819_152924.MPG", atrack=-1, threads=1).AssumeTFF()
clip91 = FFmpegSource2("20100819_153326.MPG", atrack=-1, threads=1).AssumeTFF()
clip92 = FFmpegSource2("20100819_153450.MPG", atrack=-1, threads=1).AssumeTFF()
clip93 = FFmpegSource2("20100819_153616.MPG", atrack=-1, threads=1).AssumeTFF()
clip94 = FFmpegSource2("20100819_153912.MPG", atrack=-1, threads=1).AssumeTFF()
clip95 = FFmpegSource2("20100819_154034.MPG", atrack=-1, threads=1).AssumeTFF()
clip96 = FFmpegSource2("20100819_161322.MPG", atrack=-1, threads=1).AssumeTFF()
clip97 = FFmpegSource2("20100819_162028.MPG", atrack=-1, threads=1).AssumeTFF()
clip98 = FFmpegSource2("20100819_162042.MPG", atrack=-1, threads=1).AssumeTFF()
clip99 = FFmpegSource2("20100819_162054.MPG", atrack=-1, threads=1).AssumeTFF()
clip100 = FFmpegSource2("20100819_162108.MPG", atrack=-1, threads=1).AssumeTFF()
clip101 = FFmpegSource2("20100819_162122.MPG", atrack=-1, threads=1).AssumeTFF()
clip102 = FFmpegSource2("20100819_162134.MPG", atrack=-1, threads=1).AssumeTFF()
clip103 = FFmpegSource2("20100821_135706.MPG", atrack=-1, threads=1).AssumeTFF()

SetMTMode(2)

AlignedSplice(clip01, clip02, clip03, clip04, clip05, clip06, clip07, clip08, clip09, clip10, clip11, clip12, clip13, clip14, clip15, clip16, clip17, clip18, clip19, clip20, clip21, clip22, clip23, clip24, clip25, clip26, clip27, clip28, clip29, clip30, clip31, clip32, clip33, clip34, clip35, clip36, clip37, clip38, clip39, clip40, clip41, clip42, clip43, clip44, clip45, clip46, clip47, clip48, clip49, clip50, clip51, clip52, clip53, clip54, clip55, clip56, clip57, clip58, clip59, clip60, clip61, clip62, clip63, clip64, clip65, clip66, clip67, clip68, clip69, clip70, clip71, clip72, clip73, clip74, clip75, clip76, clip77, clip78, clip79, clip80, clip81, clip82, clip83, clip84, clip85, clip86, clip87, clip88, clip89, clip90, clip91, clip92, clip93, clip94, clip95, clip96, clip97, clip98, clip99, clip100, clip101, clip102, clip103)

tempgaussmc_beta2(edimode="nnedi3")

I also tried DGIndex, but with that tool image and sound get out of sync (like using UnalignedSplice instead of AlignedSplice).
What can I do?
If you need an example of videofiles I use download here: https://rapidshare.com/files/1903760703/MPEG2.zip

Sorry for my english and other mistakes.

Guest
26th September 2012, 17:25
DGDecNV will work as your audio is AC3. When it demuxs the audio, it will adjust the audio gaps between files. DGMPGDec does not have that capability.

Another option is to just concatenate them with DOS COPY /B so you have a single file. Then demux audio with EAC3TO, which also adjusts the gaps. You can load that combined file with FFMS2 but I don't know what it will do with the audio.

Morku
27th September 2012, 01:07
I tried DGDecNV to load my videos but get the error: Invalid License!
I also tried to merge with mkvmerge, but I get the error "--append-to is invalid"

Guest
27th September 2012, 01:08
I tried DGDecNV to load my videos but get the error: Invalid License! It requires a $15 license. Did you buy one?

Blue_MiSfit
27th September 2012, 07:52
This is what AviSynth is not so good at ;)

I'd suggest concatenating your clips with another tool - even copy /b as neuron2 has suggested.

sneaker_ger
27th September 2012, 14:09
I also tried to merge with mkvmerge, but I get the error "--append-to is invalid"

What did you try exactly? Via the GUI or via CLI? Note that (1) "--append-to" is not always required, (2) the command-line on Windows has a limited length, that's why mkvmerge knows option files (http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge.html#mkvmerge.option_files)

Morku
30th September 2012, 11:24
I bought a license for DGDecNV to try, but image and sound still get out of synchronation. The image is faster than the sound. What I have to do?

Guest
30th September 2012, 13:29
Upload three of the files that are to be merged to a hosting site and post the links here. That's the only way I can help you with this.

Also, tell the exact steps you used for the entire process with DGIndexNV. Describe how you handled the audio, how you muxed things at the end, everything.

Morku
30th September 2012, 16:31
I already posted 2 examples in the first post, but here you have 3 more, longer examples:
https://rapidshare.com/files/1616123473/3%20MPEG.zip
The files are from a Canon Legria FS306 Camcorder.
I open DGIndexNV.exe the 64bit version. File -> Open -> I select all the files I want have for one final video. I click OK.
File -> Save Project. I get a dgi and an ac3 file, which seems to be not synchron. To test it, I load the video in virtualDub, convert the ac3 to wav and load the wav. The longer the video (and I guess the more files) the more asynchronous gets the project.
I also have the same problem with a DVD camcorder (Canon DC100), but there I have VOB files instead the files seperatly, but first I want solve the other problem.

Guest
30th September 2012, 16:54
Give me the Avisynth script that you load into VirtualDub please.

I asked for everything, please try to do that so I don't have to keep asking for things.

Also, please use mediafire.com and not rapidshare next time. Thank you.

Morku
30th September 2012, 17:23
LoadPlugin("DGDecodeNV.dll")
DGSource("20110910_154532.dgi",fieldop=0)
I converted the ac3 to wav with LameXP and loaded in VirtualDub with 'Source audio'
I want load the Avisynth Script in MeGUI. I thought the problem is already in file and you wanted to know how I use DGIndexNV, so for me it was 'everything'. No reason to criticize me.

Guest
30th September 2012, 17:28
I didn't criticize you. I politely asked you for things.

Look, I'm taking my precious time to help you. If you start copping an attitude, I'm going to lose interest.

Morku
30th September 2012, 18:03
I just misunderstood a bit. My english isn't very well. Yes, you asked for everything. I also was in hurry. I am sorry, okay?
I hope I gave you all informations.

Guest
30th September 2012, 18:38
No problem, Morku, we're going to get this fixed for you. I can work on it only this evening, then I will report.

Guest
1st October 2012, 03:38
OK, we need to add this gap adjustment for program streams. Previously it was done only for transport streams.

Here is a first attempt. Please test it with a bunch of files loaded and report back. It correctly deleted 2 AC3 frames when used on your set of three files.

http://neuron2.net/misc/DGIndexNV_morku.zip (http://neuron2.net/dgdecnv/DGIndexNV_morku.zip)

Morku
1st October 2012, 11:42
Okay I tried this version, loaded 63 files and used the same steps like above and it is working fine :) I can't see any delay anymore. Thank you very much!
But now I still have a problem like of the MPEG2 files. We had a DVD camcorder, the Canon DC100, and I also want to convert the videos to files.
This is whats the dvd folder says:
http://img6.imagebanana.com/img/s0xotx2i/thumb/Unbenannt.png (http://www.imagebanana.com/view/s0xotx2i/Unbenannt.png)
This is whats the DVD itself says:
http://img6.imagebanana.com/img/a1nxgcu6/thumb/dvd_snapshot_00.00_2012.10.01_12.37..jpg (http://www.imagebanana.com/view/a1nxgcu6/dvd_snapshot_00.00_2012.10.01_12.37..jpg)
There are 6x14 videoclips on this DVD (everytime when the filmer pressed the button)
Here are my steps:
I used the DGIndexNV_morku version, loaded the VTS_01_1.VOB, VTS_01_2.VOB and VTS_02_1.VOB, Saves project.
Loaded into VirtualDub again with:
LoadPlugin("DGDecodeNV.dll")
DGSource("VTS_01_1.dgi",fieldop=0)
and loaded the converted ac3 into VirtualDub.
In this case the sounds seems to be faster than the image. Any idea?

Guest
1st October 2012, 13:03
You have to give me stream samples that I can use to recreate the problem.

Also, does the desync get larger as it plays, or is it a fixed desync throughout?

Morku
1st October 2012, 13:37
Damn, I knew it >.< My upload is so slow :( About 10KB/s, so it would take to much time to upload the full 1,3GB.
I am uploading now VIDEO_TS.BUP, VIDEO_TS.IFO, VIDEO_TS.VOB, VIDEO_TS.BUP, VTS_02_0.BUP, VTS_02_0.IFO, VTS_02_0.VOB. I hope this will be enough. This file is 83MB big. In this sample there is not much delay noticable (especially when you don't see someone talking), but maybe you will notice the problem.
I my sample of the full DVD Winamp says, the WAV has a lenght of 24:20
VirtualDub says the video has a lenght of 24:23:040
I will send you the link via PM, because I don't want share to many private videos public on internet. Still uploading...

Guest
1st October 2012, 13:58
You did not answer this important question:

"Also, does the desync get larger as it plays, or is it a fixed desync throughout?"

I need only the VOB files. Nothing else is of any use.

Morku
1st October 2012, 14:08
Sorry, I don't understand this question.
The real DVD has a playback time of 23:02+1:18 (the controller starts from beginning after 23:02)=24:20.
I gave you the link via PM.

Guest
1st October 2012, 14:24
First, before anything else, try the release version of 2043 and not the special version I gave you. The special version is not fully developed yet and was intended for testing only.

Now regarding desyc, suppose the audio is early by 1 second. As you continue watching does it get to be 2 seconds and then 3 seconds earlier etc.? Does the problem get worse as it goes on, or does it stay fixed? And if it is fixed how far off is the audio?

I don't know what you mean by "the controller starts from beginning".

Your VOB has an initial delay of -40ms. You'll need to adjust for that in your script. Anyway, you have to give me the first VOB! Yes I know it is big, so cut the front with DGSplit.

I suppose one of these could be going on:

1. There is an initial delay (given in the demuxed AC3 filename) and you are not adjusting for that.

2. You have some black video at the start with no audio. That seems unlikely from a camcorder, though.

For either of these I need to see the start of the *first* VOB.

Finally, giving me files that don't show your problem just wastes our time. You have to give me files and your process such that I can duplicate your problem. And giving me video of a garden is useless. Give me video of someone talking!

Morku
1st October 2012, 15:12
It's not my fault that VTS_02_1.VOB just show a garden, but it was the smalest file I was able to find on this DVD. It's also not my fault, that we have so shitty internet. In my region we don't get more. I thought you will see in your tool, that video and audio don't stop correctly at the same time, so don't think I want waste your time. But okay, I will upload the VTS_01_1.VOB. Maybe I am done tomorrow or in 2 days.
With controller I mean this. After 23:02 it jumps at the beginning:
http://img6.imagebanana.com/img/mmb1xjuq/Unbenannt2.png
But thats not important now.

The video gets more delay as longer the VOB is. The start looks correctly and more at the end there is a delay about 0,5 seconds. So I think it happens slightly after every clip on this dvd. In the bigger file you will see it very clear.
I will split and compress the file with 7zip now. You will get a PM again and sorry for wasting your time...

EDIT: I wrote my message, before you edit yours.
I tested now the official 2043 Build and loaded the files with that Script:
LoadPlugin("DGDecodeNV.dll")
vid = DGSource("VTS_01_1.dgi",fieldop=0)
aud = NicAC3Source("VTS_01_1 T80 2_0ch 48KHz 256Kbps DELAY -40ms.ac3")
AudioDub(vid, aud)
DelayAudio(-0.40)
But it's not fixing the problem. In maybe 5 hours the file is uploaded.

Guest
1st October 2012, 15:47
OK, it appears to be a growing desync, so you can cancel your upload as it won't help us. I'll offer you this: I will need all the VOBs to analyze this, and as you can't upload them all, you can mail them to me on a physical DVD. If you are willing to do that then I will continue. Failing that I do not have the information I need to help you. If you want to do that, send me a PM and I'll give you my address.

Technical point: DVD VOBs are binary splits and the AC3 stream continues without a gap from one VOB to the next. So the gap adjustment should not be necessary between the VOB files. But if the AC3 stream is stopped and starts again within the same VOB chain (maybe from stopping and starting the camcorder), then that would need to be adjusted. This makes things tricky for doing the adjustment for program streams and that is why I need all the VOBs to even have a hope of developing proper handling for this situation.

Guest
2nd October 2012, 15:14
I'm looking at the VOBs you have sent me links to in PM.

Already in the first VOB it's going out of sync, so it has nothing to do with making adjustments at file seams, as we did for the MPGs you first posted about.

Looking at the timestamps in the first VOB I see SCR resetting to 0 frequently but not regularly. I wonder if you are hitting pause or stopping recording throughout the VOB or whether it was shot straight through without pausing or stopping. If it happens that every time you pause or stop we need a gap adjustment then this is going to be a lot more challenging to fix. This is not something you ever see with the kinds of streams DGDecNV was designed and intended for. Here is an example of the SCR reset:

SCR 271562746 [10057 ms]
SCR 271606632 [10059 ms]
SCR 271650518 [10061 ms]
A42 PTS 909813 [10109 ms]
SCR 271694404 [10062 ms]
SCR 271738290 [10064 ms]
SCR 271782176 [10066 ms]
SCR 271826062 [10067 ms]
SCR 272159700 [10079 ms]
SCR 272203586 [10081 ms]
SCR 272247472 [10083 ms]
SCR 272291358 [10084 ms]
SCR 272335244 [10086 ms]
SCR 272379130 [10088 ms]
SCR 272423016 [10089 ms]
SCR 0 [0 ms]
SCR 43886 [1 ms]
SCR 87772 [3 ms]
V PTS 27813 [309 ms]
V DTS 17013 [189 ms]
[GOP started]
SCR 131658 [4 ms]
SCR 175544 [6 ms]
SCR 219430 [8 ms]
SCR 263316 [9 ms]
SCR 307202 [11 ms]
SCR 351088 [13 ms]
SCR 394974 [14 ms]

Please advise whether you are stopping/pausing during the first VOB.

Morku
2nd October 2012, 18:38
In the VOB are many clips (and the other 2 VOBs, too). Everytime you push the record button and push again to stop it, is one clip in the DVD menu, as you can see on the screenshot on the previous page. So there are ~6x14 clips (he pressed 168x this button. I was not the filmer). After you stop a clip, the DVD in the camcorder is not in use, of course.
When the DVD is full, you have to finalize the dvd, or the DVD wont play on the DVD Recorder or PC. This takes about 5 minutes. Maybe at this moment, the DVD gets the information whats in the single VOB and his data-system. If you finalise a DVD before it's full, you can't record on the DVD anymore.
After every single clip, there is a break in realtime.
Playing on Windows Media Player doesn't make any problems.

Guest
2nd October 2012, 22:55
That's what I figured. Thanks for clarifying it. I maybe able to invoke a gap adjustment when I see SCR jump back to zero. Let me experiment with it.

Guest
3rd October 2012, 08:00
There is no rhyme or reason to the SCR resets and the audio/video differences for the segments delimited by them are sometimes positive and sometimes negative. Overall, they add up to about 1.5 seconds more of video than audio for the entire first VOB. That leaves me no way to do any automatic gap adjustment.

Here is a hacky way that at least makes the clip usable:

dgsource("VTS_01_1.dgi",deinterlace=1)
vid=changefps(29.9316).assumefps(30000,1001)
aud=nicac3source("VTS_01_1 T80 2_0ch 48KHz 256Kbps DELAY -40ms.ac3")
audiodub(vid,aud)

The idea is to uniformly delete enough video frames to make the audio and video durations the same. The sync looks much better though far from perfect. I would guess this will work only if the recorder pauses are evenly distributed in a VOB.

Applying this to multiple loaded VOBs will add further complications and you may have to process them separately. This is obviously a last resort solution and would be OK for a one-time transcode but not as a regular process.

Guest
3rd October 2012, 14:28
Good news!

I found a way to reliably detect the points where the camera was stopped and where a gap adjustment is needed. The GOP timecode resets!

Now, at every such point, the audio is either short or it matches the video exactly. So if there is a mismatch the camera drops the last audio frame. But my code currently only supports dropping audio, not adding it back. I am going to try just repeating audio frames at the gaps as needed. Stay tuned.

Guest
3rd October 2012, 16:00
OK, it works perfectly. I hacked a lot of code and it would have to all be done properly. I think it better to insert silent frames and then I have the issue of generating silent frames for all varieties of AC3.

Is this a one-time deal for you or is this something you will need to do many times in the future?

Morku
3rd October 2012, 18:29
Congratulation and thank you very much! I didn't try yet your "hacky way", but it seems you found another, better way, so I will wait :)
I have 29 DVD from the same camcorder here and I have to do all.
Some vacation videos are on more DVDs. The DVD I sent you is one of 3, so in the result I have to combine these 3 DVDs to get a single video file.
Fortunately the camcorder is broken so there wont come more DVDs I have to prepare.

Guest
5th October 2012, 13:44
I'm not sure how common this problem is and implementing it in the full generality I would require for a release would be very time-consuming. So instead I give you a special build that you can use on these files.

http://neuron2.net/misc/DGIndexNV_CanonDC100.rar

Important notes:

1. All other gap adjustment except for this kind of Canon DC100 VOB was removed. You'll have to use the earlier special version I gave you for your MPG files.

2. You can load multiple Canon DC100 VOBs and get correct sync throughout.

3. The file silent.ac3 must be placed with DGIndexNV.exe. It will be read once at startup.

4. I've provided only the 32-bit executable.

5. Please acknowledge downloading it as I want to remove it and not have it permanently available.

That's a lot of support for your $15. :)

Morku
5th October 2012, 14:35
I have downloaded and I will report back :)
Thanks a lot. If it will work, the $15 really was worth ;)

Morku
5th October 2012, 15:23
Do I still have to do something with the -40ms information?
I have loaded 7 VOBs (from 3 DVDs) and it looks perfect :) Nice work!
Thats, whats my script looks like:
global MeGUI_darx = 93
global MeGUI_dary = 68

LoadPlugin("DGDecodeNV.dll")

vid = DGSource("1.dgi",fieldop=0).AssumeTFF()
aud = NicAC3Source("1 T80 2_0ch 48KHz 256Kbps DELAY -40ms.ac3")

AudioDub(vid, aud)

tempgaussmc_beta2(edimode="nnedi3")

Guest
5th October 2012, 15:37
It's up to you. Many people can't notice 40ms desync and for the kind of material you've shown me maybe it's not so important. But why not correct for it?

aud = NicAC3Source("1 T80 2_0ch 48KHz 256Kbps DELAY -40ms.ac3").delayaudio(-0.040)

One point: I designed and tested for only loading VOBs from a single DVD. Maybe it will work for loading multiple DVDs though. Did you rename the files to allow loading VOBs from multiple DVDs? Worst case, you may have to make a separate project for each DVD. If it works for you, though, fine, but be aware of this caveat.

Happy to have helped you.

Morku
5th October 2012, 16:31
Okay I will use .delayaudio(-0.040). Looks also fine!
Yes I renamed the VOBs. I copied the VOBs into a folder and renamed to 1.vob 2.vob 3.vob. I took the next DVD and copied again the 3 VOBs and renamed into 4.vob 5.vob 6.vob and so on. Than I loaded into the speical DGIndexNV Build. Than I load the Script to AVS Cutter in MeGUI and do some cuts, as I want. Also the latest clips looks fine in VirtualDub. No delay. Only the final result could get go worse now, but I don't think so ;) Or I will report back :)

Guest
5th October 2012, 16:45
Good to hear, Morku. I'm sure if it is correct in VirtualDub you will have nothing but plain sailing ahead.

Thanks for stimulating me with this interesting problem. :D

Hopefully the days of DVD camcorders are behind us. I will try to release support for file seam gap adjustment for MPG files (your first trouble case), but this GOP timecode reset stuff is too arcane.